Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a1e8662310da9aff0f6ca3e3fb9a32202bb88c29
https://github.com/WebKit/WebKit/commit/a1e8662310da9aff0f6ca3e3fb9a32202bb88c29
Author: Yusuke Suzuki <[email protected]>
Date: 2023-10-06 (Fri, 06 Oct 2023)
Changed paths:
M Source/WTF/wtf/MathExtras.h
M Source/WebCore/platform/graphics/FloatPoint.h
M Source/WebCore/platform/graphics/FloatRect.h
M Source/WebCore/platform/graphics/FloatSize.h
M Tools/TestWebKitAPI/Tests/WebCore/FloatPointTests.cpp
M Tools/TestWebKitAPI/Tests/WebCore/FloatRectTests.cpp
M Tools/TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp
Log Message:
-----------
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes