Skip to content

Make method to set LayoutRect/FloatRect via edge coordinates public#52414

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
fantasai:shiftEdgesTo
Oct 16, 2025
Merged

Make method to set LayoutRect/FloatRect via edge coordinates public#52414
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
fantasai:shiftEdgesTo

Conversation

@fantasai
Copy link
Contributor

@fantasai fantasai commented Oct 15, 2025

680f94c

Make method to set LayoutRect/FloatRect via edge coordinates public
https://bugs.webkit.org/show_bug.cgi?id=300826
rdar://162710333

Reviewed by Simon Fraser.

Shifts the setLocationAndSizeFromEdges() method from private to public and
renames it to shiftEdgesTo() to align with the various shift*EdgeTo() methods.

Also adds the two missing shift*EdgeBy() methods to LayoutRect.

* Source/WebCore/platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::intersect):
(WebCore::FloatRect::uniteEvenIfEmpty):
(WebCore::FloatRect::extend):
* Source/WebCore/platform/graphics/FloatRect.h:
(WebCore::FloatRect::shiftEdgesTo):
(WebCore::FloatRect::setLocationAndSizeFromEdges): Deleted.
* Source/WebCore/platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::uniteEvenIfEmpty):
* Source/WebCore/platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::shiftEdgesTo):
(WebCore::LayoutRect::setLocationAndSizeFromEdges): Deleted.

Canonical link: https://commits.webkit.org/301603@main

27ae8d7

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@fantasai fantasai self-assigned this Oct 15, 2025
@fantasai fantasai added the Layout and Rendering For bugs with layout and rendering of Web pages. label Oct 15, 2025
@fantasai fantasai added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Oct 15, 2025
https://bugs.webkit.org/show_bug.cgi?id=300826
rdar://162710333

Reviewed by Simon Fraser.

Shifts the setLocationAndSizeFromEdges() method from private to public and
renames it to shiftEdgesTo() to align with the various shift*EdgeTo() methods.

Also adds the two missing shift*EdgeBy() methods to LayoutRect.

* Source/WebCore/platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::intersect):
(WebCore::FloatRect::uniteEvenIfEmpty):
(WebCore::FloatRect::extend):
* Source/WebCore/platform/graphics/FloatRect.h:
(WebCore::FloatRect::shiftEdgesTo):
(WebCore::FloatRect::setLocationAndSizeFromEdges): Deleted.
* Source/WebCore/platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::uniteEvenIfEmpty):
* Source/WebCore/platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::shiftEdgesTo):
(WebCore::LayoutRect::setLocationAndSizeFromEdges): Deleted.

Canonical link: https://commits.webkit.org/301603@main
@webkit-commit-queue
Copy link
Collaborator

Committed 301603@main (680f94c): https://commits.webkit.org/301603@main

Reviewed commits have been landed. Closing PR #52414 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 680f94c into WebKit:main Oct 16, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layout and Rendering For bugs with layout and rendering of Web pages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments