-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make FloatRect etc. constexpr and adopt nanRect to make it usable for "not-filled" FloatRect purpose #18633
Conversation
EWS run on current version of this PR (hash a18d0cb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
β¦ "not-filled" FloatRect purpose https://bugs.webkit.org/show_bug.cgi?id=262636 rdar://116476334 Reviewed by Justin Michaud and Mark Lam. Use constexpr in FloatRect and related classes, and add `nanRect` concept to make it usable for "not-filled" FloatRect. This is useful in subsequent SVG optimization instead of using `std::optional<FloatRect>`. * Source/WebCore/platform/graphics/FloatPoint.h: (WebCore::FloatPoint::FloatPoint): (WebCore::FloatPoint::zero): (WebCore::FloatPoint::isZero const): (WebCore::FloatPoint::x const): (WebCore::FloatPoint::y const): (WebCore::FloatPoint::scaled const): (WebCore::FloatPoint::dot const): (WebCore::FloatPoint::lengthSquared const): (WebCore::FloatPoint::shrunkTo const): (WebCore::FloatPoint::expandedTo const): (WebCore::FloatPoint::transposedPoint const): (WebCore::operator+): (WebCore::operator-): (WebCore::operator*): (WebCore::FloatPoint::rotate): * Source/WebCore/platform/graphics/FloatRect.h: (WebCore::FloatRect::FloatRect): (WebCore::FloatRect::location const): (WebCore::FloatRect::size const): (WebCore::FloatRect::x const): (WebCore::FloatRect::y const): (WebCore::FloatRect::maxX const): (WebCore::FloatRect::maxY const): (WebCore::FloatRect::width const): (WebCore::FloatRect::height const): (WebCore::FloatRect::area const): (WebCore::FloatRect::isEmpty const): (WebCore::FloatRect::isZero const): (WebCore::FloatRect::center const): (WebCore::FloatRect::minXMinYCorner const): (WebCore::FloatRect::maxXMinYCorner const): (WebCore::FloatRect::minXMaxYCorner const): (WebCore::FloatRect::maxXMaxYCorner const): (WebCore::FloatRect::contains const): (WebCore::FloatRect::overlapsYRange const): (WebCore::FloatRect::overlapsXRange const): (WebCore::FloatRect::transposedRect const): (WebCore::operator+): (WebCore::FloatRect::infiniteRect): (WebCore::FloatRect::isInfinite const): (WebCore::FloatRect::smallestRect): (WebCore::FloatRect::isSmallest const): (WebCore::FloatRect::nanRect): (WebCore::FloatRect::isNaN const): * Source/WebCore/platform/graphics/FloatSize.cpp: (WebCore::FloatSize::isZero const): Deleted. * Source/WebCore/platform/graphics/FloatSize.h: (WebCore::FloatSize::isZero const): * Tools/TestWebKitAPI/Tests/WebCore/FloatRectTests.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/268866@main
a18d0cb
to
4f828af
Compare
Committed 268866@main (4f828af): https://commits.webkit.org/268866@main Reviewed commits have been landed. Closing PR #18633 and removing active labels. |
4f828af
a18d0cb
π§ͺ wpe-wk2π§ͺ gtk-wk2π§ͺ api-gtkπ tvπ§ͺ mac-AS-debug-wk2π watch