Title: [282768] trunk
Revision
282768
Author
grao...@webkit.org
Date
2021-09-20 12:23:54 -0700 (Mon, 20 Sep 2021)

Log Message

box-shadow and text-shadow do not yield float values while interpolating
https://bugs.webkit.org/show_bug.cgi?id=230347

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add some new WPT tests for float and calc() values for box-shadow and text-shadow while
interpolating and update output for still-failing composite operations tests. The new tests
have already landed in WPT with https://github.com/web-platform-tests/wpt/pull/30823.

* web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html:
* web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html: Added.
* web-platform-tests/css/css-backgrounds/box-shadow-calc.html: Added.
* web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt:
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html:

Source/WebCore:

ShadowData members used integer values rather than floats and thus could not represent
float values while interpolating. We now use float values.

Test: imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::shadowForBlending):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* display/css/DisplayBoxDecorationPainter.cpp:
(WebCore::Display::BoxDecorationPainter::paintBoxShadow const):
* editing/Editor.cpp:
(WebCore::Editor::fontAttributesAtSelectionStart):
* platform/LengthPoint.h:
(WebCore::LengthPoint::isZero const):
* rendering/LegacyEllipsisBox.cpp:
(WebCore::LegacyEllipsisBox::paint):
* rendering/RenderBoxModelObject.cpp:
(WebCore::applyBoxShadowForBackground):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::debugTextShadow const):
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
* rendering/TextPainter.cpp:
(WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setTextShadow):
(WebCore::RenderStyle::shadowExtent):
(WebCore::RenderStyle::shadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):
* rendering/style/ShadowData.cpp:
(WebCore::ShadowData::ShadowData):
(WebCore::calculateShadowExtent):
* rendering/style/ShadowData.h:
(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::x const):
(WebCore::ShadowData::y const):
(WebCore::ShadowData::location const):
(WebCore::ShadowData::radius const):
(WebCore::ShadowData::paintingExtent const):
(WebCore::ShadowData::spread const):
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-20 19:23:54 UTC (rev 282768)
@@ -1,3 +1,23 @@
+2021-09-20  Antoine Quint  <grao...@webkit.org>
+
+        box-shadow and text-shadow do not yield float values while interpolating
+        https://bugs.webkit.org/show_bug.cgi?id=230347
+
+        Reviewed by Simon Fraser.
+
+        Add some new WPT tests for float and calc() values for box-shadow and text-shadow while
+        interpolating and update output for still-failing composite operations tests. The new tests
+        have already landed in WPT with https://github.com/web-platform-tests/wpt/pull/30823.
+
+        * web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt:
+        * web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
+        * web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html:
+        * web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html: Added.
+        * web-platform-tests/css/css-backgrounds/box-shadow-calc.html: Added.
+        * web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt:
+        * web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
+        * web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html:
+
 2021-09-20  Johnson Zhou  <qiaosong_z...@apple.com>
 
         Add support for CSSUnparsedValue parsing through CSSStyleValue.parse()

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt	2021-09-20 19:23:54 UTC (rev 282768)
@@ -24,19 +24,19 @@
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(100, 100, 100) 10px 20px 30px 40px inset] to add [rgb(200, 200, 200) 20px 40px 60px 80px, rgb(200, 200, 200) 20px 40px 60px 80px inset] at (0.5) should be [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(150, 150, 150) 15px 30px 45px 60px, rgb(150, 150, 150) 15px 30px 45px 60px inset] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px 4px , rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px , rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px inset " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px , rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px inset "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(100, 100, 100) 10px 20px 30px 40px inset] to add [rgb(200, 200, 200) 20px 40px 60px 80px, rgb(200, 200, 200) 20px 40px 60px 80px inset] at (1) should be [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(200, 200, 200) 20px 40px 60px 80px, rgb(200, 200, 200) 20px 40px 60px 80px inset] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px 4px , rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px , rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px inset " but got "rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px , rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px inset "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(100, 100, 100) 10px 20px 30px 40px inset] to add [rgb(200, 200, 200) 20px 40px 60px 80px, rgb(200, 200, 200) 20px 40px 60px 80px inset] at (1.5) should be [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(250, 250, 250) 25px 50px 75px 100px, rgb(250, 250, 250) 25px 50px 75px 100px inset] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px 4px , rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px , rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px inset " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px , rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px inset "
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px -18.8px, rgb(26, 52, 78) 2.6px 5.2px 7.8px 10.4px, rgb(130, 130, 130) 13px 26px 39px 52px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.69px - 9.39px 0px - 18.8px , rgb ( 26 , 52 , 78 ) 2.59px 5.19px 7px 10.39px , rgb ( 130 , 130 , 130 ) 13px 26px 39px 52px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px 28px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px -18.8px, rgb(26, 52, 78) 2.6px 5.2px 7.8px 10.4px, rgb(130, 130, 130) 13px 26px 39px 52px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.7px - 9.4px 0px - 18.8px , rgb ( 26 , 52 , 78 ) 2.6px 5.2px 7.8px 10.4px , rgb ( 130 , 130 , 130 ) 13px 26px 39px 52px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px 28px "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (0) should be [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(100, 100, 100) 10px 20px 30px 40px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px 4px , rgb ( 20 , 40 , 60 ) 2px 4px 6px 8px , rgb ( 100 , 100 , 100 ) 10px 20px 30px 40px " but got "rgb ( 100 , 100 , 100 ) 10px 20px 30px 40px "
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px 42px, rgba(20, 40, 60, 0.5) 1px 2px 3px 4px, rgba(100, 100, 100, 0.5) 5px 10px 15px 20px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31px 42px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px 4px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px 20px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px 42px, rgba(20, 40, 60, 0.5) 1px 2px 3px 4px, rgba(100, 100, 100, 0.5) 5px 10px 15px 20px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31.5px 42px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px 4px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px 20px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px "
 PASS Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (1) should be [rgb(200, 200, 200) 20px 40px 60px 80px]
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px 118px, rgba(0, 0, 0, 0) -1px -2px 0px -4px, rgba(0, 0, 0, 0) -5px -10px 0px -20px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88px 118px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px - 4px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px - 20px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px "
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (-0.3) should be [rgb(127, 124, 121) 12.7px 25.4px 38.1px 50.8px, rgba(0, 0, 0, 0) -0.6px -1.2px 0px -2.4px, rgba(0, 0, 0, 0) -6px -12px 0px -24px] assert_equals: expected "rgb ( 127 , 124 , 121 ) 12.69px 25.39px 38px 50.8px , rgba ( 0 , 0 , 0 , 0 ) - 0.59px - 1.19px 0px - 2.39px , rgba ( 0 , 0 , 0 , 0 ) - 6px - 12px 0px - 24px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px 28px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from add [rgb(100, 100, 100) 10px 20px 30px 40px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px 118px, rgba(0, 0, 0, 0) -1px -2px 0px -4px, rgba(0, 0, 0, 0) -5px -10px 0px -20px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88.5px 118px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px - 4px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px - 20px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (-0.3) should be [rgb(127, 124, 121) 12.7px 25.4px 38.1px 50.8px, rgba(0, 0, 0, 0) -0.6px -1.2px 0px -2.4px, rgba(0, 0, 0, 0) -6px -12px 0px -24px] assert_equals: expected "rgb ( 127 , 124 , 121 ) 12.7px 25.4px 38.1px 50.8px , rgba ( 0 , 0 , 0 , 0 ) - 0.6px - 1.2px 0px - 2.4px , rgba ( 0 , 0 , 0 , 0 ) - 6px - 12px 0px - 24px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px 28px "
 PASS Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (0) should be [rgb(100, 100, 100) 10px 20px 30px 40px]
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (0.5) should be [rgb(55, 60, 65) 5.5px 11px 16.5px 22px, rgba(20, 40, 60, 0.5) 1px 2px 3px 4px, rgba(200, 200, 200, 0.5) 10px 20px 30px 40px] assert_equals: expected "rgb ( 55 , 60 , 65 ) 5.5px 11px 16px 22px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px 4px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px 40px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (0.5) should be [rgb(55, 60, 65) 5.5px 11px 16.5px 22px, rgba(20, 40, 60, 0.5) 1px 2px 3px 4px, rgba(200, 200, 200, 0.5) 10px 20px 30px 40px] assert_equals: expected "rgb ( 55 , 60 , 65 ) 5.5px 11px 16.5px 22px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px 4px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px 40px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (1) should be [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(200, 200, 200) 20px 40px 60px 80px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px 4px , rgb ( 20 , 40 , 60 ) 2px 4px 6px 8px , rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px " but got "rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px] from replace [rgb(100, 100, 100) 10px 20px 30px 40px] to add [rgb(200, 200, 200) 20px 40px 60px 80px] at (1.5) should be [rgb(0, 0, 0) -3.5px -7px 0px -14px, rgb(30, 60, 90) 3px 6px 9px 12px, rgb(255, 255, 255) 30px 60px 90px 120px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 3.5px - 7px 0px - 14px , rgb ( 30 , 60 , 90 ) 3px 6px 9px 12px , rgb ( 255 , 255 , 255 ) 30px 60px 90px 120px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px "
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px -18.8px, rgb(26, 52, 78) 2.6px 5.2px 7.8px 10.4px, rgb(52, 104, 156) 5.2px 10.4px 15.6px 20.8px, rgb(130, 130, 130) 13px 26px 39px 52px, rgb(255, 255, 255) 26px 52px 78px 104px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.69px - 9.39px 0px - 18.8px , rgb ( 26 , 52 , 78 ) 2.59px 5.19px 7px 10.39px , rgb ( 52 , 104 , 156 ) 5.19px 10.39px 15px 20.8px , rgb ( 130 , 130 , 130 ) 13px 26px 39px 52px , rgb ( 255 , 255 , 255 ) 26px 52px 78px 104px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px 28px , rgb ( 255 , 255 , 255 ) 26px 52px 78px 104px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px -18.8px, rgb(26, 52, 78) 2.6px 5.2px 7.8px 10.4px, rgb(52, 104, 156) 5.2px 10.4px 15.6px 20.8px, rgb(130, 130, 130) 13px 26px 39px 52px, rgb(255, 255, 255) 26px 52px 78px 104px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.7px - 9.4px 0px - 18.8px , rgb ( 26 , 52 , 78 ) 2.6px 5.2px 7.8px 10.4px , rgb ( 52 , 104 , 156 ) 5.2px 10.4px 15.6px 20.8px , rgb ( 130 , 130 , 130 ) 13px 26px 39px 52px , rgb ( 255 , 255 , 255 ) 26px 52px 78px 104px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px 28px , rgb ( 255 , 255 , 255 ) 26px 52px 78px 104px "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (0) should be [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px, rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px 4px , rgb ( 20 , 40 , 60 ) 2px 4px 6px 8px , rgb ( 40 , 80 , 120 ) 4px 8px 12px 16px , rgb ( 100 , 100 , 100 ) 10px 20px 30px 40px , rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px " but got "rgb ( 100 , 100 , 100 ) 10px 20px 30px 40px , rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px "
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px 42px, rgba(20, 40, 60, 0.5) 1px 2px 3px 4px, rgba(40, 80, 120, 0.5) 2px 4px 6px 8px, rgba(100, 100, 100, 0.5) 5px 10px 15px 20px, rgba(200, 200, 200, 0.5) 10px 20px 30px 40px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31px 42px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px 4px , rgba ( 40 , 80 , 120 , 0.5 ) 2px 4px 6px 8px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px 20px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px 40px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px 40px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px 42px, rgba(20, 40, 60, 0.5) 1px 2px 3px 4px, rgba(40, 80, 120, 0.5) 2px 4px 6px 8px, rgba(100, 100, 100, 0.5) 5px 10px 15px 20px, rgba(200, 200, 200, 0.5) 10px 20px 30px 40px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31.5px 42px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px 4px , rgba ( 40 , 80 , 120 , 0.5 ) 2px 4px 6px 8px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px 20px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px 40px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px 60px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px 40px "
 FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (1) should be [rgb(200, 200, 200) 20px 40px 60px 80px] assert_equals: expected "rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px " but got "rgb ( 200 , 200 , 200 ) 20px 40px 60px 80px , rgba ( 0 , 0 , 0 , 0 ) 0px 0px 0px 0px "
-FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px 118px, rgba(0, 0, 0, 0) -1px -2px 0px -4px, rgba(0, 0, 0, 0) -2px -4px 0px -8px, rgba(0, 0, 0, 0) -5px -10px 0px -20px, rgba(0, 0, 0, 0) -10px -20px 0px -40px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88px 118px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px - 4px , rgba ( 0 , 0 , 0 , 0 ) - 2px - 4px 0px - 8px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px - 20px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px - 40px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px - 40px "
+FAIL Compositing: property <box-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px 4px, rgb(20, 40, 60) 2px 4px 6px 8px, rgb(40, 80, 120) 4px 8px 12px 16px] from add [rgb(100, 100, 100) 10px 20px 30px 40px, rgb(200, 200, 200) 20px 40px 60px 80px] to replace [rgb(200, 200, 200) 20px 40px 60px 80px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px 118px, rgba(0, 0, 0, 0) -1px -2px 0px -4px, rgba(0, 0, 0, 0) -2px -4px 0px -8px, rgba(0, 0, 0, 0) -5px -10px 0px -20px, rgba(0, 0, 0, 0) -10px -20px 0px -40px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88.5px 118px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px - 4px , rgba ( 0 , 0 , 0 , 0 ) - 2px - 4px 0px - 8px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px - 20px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px - 40px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px 100px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px - 40px "
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt	2021-09-20 19:23:54 UTC (rev 282768)
@@ -119,6 +119,54 @@
 PASS Web Animations: property <box-shadow> from [15px 10px 5px 6px black] to [-15px -10px 25px -4px orange] at (0.6) should be [rgb(153, 99, 0) -3px -2px 17px 0px]
 PASS Web Animations: property <box-shadow> from [15px 10px 5px 6px black] to [-15px -10px 25px -4px orange] at (1) should be [rgb(255, 165, 0) -15px -10px 25px -4px]
 PASS Web Animations: property <box-shadow> from [15px 10px 5px 6px black] to [-15px -10px 25px -4px orange] at (1.5) should be [rgb(255, 248, 0) -30px -20px 35px -9px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1) should be [rgb(0, 0, 0) 1px 1px 1px 1px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1) should be [rgb(0, 0, 0) 1px 1px 1px 1px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1) should be [rgb(0, 0, 0) 1px 1px 1px 1px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1) should be [rgb(0, 0, 0) 1px 1px 1px 1px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [1px 1px 1px 1px black] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (-0.3) should be [rgb(0, 0, 0) -3.9px -3.9px 0px -3.9px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.3) should be [rgb(0, 0, 0) 3.9px 3.9px 3.9px 3.9px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.6) should be [rgb(0, 0, 0) 7.8px 7.8px 7.8px 7.8px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1) should be [rgb(0, 0, 0) 13px 13px 13px 13px]
+PASS CSS Transitions: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1.5) should be [rgb(0, 0, 0) 19.5px 19.5px 19.5px 19.5px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (-0.3) should be [rgb(0, 0, 0) -3.9px -3.9px 0px -3.9px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.3) should be [rgb(0, 0, 0) 3.9px 3.9px 3.9px 3.9px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.6) should be [rgb(0, 0, 0) 7.8px 7.8px 7.8px 7.8px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1) should be [rgb(0, 0, 0) 13px 13px 13px 13px]
+PASS CSS Transitions with transition: all: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1.5) should be [rgb(0, 0, 0) 19.5px 19.5px 19.5px 19.5px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (-0.3) should be [rgb(0, 0, 0) -3.9px -3.9px 0px -3.9px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.3) should be [rgb(0, 0, 0) 3.9px 3.9px 3.9px 3.9px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.6) should be [rgb(0, 0, 0) 7.8px 7.8px 7.8px 7.8px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1) should be [rgb(0, 0, 0) 13px 13px 13px 13px]
+PASS CSS Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1.5) should be [rgb(0, 0, 0) 19.5px 19.5px 19.5px 19.5px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (-0.3) should be [rgb(0, 0, 0) -3.9px -3.9px 0px -3.9px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0) should be [rgb(0, 0, 0) 0px 0px 0px 0px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.3) should be [rgb(0, 0, 0) 3.9px 3.9px 3.9px 3.9px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (0.6) should be [rgb(0, 0, 0) 7.8px 7.8px 7.8px 7.8px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1) should be [rgb(0, 0, 0) 13px 13px 13px 13px]
+PASS Web Animations: property <box-shadow> from [0px 0px 0px 0px black] to [calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black] at (1.5) should be [rgb(0, 0, 0) 19.5px 19.5px 19.5px 19.5px]
 PASS CSS Transitions: property <box-shadow> from [black 15px 10px 5px 6px] to [orange -15px -10px 25px -4px] at (-0.3) should be [rgb(0, 0, 0) 24px 16px 0px 9px]
 PASS CSS Transitions: property <box-shadow> from [black 15px 10px 5px 6px] to [orange -15px -10px 25px -4px] at (0) should be [rgb(0, 0, 0) 15px 10px 5px 6px]
 PASS CSS Transitions: property <box-shadow> from [black 15px 10px 5px 6px] to [orange -15px -10px 25px -4px] at (0.3) should be [rgb(77, 50, 0) 6px 4px 11px 3px]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html	2021-09-20 19:23:54 UTC (rev 282768)
@@ -94,6 +94,32 @@
   {at: 1.5, expect: 'rgb(255, 248, 0) -30px -20px 35px -9px'},
 ]);
 
+test_interpolation({
+  property: 'box-shadow',
+  from: '0px 0px 0px 0px black',
+  to: '1px 1px 1px 1px black',
+}, [
+  {at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px'},
+  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px 0px'},
+  {at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px'},
+  {at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px'},
+  {at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px 1px'},
+  {at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px'},
+]);
+
+test_interpolation({
+  property: 'box-shadow',
+  from: '0px 0px 0px 0px black',
+  to: 'calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black',
+}, [
+  {at: -0.3, expect: 'rgb(0, 0, 0) -3.9px -3.9px 0px -3.9px'},
+  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px 0px'},
+  {at: 0.3, expect: 'rgb(0, 0, 0) 3.9px 3.9px 3.9px 3.9px'},
+  {at: 0.6, expect: 'rgb(0, 0, 0) 7.8px 7.8px 7.8px 7.8px'},
+  {at: 1, expect: 'rgb(0, 0, 0) 13px 13px 13px 13px'},
+  {at: 1.5, expect: 'rgb(0, 0, 0) 19.5px 19.5px 19.5px 19.5px'},
+]);
+
 // Test with color as first value.
 test_interpolation({
   property: 'box-shadow',

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html (0 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html	2021-09-20 19:23:54 UTC (rev 282768)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style type="text/css">
+div {
+  width: 100px;
+  height: 100px;
+  background-color: blue;
+  box-shadow: 26px 26px 26px black;
+}
+</style>
+<div>
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html (0 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html	2021-09-20 19:23:54 UTC (rev 282768)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<link rel="author" title="Antoine Quint" href="" />
+<link rel="help" href="" />
+<link rel="match" href="" />
+<meta name="assert" content="Test checks whether box-shadow supports calc() values.">
+<style type="text/css">
+div {
+  width: 100px;
+  height: 100px;
+  background-color: blue;
+  box-shadow: calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black;
+}
+</style>
+<div>
+</div>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt	2021-09-20 19:23:54 UTC (rev 282768)
@@ -14,19 +14,19 @@
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(150, 150, 150) 15px 30px 45px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px , rgb ( 20 , 40 , 60 ) 2px 4px 6px , rgb ( 150 , 150 , 150 ) 15px 30px 45px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (1) should be [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(200, 200, 200) 20px 40px 60px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px , rgb ( 20 , 40 , 60 ) 2px 4px 6px , rgb ( 200 , 200 , 200 ) 20px 40px 60px " but got "rgb ( 200 , 200 , 200 ) 20px 40px 60px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (1.5) should be [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(250, 250, 250) 25px 50px 75px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px , rgb ( 20 , 40 , 60 ) 2px 4px 6px , rgb ( 250 , 250 , 250 ) 25px 50px 75px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px "
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px, rgb(26, 52, 78) 2.6px 5.2px 7.8px, rgb(130, 130, 130) 13px 26px 39px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.69px - 9.39px 0px , rgb ( 26 , 52 , 78 ) 2.59px 5.19px 7px , rgb ( 130 , 130 , 130 ) 13px 26px 39px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px, rgb(26, 52, 78) 2.6px 5.2px 7.8px, rgb(130, 130, 130) 13px 26px 39px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.7px - 9.4px 0px , rgb ( 26 , 52 , 78 ) 2.6px 5.2px 7.8px , rgb ( 130 , 130 , 130 ) 13px 26px 39px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (0) should be [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(100, 100, 100) 10px 20px 30px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px , rgb ( 20 , 40 , 60 ) 2px 4px 6px , rgb ( 100 , 100 , 100 ) 10px 20px 30px " but got "rgb ( 100 , 100 , 100 ) 10px 20px 30px "
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px, rgba(20, 40, 60, 0.5) 1px 2px 3px, rgba(100, 100, 100, 0.5) 5px 10px 15px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px, rgba(20, 40, 60, 0.5) 1px 2px 3px, rgba(100, 100, 100, 0.5) 5px 10px 15px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31.5px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px "
 PASS Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (1) should be [rgb(200, 200, 200) 20px 40px 60px]
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px, rgba(0, 0, 0, 0) -1px -2px 0px, rgba(0, 0, 0, 0) -5px -10px 0px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px "
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (-0.3) should be [rgb(127, 124, 121) 12.7px 25.4px 38.1px, rgba(0, 0, 0, 0) -0.6px -1.2px 0px, rgba(0, 0, 0, 0) -6px -12px 0px] assert_equals: expected "rgb ( 127 , 124 , 121 ) 12.69px 25.39px 38px , rgba ( 0 , 0 , 0 , 0 ) - 0.59px - 1.19px 0px , rgba ( 0 , 0 , 0 , 0 ) - 6px - 12px 0px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from add [rgb(100, 100, 100) 10px 20px 30px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px, rgba(0, 0, 0, 0) -1px -2px 0px, rgba(0, 0, 0, 0) -5px -10px 0px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88.5px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (-0.3) should be [rgb(127, 124, 121) 12.7px 25.4px 38.1px, rgba(0, 0, 0, 0) -0.6px -1.2px 0px, rgba(0, 0, 0, 0) -6px -12px 0px] assert_equals: expected "rgb ( 127 , 124 , 121 ) 12.7px 25.4px 38.1px , rgba ( 0 , 0 , 0 , 0 ) - 0.6px - 1.2px 0px , rgba ( 0 , 0 , 0 , 0 ) - 6px - 12px 0px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px "
 PASS Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (0) should be [rgb(100, 100, 100) 10px 20px 30px]
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(55, 60, 65) 5.5px 11px 16.5px, rgba(20, 40, 60, 0.5) 1px 2px 3px, rgba(200, 200, 200, 0.5) 10px 20px 30px] assert_equals: expected "rgb ( 55 , 60 , 65 ) 5.5px 11px 16px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(55, 60, 65) 5.5px 11px 16.5px, rgba(20, 40, 60, 0.5) 1px 2px 3px, rgba(200, 200, 200, 0.5) 10px 20px 30px] assert_equals: expected "rgb ( 55 , 60 , 65 ) 5.5px 11px 16.5px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (1) should be [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(200, 200, 200) 20px 40px 60px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px , rgb ( 20 , 40 , 60 ) 2px 4px 6px , rgb ( 200 , 200 , 200 ) 20px 40px 60px " but got "rgb ( 200 , 200 , 200 ) 20px 40px 60px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px] from replace [rgb(100, 100, 100) 10px 20px 30px] to add [rgb(200, 200, 200) 20px 40px 60px] at (1.5) should be [rgb(0, 0, 0) -3.5px -7px 0px, rgb(30, 60, 90) 3px 6px 9px, rgb(255, 255, 255) 30px 60px 90px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 3.5px - 7px 0px , rgb ( 30 , 60 , 90 ) 3px 6px 9px , rgb ( 255 , 255 , 255 ) 30px 60px 90px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px "
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px, rgb(26, 52, 78) 2.6px 5.2px 7.8px, rgb(52, 104, 156) 5.2px 10.4px 15.6px, rgb(130, 130, 130) 13px 26px 39px, rgb(255, 255, 255) 26px 52px 78px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.69px - 9.39px 0px , rgb ( 26 , 52 , 78 ) 2.59px 5.19px 7px , rgb ( 52 , 104 , 156 ) 5.19px 10.39px 15px , rgb ( 130 , 130 , 130 ) 13px 26px 39px , rgb ( 255 , 255 , 255 ) 26px 52px 78px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px , rgb ( 255 , 255 , 255 ) 26px 52px 78px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (-0.3) should be [rgb(0, 0, 0) -4.7px -9.4px 0px, rgb(26, 52, 78) 2.6px 5.2px 7.8px, rgb(52, 104, 156) 5.2px 10.4px 15.6px, rgb(130, 130, 130) 13px 26px 39px, rgb(255, 255, 255) 26px 52px 78px] assert_equals: expected "rgb ( 0 , 0 , 0 ) - 4.7px - 9.4px 0px , rgb ( 26 , 52 , 78 ) 2.6px 5.2px 7.8px , rgb ( 52 , 104 , 156 ) 5.2px 10.4px 15.6px , rgb ( 130 , 130 , 130 ) 13px 26px 39px , rgb ( 255 , 255 , 255 ) 26px 52px 78px " but got "rgb ( 70 , 70 , 70 ) 7px 14px 21px , rgb ( 255 , 255 , 255 ) 26px 52px 78px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (0) should be [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px, rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] assert_equals: expected "rgb ( 10 , 20 , 30 ) 1px 2px 3px , rgb ( 20 , 40 , 60 ) 2px 4px 6px , rgb ( 40 , 80 , 120 ) 4px 8px 12px , rgb ( 100 , 100 , 100 ) 10px 20px 30px , rgb ( 200 , 200 , 200 ) 20px 40px 60px " but got "rgb ( 100 , 100 , 100 ) 10px 20px 30px , rgb ( 200 , 200 , 200 ) 20px 40px 60px "
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px, rgba(20, 40, 60, 0.5) 1px 2px 3px, rgba(40, 80, 120, 0.5) 2px 4px 6px, rgba(100, 100, 100, 0.5) 5px 10px 15px, rgba(200, 200, 200, 0.5) 10px 20px 30px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px , rgba ( 40 , 80 , 120 , 0.5 ) 2px 4px 6px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (0.5) should be [rgb(105, 110, 115) 10.5px 21px 31.5px, rgba(20, 40, 60, 0.5) 1px 2px 3px, rgba(40, 80, 120, 0.5) 2px 4px 6px, rgba(100, 100, 100, 0.5) 5px 10px 15px, rgba(200, 200, 200, 0.5) 10px 20px 30px] assert_equals: expected "rgb ( 105 , 110 , 115 ) 10.5px 21px 31.5px , rgba ( 20 , 40 , 60 , 0.5 ) 1px 2px 3px , rgba ( 40 , 80 , 120 , 0.5 ) 2px 4px 6px , rgba ( 100 , 100 , 100 , 0.5 ) 5px 10px 15px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px " but got "rgb ( 150 , 150 , 150 ) 15px 30px 45px , rgba ( 200 , 200 , 200 , 0.5 ) 10px 20px 30px "
 FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (1) should be [rgb(200, 200, 200) 20px 40px 60px] assert_equals: expected "rgb ( 200 , 200 , 200 ) 20px 40px 60px " but got "rgb ( 200 , 200 , 200 ) 20px 40px 60px , rgba ( 0 , 0 , 0 , 0 ) 0px 0px 0px "
-FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px, rgba(0, 0, 0, 0) -1px -2px 0px, rgba(0, 0, 0, 0) -2px -4px 0px, rgba(0, 0, 0, 0) -5px -10px 0px, rgba(0, 0, 0, 0) -10px -20px 0px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px , rgba ( 0 , 0 , 0 , 0 ) - 2px - 4px 0px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px "
+FAIL Compositing: property <text-shadow> underlying [rgb(10, 20, 30) 1px 2px 3px, rgb(20, 40, 60) 2px 4px 6px, rgb(40, 80, 120) 4px 8px 12px] from add [rgb(100, 100, 100) 10px 20px 30px, rgb(200, 200, 200) 20px 40px 60px] to replace [rgb(200, 200, 200) 20px 40px 60px] at (1.5) should be [rgb(255, 255, 255) 29.5px 59px 88.5px, rgba(0, 0, 0, 0) -1px -2px 0px, rgba(0, 0, 0, 0) -2px -4px 0px, rgba(0, 0, 0, 0) -5px -10px 0px, rgba(0, 0, 0, 0) -10px -20px 0px] assert_equals: expected "rgb ( 255 , 255 , 255 ) 29.5px 59px 88.5px , rgba ( 0 , 0 , 0 , 0 ) - 1px - 2px 0px , rgba ( 0 , 0 , 0 , 0 ) - 2px - 4px 0px , rgba ( 0 , 0 , 0 , 0 ) - 5px - 10px 0px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px " but got "rgb ( 250 , 250 , 250 ) 25px 50px 75px , rgba ( 0 , 0 , 0 , 0 ) - 10px - 20px 0px "
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt	2021-09-20 19:23:54 UTC (rev 282768)
@@ -143,4 +143,52 @@
 PASS Web Animations: property <text-shadow> from [black 10px 10px 10px] to [currentColor 10px 10px 10px] at (0.6) should be [rgb(0, 77, 0) 10px 10px 10px]
 PASS Web Animations: property <text-shadow> from [black 10px 10px 10px] to [currentColor 10px 10px 10px] at (1) should be [rgb(0, 128, 0) 10px 10px 10px]
 PASS Web Animations: property <text-shadow> from [black 10px 10px 10px] to [currentColor 10px 10px 10px] at (1.5) should be [rgb(0, 192, 0) 10px 10px 10px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1) should be [rgb(0, 0, 0) 1px 1px 1px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1) should be [rgb(0, 0, 0) 1px 1px 1px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1) should be [rgb(0, 0, 0) 1px 1px 1px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (-0.3) should be [rgb(0, 0, 0) -0.3px -0.3px 0px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.3) should be [rgb(0, 0, 0) 0.3px 0.3px 0.3px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (0.6) should be [rgb(0, 0, 0) 0.6px 0.6px 0.6px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1) should be [rgb(0, 0, 0) 1px 1px 1px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black 1px 1px 1px] at (1.5) should be [rgb(0, 0, 0) 1.5px 1.5px 1.5px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (-0.3) should be [rgb(0, 0, 0) -27px -27px 0px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.3) should be [rgb(0, 0, 0) 27px 27px 27px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.6) should be [rgb(0, 0, 0) 54px 54px 54px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1) should be [rgb(0, 0, 0) 90px 90px 90px]
+PASS CSS Transitions: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1.5) should be [rgb(0, 0, 0) 135px 135px 135px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (-0.3) should be [rgb(0, 0, 0) -27px -27px 0px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.3) should be [rgb(0, 0, 0) 27px 27px 27px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.6) should be [rgb(0, 0, 0) 54px 54px 54px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1) should be [rgb(0, 0, 0) 90px 90px 90px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1.5) should be [rgb(0, 0, 0) 135px 135px 135px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (-0.3) should be [rgb(0, 0, 0) -27px -27px 0px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.3) should be [rgb(0, 0, 0) 27px 27px 27px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.6) should be [rgb(0, 0, 0) 54px 54px 54px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1) should be [rgb(0, 0, 0) 90px 90px 90px]
+PASS CSS Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1.5) should be [rgb(0, 0, 0) 135px 135px 135px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (-0.3) should be [rgb(0, 0, 0) -27px -27px 0px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0) should be [rgb(0, 0, 0) 0px 0px 0px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.3) should be [rgb(0, 0, 0) 27px 27px 27px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (0.6) should be [rgb(0, 0, 0) 54px 54px 54px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1) should be [rgb(0, 0, 0) 90px 90px 90px]
+PASS Web Animations: property <text-shadow> from [black 0px 0px 0px] to [black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)] at (1.5) should be [rgb(0, 0, 0) 135px 135px 135px]
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html (282767 => 282768)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html	2021-09-20 19:23:54 UTC (rev 282768)
@@ -106,5 +106,31 @@
   {at: 1, expect: 'rgb(0, 128, 0) 10px 10px 10px'},
   {at: 1.5, expect: 'rgb(0, 192, 0) 10px 10px 10px'},
 ]);
+
+test_interpolation({
+  property: 'text-shadow',
+  from: 'black 0px 0px 0px',
+  to: 'black 1px 1px 1px',
+}, [
+  {at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px'},
+  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px'},
+  {at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px'},
+  {at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px'},
+  {at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px'},
+  {at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px'},
+]);
+
+test_interpolation({
+  property: 'text-shadow',
+  from: 'black 0px 0px 0px',
+  to: 'black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)',
+}, [
+  {at: -0.3, expect: 'rgb(0, 0, 0) -27px -27px 0px'},
+  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px'},
+  {at: 0.3, expect: 'rgb(0, 0, 0) 27px 27px 27px'},
+  {at: 0.6, expect: 'rgb(0, 0, 0) 54px 54px 54px'},
+  {at: 1, expect: 'rgb(0, 0, 0) 90px 90px 90px'},
+  {at: 1.5, expect: 'rgb(0, 0, 0) 135px 135px 135px'},
+]);
 </script>
 </body>

Modified: trunk/Source/WebCore/ChangeLog (282767 => 282768)


--- trunk/Source/WebCore/ChangeLog	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/ChangeLog	2021-09-20 19:23:54 UTC (rev 282768)
@@ -1,3 +1,58 @@
+2021-09-20  Antoine Quint  <grao...@webkit.org>
+
+        box-shadow and text-shadow do not yield float values while interpolating
+        https://bugs.webkit.org/show_bug.cgi?id=230347
+
+        Reviewed by Simon Fraser.
+
+        ShadowData members used integer values rather than floats and thus could not represent
+        float values while interpolating. We now use float values.
+
+        Test: imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html
+
+        * animation/CSSPropertyAnimation.cpp:
+        (WebCore::blendFunc):
+        (WebCore::shadowForBlending):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::valueForFilter):
+        * display/css/DisplayBoxDecorationPainter.cpp:
+        (WebCore::Display::BoxDecorationPainter::paintBoxShadow const):
+        * editing/Editor.cpp:
+        (WebCore::Editor::fontAttributesAtSelectionStart):
+        * platform/LengthPoint.h:
+        (WebCore::LengthPoint::isZero const):
+        * rendering/LegacyEllipsisBox.cpp:
+        (WebCore::LegacyEllipsisBox::paint):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::applyBoxShadowForBackground):
+        (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
+        (WebCore::RenderBoxModelObject::paintBoxShadow):
+        * rendering/TextBoxPainter.cpp:
+        (WebCore::TextBoxPainter::debugTextShadow const):
+        * rendering/TextDecorationPainter.cpp:
+        (WebCore::TextDecorationPainter::paintTextDecoration):
+        * rendering/TextPainter.cpp:
+        (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::setTextShadow):
+        (WebCore::RenderStyle::shadowExtent):
+        (WebCore::RenderStyle::shadowInsetExtent):
+        (WebCore::RenderStyle::getShadowHorizontalExtent):
+        (WebCore::RenderStyle::getShadowVerticalExtent):
+        * rendering/style/ShadowData.cpp:
+        (WebCore::ShadowData::ShadowData):
+        (WebCore::calculateShadowExtent):
+        * rendering/style/ShadowData.h:
+        (WebCore::ShadowData::ShadowData):
+        (WebCore::ShadowData::x const):
+        (WebCore::ShadowData::y const):
+        (WebCore::ShadowData::location const):
+        (WebCore::ShadowData::radius const):
+        (WebCore::ShadowData::paintingExtent const):
+        (WebCore::ShadowData::spread const):
+        * style/StyleBuilderCustom.h:
+        (WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):
+
 2021-09-20  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [Live Text] Adopt WeakHashMap for caching per-element text recognition results

Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (282767 => 282768)


--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -148,7 +148,7 @@
     ASSERT(from->style() == to->style());
 
     return makeUnique<ShadowData>(blend(from->location(), to->location(), context),
-        std::max(0, blend(from->radius(), to->radius(), context)),
+        blend(from->radius(), to->radius(), context, ValueRange::NonNegative),
         blend(from->spread(), to->spread(), context),
         blendFunc(from->style(), to->style(), context),
         from->isWebkitBoxShadow(),
@@ -1190,10 +1190,10 @@
 
 static inline const ShadowData* shadowForBlending(const ShadowData* srcShadow, const ShadowData* otherShadow)
 {
-    static NeverDestroyed<ShadowData> defaultShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, false, Color::transparentBlack);
-    static NeverDestroyed<ShadowData> defaultInsetShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, false, Color::transparentBlack);
-    static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, true, Color::transparentBlack);
-    static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, true, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Normal, false, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultInsetShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Inset, false, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Normal, true, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Inset, true, Color::transparentBlack);
 
     if (srcShadow)
         return srcShadow;

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (282767 => 282768)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -799,7 +799,7 @@
                 DropShadowFilterOperation& dropShadowOperation = downcast<DropShadowFilterOperation>(filterOperation);
                 filterValue = CSSFunctionValue::create(CSSValueDropShadow);
                 // We want our computed style to look like that of a text shadow (has neither spread nor inset style).
-                ShadowData shadowData = ShadowData(dropShadowOperation.location(), dropShadowOperation.stdDeviation(), 0, ShadowStyle::Normal, false, dropShadowOperation.color());
+                ShadowData shadowData = ShadowData({ Length(dropShadowOperation.location().x(), LengthType::Fixed), Length(dropShadowOperation.location().y(), LengthType::Fixed) }, Length(dropShadowOperation.stdDeviation(), LengthType::Fixed), Length(0, LengthType::Fixed), ShadowStyle::Normal, false, dropShadowOperation.color());
                 filterValue->append(valueForShadow(&shadowData, CSSPropertyTextShadow, style, adjust));
                 break;
             }

Modified: trunk/Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp (282767 => 282768)


--- trunk/Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -1268,10 +1268,10 @@
 
     auto paintNormalShadow = [&](const ShadowData& shadow) {
         // FIXME: Snapping here isn't ideal. It would be better to compute a rect which is border rect + offset + spread, and snap that at tree building time.
-        auto shadowOffset = roundSizeToDevicePixels({ shadow.x(), shadow.y() }, paintingContext.deviceScaleFactor);
+        auto shadowOffset = roundSizeToDevicePixels({ shadow.x().value(), shadow.y().value() }, paintingContext.deviceScaleFactor);
         float shadowPaintingExtent = ceilToDevicePixel(shadow.paintingExtent(), paintingContext.deviceScaleFactor);
-        float shadowSpread = roundToDevicePixel(shadow.spread(), paintingContext.deviceScaleFactor);
-        int shadowRadius = shadow.radius();
+        float shadowSpread = roundToDevicePixel(shadow.spread().value(), paintingContext.deviceScaleFactor);
+        auto shadowRadius = shadow.radius();
 
         auto fillRect = borderRect;
         fillRect.inflate(shadowSpread);
@@ -1298,7 +1298,7 @@
         auto shadowRectOrigin = fillRect.rect().location() + shadowOffset;
         auto adjustedShadowOffset = shadowRectOrigin - adjustedFillRect.rect().location();
 
-        paintingContext.context.setShadow(adjustedShadowOffset, shadowRadius, shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
+        paintingContext.context.setShadow(adjustedShadowOffset, shadowRadius.value(), shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
 
         if (hasBorderRadius) {
             // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time
@@ -1339,10 +1339,10 @@
     };
 
     auto paintInsetShadow = [&](const ShadowData& shadow) {
-        auto shadowOffset = roundSizeToDevicePixels({ shadow.x(), shadow.y() }, paintingContext.deviceScaleFactor);
+        auto shadowOffset = roundSizeToDevicePixels({ shadow.x().value(), shadow.y().value() }, paintingContext.deviceScaleFactor);
         float shadowPaintingExtent = ceilToDevicePixel(shadow.paintingExtent(), paintingContext.deviceScaleFactor);
-        float shadowSpread = roundToDevicePixel(shadow.spread(), paintingContext.deviceScaleFactor);
-        int shadowRadius = shadow.radius();
+        float shadowSpread = roundToDevicePixel(shadow.spread().value(), paintingContext.deviceScaleFactor);
+        auto shadowRadius = shadow.radius();
 
         auto holeRect = borderRect.rect();
         holeRect.inflate(-shadowSpread);
@@ -1409,7 +1409,7 @@
         paintingContext.context.translate(extraOffset);
         shadowOffset -= extraOffset;
 
-        paintingContext.context.setShadow(shadowOffset, shadowRadius, shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
+        paintingContext.context.setShadow(shadowOffset, shadowRadius.value(), shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
         paintingContext.context.fillRectWithRoundedHole(shadowCastingRect, roundedHoleRect, fillColor);
     };
 
@@ -1418,8 +1418,8 @@
         if (shadow->style() != shadowStyle)
             continue;
 
-        LayoutSize shadowOffset(shadow->x(), shadow->y());
-        if (shadowOffset.isZero() && !shadow->radius() && !shadow->spread())
+        LayoutSize shadowOffset(shadow->x().value(), shadow->y().value());
+        if (shadowOffset.isZero() && shadow->radius().isZero() && shadow->spread().isZero())
             continue;
 
         if (shadow->style() == ShadowStyle::Normal)

Modified: trunk/Source/WebCore/editing/Editor.cpp (282767 => 282768)


--- trunk/Source/WebCore/editing/Editor.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/editing/Editor.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -4044,7 +4044,7 @@
         attributes.foregroundColor = foregroundColor;
 
     if (auto* shadowData = style->textShadow())
-        attributes.fontShadow = { shadowData->color(), { static_cast<float>(shadowData->x()), static_cast<float>(shadowData->y()) }, static_cast<double>(shadowData->radius()) };
+        attributes.fontShadow = { shadowData->color(), { shadowData->x().value(), shadowData->y().value() }, shadowData->radius().value() };
 
     switch (style->verticalAlign()) {
     case VerticalAlign::Baseline:

Modified: trunk/Source/WebCore/platform/LengthPoint.h (282767 => 282768)


--- trunk/Source/WebCore/platform/LengthPoint.h	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/platform/LengthPoint.h	2021-09-20 19:23:54 UTC (rev 282768)
@@ -59,6 +59,8 @@
     void setY(Length y) { m_y = WTFMove(y); }
     const Length& y() const { return m_y; }
 
+    bool isZero() const { return m_x.isZero() && m_y.isZero(); }
+
 private:
     // FIXME: it would be nice to pack the two Lengths together better somehow (to avoid padding between them).
     Length m_x;

Modified: trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -55,7 +55,7 @@
     bool setShadow = false;
     if (lineStyle.textShadow()) {
         Color shadowColor = lineStyle.colorByApplyingColorFilter(lineStyle.textShadow()->color());
-        context.setShadow(LayoutSize(lineStyle.textShadow()->x(), lineStyle.textShadow()->y()), lineStyle.textShadow()->radius(), shadowColor);
+        context.setShadow(LayoutSize(lineStyle.textShadow()->x().value(), lineStyle.textShadow()->y().value()), lineStyle.textShadow()->radius().value(), shadowColor);
         setShadow = true;
     }
 

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -701,8 +701,8 @@
     while (boxShadow->style() != ShadowStyle::Normal)
         boxShadow = boxShadow->next();
 
-    FloatSize shadowOffset(boxShadow->x(), boxShadow->y());
-    context.setShadow(shadowOffset, boxShadow->radius(), style.colorByApplyingColorFilter(boxShadow->color()), boxShadow->isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
+    FloatSize shadowOffset(boxShadow->x().value(), boxShadow->y().value());
+    context.setShadow(shadowOffset, boxShadow->radius().value(), style.colorByApplyingColorFilter(boxShadow->color()), boxShadow->isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
 }
 
 InterpolationQuality RenderBoxModelObject::chooseInterpolationQuality(GraphicsContext& context, Image& image, const void* layer, const LayoutSize& size)
@@ -2343,7 +2343,7 @@
             return false;
         hasOneNormalBoxShadow = true;
 
-        if (currentShadow->spread())
+        if (!currentShadow->spread().isZero())
             return false;
     }
 
@@ -2405,10 +2405,10 @@
         if (shadow->style() != shadowStyle)
             continue;
 
-        LayoutSize shadowOffset(shadow->x(), shadow->y());
+        LayoutSize shadowOffset(shadow->x().value(), shadow->y().value());
         LayoutUnit shadowPaintingExtent = shadow->paintingExtent();
-        LayoutUnit shadowSpread = shadow->spread();
-        int shadowRadius = shadow->radius();
+        LayoutUnit shadowSpread = LayoutUnit(shadow->spread().value());
+        auto shadowRadius = shadow->radius().value();
 
         if (shadowOffset.isZero() && !shadowRadius && !shadowSpread)
             continue;

Modified: trunk/Source/WebCore/rendering/TextBoxPainter.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -619,7 +619,7 @@
     if (!textBox().legacyInlineBox())
         return nullptr;
 
-    static NeverDestroyed<ShadowData> debugTextShadow(IntPoint(0, 0), 10, 20, ShadowStyle::Normal, true, SRGBA<uint8_t> { 150, 0, 0, 190 });
+    static NeverDestroyed<ShadowData> debugTextShadow(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(10, LengthType::Fixed), Length(20, LengthType::Fixed), ShadowStyle::Normal, true, SRGBA<uint8_t> { 150, 0, 0, 190 });
     return &debugTextShadow.get();
 }
 

Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/TextDecorationPainter.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -246,7 +246,7 @@
         && (!m_decorations.contains(TextDecoration::Overline) || m_styles.overlineColor.isOpaque())
         && (!m_decorations.contains(TextDecoration::LineThrough) || m_styles.linethroughColor.isOpaque());
 
-    int extraOffset = 0;
+    float extraOffset = 0;
     bool clipping = !areLinesOpaque && m_shadow && m_shadow->next();
     if (clipping) {
         FloatRect clipRect(localOrigin, FloatSize(m_width, fontMetrics.ascent() + 2));
@@ -254,11 +254,11 @@
             int shadowExtent = shadow->paintingExtent();
             FloatRect shadowRect(localOrigin, FloatSize(m_width, fontMetrics.ascent() + 2));
             shadowRect.inflate(shadowExtent);
-            int shadowX = m_isHorizontal ? shadow->x() : shadow->y();
-            int shadowY = m_isHorizontal ? shadow->y() : -shadow->x();
+            float shadowX = LayoutUnit(m_isHorizontal ? shadow->x().value() : shadow->y().value());
+            float shadowY = LayoutUnit(m_isHorizontal ? shadow->y().value() : -shadow->x().value());
             shadowRect.move(shadowX, shadowY);
             clipRect.unite(shadowRect);
-            extraOffset = std::max(extraOffset, std::max(0, shadowY) + shadowExtent);
+            extraOffset = std::max(extraOffset, std::max(0.f, shadowY) + shadowExtent);
         }
         m_context.save();
         m_context.clip(clipRect);
@@ -274,13 +274,13 @@
                 localOrigin.move(0, -extraOffset);
                 extraOffset = 0;
             }
-            int shadowX = m_isHorizontal ? shadow->x() : shadow->y();
-            int shadowY = m_isHorizontal ? shadow->y() : -shadow->x();
+            float shadowX = LayoutUnit(m_isHorizontal ? shadow->x().value() : shadow->y().value());
+            float shadowY = LayoutUnit(m_isHorizontal ? shadow->y().value() : -shadow->x().value());
             
             Color shadowColor = shadow->color();
             if (m_shadowColorFilter)
                 m_shadowColorFilter->transformColor(shadowColor);
-            m_context.setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius(), shadowColor);
+            m_context.setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius().value(), shadowColor);
             shadow = shadow->next();
         }
 

Modified: trunk/Source/WebCore/rendering/TextPainter.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/TextPainter.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/TextPainter.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -50,10 +50,10 @@
         return;
     }
 
-    int shadowX = orientation == FontOrientation::Horizontal ? shadow->x() : shadow->y();
-    int shadowY = orientation == FontOrientation::Horizontal ? shadow->y() : -shadow->x();
+    float shadowX = orientation == FontOrientation::Horizontal ? shadow->x().value() : shadow->y().value();
+    float shadowY = orientation == FontOrientation::Horizontal ? shadow->y().value() : -shadow->x().value();
     FloatSize shadowOffset(shadowX, shadowY);
-    int shadowRadius = shadow->radius();
+    auto shadowRadius = shadow->radius();
     Color shadowColor = shadow->color();
     if (colorFilter)
         colorFilter->transformColor(shadowColor);
@@ -69,12 +69,12 @@
         context.clip(shadowRect);
 
         m_didSaveContext = true;
-        m_extraOffset = FloatSize(0, 2 * shadowRect.height() + std::max(0.0f, shadowOffset.height()) + shadowRadius);
+        m_extraOffset = FloatSize(0, 2 * shadowRect.height() + std::max(0.0f, shadowOffset.height()) + shadowRadius.value());
         shadowOffset -= m_extraOffset;
     }
 
     if (!m_avoidDrawingShadow)
-        context.setShadow(shadowOffset, shadowRadius, shadowColor);
+        context.setShadow(shadowOffset, shadowRadius.value(), shadowColor);
 }
 
 inline bool ShadowApplier::isLastShadowIteration()
@@ -84,7 +84,7 @@
 
 inline bool ShadowApplier::shadowIsCompletelyCoveredByText(bool textIsOpaque)
 {
-    return textIsOpaque && m_shadow && m_shadow->location().isZero() && !m_shadow->radius();
+    return textIsOpaque && m_shadow && m_shadow->location().isZero() && m_shadow->radius().isZero();
 }
 
 ShadowApplier::~ShadowApplier()

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -1457,7 +1457,7 @@
 
 void RenderStyle::setTextShadow(std::unique_ptr<ShadowData> shadowData, bool add)
 {
-    ASSERT(!shadowData || (!shadowData->spread() && shadowData->style() == ShadowStyle::Normal));
+    ASSERT(!shadowData || (shadowData->spread().isZero() && shadowData->style() == ShadowStyle::Normal));
 
     auto& rareData = m_rareInheritedData.access();
     if (!add) {
@@ -1955,11 +1955,11 @@
         if (shadow->style() == ShadowStyle::Inset)
             continue;
 
-        auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
-        top = std::min<LayoutUnit>(top, shadow->y() - extentAndSpread);
-        right = std::max<LayoutUnit>(right, shadow->x() + extentAndSpread);
-        bottom = std::max<LayoutUnit>(bottom, shadow->y() + extentAndSpread);
-        left = std::min<LayoutUnit>(left, shadow->x() - extentAndSpread);
+        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
+        top = std::min<LayoutUnit>(top, LayoutUnit(shadow->y().value()) - extentAndSpread);
+        right = std::max<LayoutUnit>(right, LayoutUnit(shadow->x().value()) + extentAndSpread);
+        bottom = std::max<LayoutUnit>(bottom, LayoutUnit(shadow->y().value()) + extentAndSpread);
+        left = std::min<LayoutUnit>(left, LayoutUnit(shadow->x().value()) - extentAndSpread);
     }
     
     return { top, right, bottom, left };
@@ -1976,11 +1976,11 @@
         if (shadow->style() == ShadowStyle::Normal)
             continue;
 
-        auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
-        top = std::max<LayoutUnit>(top, shadow->y() + extentAndSpread);
-        right = std::min<LayoutUnit>(right, shadow->x() - extentAndSpread);
-        bottom = std::min<LayoutUnit>(bottom, shadow->y() - extentAndSpread);
-        left = std::max<LayoutUnit>(left, shadow->x() + extentAndSpread);
+        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
+        top = std::max<LayoutUnit>(top, LayoutUnit(shadow->y().value()) + extentAndSpread);
+        right = std::min<LayoutUnit>(right, LayoutUnit(shadow->x().value()) - extentAndSpread);
+        bottom = std::min<LayoutUnit>(bottom, LayoutUnit(shadow->y().value()) - extentAndSpread);
+        left = std::max<LayoutUnit>(left, LayoutUnit(shadow->x().value()) + extentAndSpread);
     }
 
     return { top, right, bottom, left };
@@ -1995,9 +1995,9 @@
         if (shadow->style() == ShadowStyle::Inset)
             continue;
 
-        auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
-        left = std::min<LayoutUnit>(left, shadow->x() - extentAndSpread);
-        right = std::max<LayoutUnit>(right, shadow->x() + extentAndSpread);
+        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
+        left = std::min<LayoutUnit>(left, LayoutUnit(shadow->x().value()) - extentAndSpread);
+        right = std::max<LayoutUnit>(right, LayoutUnit(shadow->x().value()) + extentAndSpread);
     }
 }
 
@@ -2010,9 +2010,9 @@
         if (shadow->style() == ShadowStyle::Inset)
             continue;
 
-        auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
-        top = std::min<LayoutUnit>(top, shadow->y() - extentAndSpread);
-        bottom = std::max<LayoutUnit>(bottom, shadow->y() + extentAndSpread);
+        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
+        top = std::min<LayoutUnit>(top, LayoutUnit(shadow->y().intValue()) - extentAndSpread);
+        bottom = std::max<LayoutUnit>(bottom, LayoutUnit(shadow->y().intValue()) + extentAndSpread);
     }
 }
 

Modified: trunk/Source/WebCore/rendering/style/ShadowData.cpp (282767 => 282768)


--- trunk/Source/WebCore/rendering/style/ShadowData.cpp	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/style/ShadowData.cpp	2021-09-20 19:23:54 UTC (rev 282768)
@@ -28,7 +28,7 @@
 namespace WebCore {
 
 ShadowData::ShadowData(const ShadowData& o)
-    : m_location(o.m_location)
+    : m_location(o.m_location.x(), o.m_location.y())
     , m_spread(o.m_spread)
     , m_radius(o.m_radius)
     , m_color(o.m_color)
@@ -61,12 +61,12 @@
 static inline void calculateShadowExtent(const ShadowData* shadow, LayoutUnit additionalOutlineSize, LayoutUnit& shadowLeft, LayoutUnit& shadowRight, LayoutUnit& shadowTop, LayoutUnit& shadowBottom)
 {
     do {
-        LayoutUnit extentAndSpread = shadow->paintingExtent() + shadow->spread() + additionalOutlineSize;
+        LayoutUnit extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value()) + additionalOutlineSize;
         if (shadow->style() == ShadowStyle::Normal) {
-            shadowLeft = std::min(shadow->x() - extentAndSpread, shadowLeft);
-            shadowRight = std::max(shadow->x() + extentAndSpread, shadowRight);
-            shadowTop = std::min(shadow->y() - extentAndSpread, shadowTop);
-            shadowBottom = std::max(shadow->y() + extentAndSpread, shadowBottom);
+            shadowLeft = std::min(LayoutUnit(shadow->x().value()) - extentAndSpread, shadowLeft);
+            shadowRight = std::max(LayoutUnit(shadow->x().value()) + extentAndSpread, shadowRight);
+            shadowTop = std::min(LayoutUnit(shadow->y().value()) - extentAndSpread, shadowTop);
+            shadowBottom = std::max(LayoutUnit(shadow->y().value()) + extentAndSpread, shadowBottom);
         }
 
         shadow = shadow->next();

Modified: trunk/Source/WebCore/rendering/style/ShadowData.h (282767 => 282768)


--- trunk/Source/WebCore/rendering/style/ShadowData.h	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/rendering/style/ShadowData.h	2021-09-20 19:23:54 UTC (rev 282768)
@@ -27,6 +27,8 @@
 #include "Color.h"
 #include "FloatRect.h"
 #include "LayoutRect.h"
+#include "Length.h"
+#include "LengthPoint.h"
 
 namespace WebCore {
 
@@ -39,8 +41,8 @@
 public:
     ShadowData() = default;
 
-    ShadowData(const LayoutPoint& location, int radius, LayoutUnit spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
-        : m_location(location)
+    ShadowData(const LengthPoint& location, Length radius, Length spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
+        : m_location(location.x(), location.y())
         , m_spread(spread)
         , m_radius(radius)
         , m_color(color)
@@ -60,10 +62,10 @@
         return !(*this == o);
     }
     
-    LayoutUnit x() const { return m_location.x(); }
-    LayoutUnit y() const { return m_location.y(); }
-    LayoutPoint location() const { return m_location; }
-    int radius() const { return m_radius; }
+    const Length& x() const { return m_location.x(); }
+    const Length& y() const { return m_location.y(); }
+    const LengthPoint& location() const { return m_location; }
+    const Length& radius() const { return m_radius; }
     LayoutUnit paintingExtent() const
     {
         // Blurring uses a Gaussian function whose std. deviation is m_radius/2, and which in theory
@@ -70,9 +72,9 @@
         // extends to infinity. In 8-bit contexts, however, rounding causes the effect to become
         // undetectable at around 1.4x the radius.
         const float radiusExtentMultiplier = 1.4;
-        return LayoutUnit(ceilf(m_radius * radiusExtentMultiplier));
+        return LayoutUnit(ceilf(m_radius.value() * radiusExtentMultiplier));
     }
-    LayoutUnit spread() const { return m_spread; }
+    const Length& spread() const { return m_spread; }
     ShadowStyle style() const { return m_style; }
 
     void setColor(const Color& color) { m_color = color; }
@@ -87,9 +89,9 @@
     void adjustRectForShadow(FloatRect&, int additionalOutlineSize = 0) const;
 
 private:
-    LayoutPoint m_location;
-    LayoutUnit m_spread;
-    int m_radius { 0 }; // This is the "blur radius", or twice the standard deviation of the Gaussian blur.
+    LengthPoint m_location;
+    Length m_spread;
+    Length m_radius; // This is the "blur radius", or twice the standard deviation of the Gaussian blur.
     Color m_color;
     ShadowStyle m_style { ShadowStyle::Normal };
     bool m_isWebkitBoxShadow { false };

Modified: trunk/Source/WebCore/style/StyleBuilderCustom.h (282767 => 282768)


--- trunk/Source/WebCore/style/StyleBuilderCustom.h	2021-09-20 19:08:39 UTC (rev 282767)
+++ trunk/Source/WebCore/style/StyleBuilderCustom.h	2021-09-20 19:23:54 UTC (rev 282768)
@@ -945,10 +945,10 @@
     for (auto& item : downcast<CSSValueList>(value)) {
         auto& shadowValue = downcast<CSSShadowValue>(item.get());
         auto conversionData = builderState.cssToLengthConversionData();
-        auto x = shadowValue.x->computeLength<LayoutUnit>(conversionData);
-        auto y = shadowValue.y->computeLength<LayoutUnit>(conversionData);
-        int blur = shadowValue.blur ? shadowValue.blur->computeLength<int>(conversionData) : 0;
-        auto spread = shadowValue.spread ? shadowValue.spread->computeLength<LayoutUnit>(conversionData) : LayoutUnit(0);
+        auto x = shadowValue.x->computeLength<Length>(conversionData);
+        auto y = shadowValue.y->computeLength<Length>(conversionData);
+        auto blur = shadowValue.blur ? shadowValue.blur->computeLength<Length>(conversionData) : Length(0, LengthType::Fixed);
+        auto spread = shadowValue.spread ? shadowValue.spread->computeLength<Length>(conversionData) : Length(0, LengthType::Fixed);
         ShadowStyle shadowStyle = shadowValue.style && shadowValue.style->valueID() == CSSValueInset ? ShadowStyle::Inset : ShadowStyle::Normal;
         Color color;
         if (shadowValue.color)
@@ -956,7 +956,7 @@
         else
             color = builderState.style().color();
 
-        auto shadowData = makeUnique<ShadowData>(LayoutPoint(x, y), blur, spread, shadowStyle, property == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparentBlack);
+        auto shadowData = makeUnique<ShadowData>(LengthPoint(x, y), blur, spread, shadowStyle, property == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparentBlack);
         if (property == CSSPropertyTextShadow)
             builderState.style().setTextShadow(WTFMove(shadowData), !isFirstEntry); // add to the list if this is not the first entry
         else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to