-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MarkableTraits to FloatRect / FloatPoint / FloatSize
https://bugs.webkit.org/show_bug.cgi?id=262766 rdar://116562787 Reviewed by Chris Dumez. This patch adds MarkableTraits to FloatRect / FloatPoint / FloatSize. So that we can use Markable<FloatRect, FloatRect::MarkableTraits> easily. We also add `fabsConstExpr` to ensure that this is becoming `constexpr`. And use `isNaNConstExpr` too. Unfortunately they are not constexpr until C++23. * Source/WTF/wtf/MathExtras.h: (WTF::fabsConstExpr): * Source/WebCore/platform/graphics/FloatPoint.h: (WebCore::FloatPoint::MarkableTraits::isEmptyValue): (WebCore::FloatPoint::MarkableTraits::emptyValue): (WebCore::FloatPoint::nanPoint): (WebCore::FloatPoint::isNaN const): * Source/WebCore/platform/graphics/FloatRect.h: (WebCore::FloatRect::MarkableTraits::isEmptyValue): (WebCore::FloatRect::MarkableTraits::emptyValue): (WebCore::FloatRect::isNaN const): * Source/WebCore/platform/graphics/FloatSize.h: (WebCore::FloatSize::MarkableTraits::isEmptyValue): (WebCore::FloatSize::MarkableTraits::emptyValue): (WebCore::FloatSize::isZero const): (WebCore::FloatSize::nanSize): (WebCore::FloatSize::isNaN const): * Tools/TestWebKitAPI/Tests/WebCore/FloatPointTests.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebCore/FloatRectTests.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/268992@main
- Loading branch information
1 parent
49aa1f6
commit a1e8662
Showing
7 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters