Title: [288388] trunk/Source/WebCore
- Revision
- 288388
- Author
- timothy_hor...@apple.com
- Date
- 2022-01-21 16:41:43 -0800 (Fri, 21 Jan 2022)
Log Message
imported/w3c/web-platform-tests/css/css-color/parsing/color-valid.html fails in debug
Reviewed by Sam Weinig.
* platform/graphics/ColorTypes.h:
(WebCore::assertInRange):
We want to *ignore* NaN alpha, like for the other channels. The conditional was backwards.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (288387 => 288388)
--- trunk/Source/WebCore/ChangeLog 2022-01-22 00:29:07 UTC (rev 288387)
+++ trunk/Source/WebCore/ChangeLog 2022-01-22 00:41:43 UTC (rev 288388)
@@ -1,3 +1,13 @@
+2022-01-21 Tim Horton <timothy_hor...@apple.com>
+
+ imported/w3c/web-platform-tests/css/css-color/parsing/color-valid.html fails in debug
+
+ Reviewed by Sam Weinig.
+
+ * platform/graphics/ColorTypes.h:
+ (WebCore::assertInRange):
+ We want to *ignore* NaN alpha, like for the other channels. The conditional was backwards.
+
2022-01-21 Mike Gorse <mgo...@suse.com>
Build failure with g++ 12: std::exchange undefined
Modified: trunk/Source/WebCore/platform/graphics/ColorTypes.h (288387 => 288388)
--- trunk/Source/WebCore/platform/graphics/ColorTypes.h 2022-01-22 00:29:07 UTC (rev 288387)
+++ trunk/Source/WebCore/platform/graphics/ColorTypes.h 2022-01-22 00:41:43 UTC (rev 288388)
@@ -149,7 +149,7 @@
ASSERT_WITH_MESSAGE(components[i] >= ColorType::Model::componentInfo[i].min, "Component at index %d is %f and is less than the allowed minimum %f", i, components[i], ColorType::Model::componentInfo[i].min);
ASSERT_WITH_MESSAGE(components[i] <= ColorType::Model::componentInfo[i].max, "Component at index %d is %f and is greater than the allowed maximum %f", i, components[i], ColorType::Model::componentInfo[i].max);
}
- if (constexprIsNaN(components[3])) {
+ if (!constexprIsNaN(components[3])) {
ASSERT_WITH_MESSAGE(components[3] >= AlphaTraits<typename ColorType::ComponentType>::transparent, "Alpha is %f and is less than the allowed minimum (transparent) %f", components[3], AlphaTraits<typename ColorType::ComponentType>::transparent);
ASSERT_WITH_MESSAGE(components[3] <= AlphaTraits<typename ColorType::ComponentType>::opaque, "Alpha is %f and is greater than the allowed maximum (opaque) %f", components[3], AlphaTraits<typename ColorType::ComponentType>::opaque);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes