Changeset 284437 in webkit


Ignore:
Timestamp:
Oct 18, 2021 11:45:59 PM (9 months ago)
Author:
graouts@webkit.org
Message:

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

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):

  • platform/mac/WebCoreNSFontManagerExtras.mm:

(WebCore::computedFontAttributeChanges):

  • 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):

Location:
trunk
Files:
2 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r284436 r284437  
     12021-10-18  Antoine Quint  <graouts@webkit.org>
     2
     3        box-shadow and text-shadow do not yield float values while interpolating
     4        https://bugs.webkit.org/show_bug.cgi?id=230347
     5        <rdar://problem/83319111>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Add some new WPT tests for float and calc() values for box-shadow and text-shadow while
     10        interpolating and update output for still-failing composite operations tests. The new tests
     11        have already landed in WPT with https://github.com/web-platform-tests/wpt/pull/30823.
     12
     13        * web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt:
     14        * web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
     15        * web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html:
     16        * web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html: Added.
     17        * web-platform-tests/css/css-backgrounds/box-shadow-calc.html: Added.
     18        * web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt:
     19        * web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
     20        * web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html:
     21
    1222021-10-18  Cameron McCormack  <heycam@apple.com>
    223
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt

    r282826 r284437  
    2525FAIL 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 "
    2626FAIL 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 "
    27 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 "
     27FAIL 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 "
    2828FAIL 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 "
    29 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 "
     29FAIL 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 "
    3030PASS 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]
    31 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 "
    32 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 "
     31FAIL 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 "
     32FAIL 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 "
    3333PASS 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]
    34 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 "
     34FAIL 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 "
    3535FAIL 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 "
    3636FAIL 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 "
    37 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 "
     37FAIL 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 "
    3838FAIL 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 "
    39 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 "
     39FAIL 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 "
    4040FAIL 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 "
    41 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 "
     41FAIL 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 "
    4242
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt

    r282826 r284437  
    120120PASS 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]
    121121PASS 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]
     122PASS 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]
     123PASS 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]
     124PASS 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]
     125PASS 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]
     126PASS 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]
     127PASS 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]
     128PASS 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]
     129PASS 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]
     130PASS 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]
     131PASS 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]
     132PASS 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]
     133PASS 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]
     134PASS 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]
     135PASS 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]
     136PASS 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]
     137PASS 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]
     138PASS 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]
     139PASS 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]
     140PASS 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]
     141PASS 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]
     142PASS 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]
     143PASS 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]
     144PASS 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]
     145PASS 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]
     146PASS 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]
     147PASS 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]
     148PASS 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]
     149PASS 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]
     150PASS 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]
     151PASS 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]
     152PASS 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]
     153PASS 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]
     154PASS 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]
     155PASS 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]
     156PASS 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]
     157PASS 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]
     158PASS 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]
     159PASS 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]
     160PASS 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]
     161PASS 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]
     162PASS 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]
     163PASS 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]
     164PASS 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]
     165PASS 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]
     166PASS 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]
     167PASS 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]
     168PASS 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]
     169PASS 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]
    122170PASS 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]
    123171PASS 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]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html

    r282826 r284437  
    9595]);
    9696
     97test_interpolation({
     98  property: 'box-shadow',
     99  from: '0px 0px 0px 0px black',
     100  to: '1px 1px 1px 1px black',
     101}, [
     102  {at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px'},
     103  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px 0px'},
     104  {at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px'},
     105  {at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px'},
     106  {at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px 1px'},
     107  {at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px'},
     108]);
     109
     110test_interpolation({
     111  property: 'box-shadow',
     112  from: '0px 0px 0px 0px black',
     113  to: 'calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) calc(1em + 10px) black',
     114}, [
     115  {at: -0.3, expect: 'rgb(0, 0, 0) -3.9px -3.9px 0px -3.9px'},
     116  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px 0px'},
     117  {at: 0.3, expect: 'rgb(0, 0, 0) 3.9px 3.9px 3.9px 3.9px'},
     118  {at: 0.6, expect: 'rgb(0, 0, 0) 7.8px 7.8px 7.8px 7.8px'},
     119  {at: 1, expect: 'rgb(0, 0, 0) 13px 13px 13px 13px'},
     120  {at: 1.5, expect: 'rgb(0, 0, 0) 19.5px 19.5px 19.5px 19.5px'},
     121]);
     122
    97123// Test with color as first value.
    98124test_interpolation({
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt

    r282826 r284437  
    1515FAIL 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 "
    1616FAIL 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 "
    17 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 "
     17FAIL 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 "
    1818FAIL 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 "
    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 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 "
     19FAIL 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 "
    2020PASS 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]
    21 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 "
    22 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 "
     21FAIL 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 "
     22FAIL 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 "
    2323PASS 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]
    24 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 "
     24FAIL 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 "
    2525FAIL 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 "
    2626FAIL 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 "
    27 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 "
     27FAIL 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 "
    2828FAIL 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 "
    29 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 "
     29FAIL 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 "
    3030FAIL 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 "
    31 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 "
     31FAIL 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 "
    3232
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt

    r282826 r284437  
    144144PASS 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]
    145145PASS 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]
     146PASS 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]
     147PASS 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]
     148PASS 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]
     149PASS 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]
     150PASS 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]
     151PASS 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]
     152PASS 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]
     153PASS 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]
     154PASS 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]
     155PASS 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]
     156PASS 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]
     157PASS 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]
     158PASS 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]
     159PASS 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]
     160PASS 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]
     161PASS 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]
     162PASS 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]
     163PASS 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]
     164PASS 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]
     165PASS 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]
     166PASS 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]
     167PASS 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]
     168PASS 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]
     169PASS 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]
     170PASS 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]
     171PASS 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]
     172PASS 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]
     173PASS 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]
     174PASS 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]
     175PASS 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]
     176PASS 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]
     177PASS 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]
     178PASS 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]
     179PASS 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]
     180PASS 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]
     181PASS 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]
     182PASS 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]
     183PASS 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]
     184PASS 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]
     185PASS 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]
     186PASS 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]
     187PASS 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]
     188PASS 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]
     189PASS 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]
     190PASS 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]
     191PASS 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]
     192PASS 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]
     193PASS 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]
    146194
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html

    r282826 r284437  
    107107  {at: 1.5, expect: 'rgb(0, 192, 0) 10px 10px 10px'},
    108108]);
     109
     110test_interpolation({
     111  property: 'text-shadow',
     112  from: 'black 0px 0px 0px',
     113  to: 'black 1px 1px 1px',
     114}, [
     115  {at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px'},
     116  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px'},
     117  {at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px'},
     118  {at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px'},
     119  {at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px'},
     120  {at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px'},
     121]);
     122
     123test_interpolation({
     124  property: 'text-shadow',
     125  from: 'black 0px 0px 0px',
     126  to: 'black calc(1em + 10px) calc(1em + 10px) calc(1em + 10px)',
     127}, [
     128  {at: -0.3, expect: 'rgb(0, 0, 0) -27px -27px 0px'},
     129  {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px'},
     130  {at: 0.3, expect: 'rgb(0, 0, 0) 27px 27px 27px'},
     131  {at: 0.6, expect: 'rgb(0, 0, 0) 54px 54px 54px'},
     132  {at: 1, expect: 'rgb(0, 0, 0) 90px 90px 90px'},
     133  {at: 1.5, expect: 'rgb(0, 0, 0) 135px 135px 135px'},
     134]);
    109135</script>
    110136</body>
  • trunk/Source/WebCore/ChangeLog

    r284436 r284437  
     12021-10-18  Antoine Quint  <graouts@webkit.org>
     2
     3        box-shadow and text-shadow do not yield float values while interpolating
     4        https://bugs.webkit.org/show_bug.cgi?id=230347
     5        <rdar://problem/83319111>
     6
     7        Reviewed by Simon Fraser.
     8
     9        ShadowData members used integer values rather than floats and thus could not represent
     10        float values while interpolating. We now use float values.
     11
     12        Test: imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html
     13
     14        * animation/CSSPropertyAnimation.cpp:
     15        (WebCore::blendFunc):
     16        (WebCore::shadowForBlending):
     17        * css/CSSComputedStyleDeclaration.cpp:
     18        (WebCore::ComputedStyleExtractor::valueForFilter):
     19        * display/css/DisplayBoxDecorationPainter.cpp:
     20        (WebCore::Display::BoxDecorationPainter::paintBoxShadow const):
     21        * editing/Editor.cpp:
     22        (WebCore::Editor::fontAttributesAtSelectionStart):
     23        * platform/LengthPoint.h:
     24        (WebCore::LengthPoint::isZero const):
     25        * platform/mac/WebCoreNSFontManagerExtras.mm:
     26        (WebCore::computedFontAttributeChanges):
     27        * rendering/LegacyEllipsisBox.cpp:
     28        (WebCore::LegacyEllipsisBox::paint):
     29        * rendering/RenderBoxModelObject.cpp:
     30        (WebCore::applyBoxShadowForBackground):
     31        (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
     32        (WebCore::RenderBoxModelObject::paintBoxShadow):
     33        * rendering/TextBoxPainter.cpp:
     34        (WebCore::TextBoxPainter::debugTextShadow const):
     35        * rendering/TextDecorationPainter.cpp:
     36        (WebCore::TextDecorationPainter::paintTextDecoration):
     37        * rendering/TextPainter.cpp:
     38        (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
     39        * rendering/style/RenderStyle.cpp:
     40        (WebCore::RenderStyle::setTextShadow):
     41        (WebCore::RenderStyle::shadowExtent):
     42        (WebCore::RenderStyle::shadowInsetExtent):
     43        (WebCore::RenderStyle::getShadowHorizontalExtent):
     44        (WebCore::RenderStyle::getShadowVerticalExtent):
     45        * rendering/style/ShadowData.cpp:
     46        (WebCore::ShadowData::ShadowData):
     47        (WebCore::calculateShadowExtent):
     48        * rendering/style/ShadowData.h:
     49        (WebCore::ShadowData::ShadowData):
     50        (WebCore::ShadowData::x const):
     51        (WebCore::ShadowData::y const):
     52        (WebCore::ShadowData::location const):
     53        (WebCore::ShadowData::radius const):
     54        (WebCore::ShadowData::paintingExtent const):
     55        (WebCore::ShadowData::spread const):
     56        * style/StyleBuilderCustom.h:
     57        (WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):
     58
    1592021-10-18  Cameron McCormack  <heycam@apple.com>
    260
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r284361 r284437  
    149149
    150150    return makeUnique<ShadowData>(blend(from->location(), to->location(), context),
    151         std::max(0, blend(from->radius(), to->radius(), context)),
     151        blend(from->radius(), to->radius(), context, ValueRange::NonNegative),
    152152        blend(from->spread(), to->spread(), context),
    153153        blendFunc(from->style(), to->style(), context),
     
    12131213static inline const ShadowData* shadowForBlending(const ShadowData* srcShadow, const ShadowData* otherShadow)
    12141214{
    1215     static NeverDestroyed<ShadowData> defaultShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, false, Color::transparentBlack);
    1216     static NeverDestroyed<ShadowData> defaultInsetShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, false, Color::transparentBlack);
    1217     static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, true, Color::transparentBlack);
    1218     static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, true, Color::transparentBlack);
     1215    static NeverDestroyed<ShadowData> defaultShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Normal, false, Color::transparentBlack);
     1216    static NeverDestroyed<ShadowData> defaultInsetShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Inset, false, Color::transparentBlack);
     1217    static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Normal, true, Color::transparentBlack);
     1218    static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(LengthType::Fixed), Length(LengthType::Fixed), ShadowStyle::Inset, true, Color::transparentBlack);
    12191219
    12201220    if (srcShadow)
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r284361 r284437  
    800800                filterValue = CSSFunctionValue::create(CSSValueDropShadow);
    801801                // We want our computed style to look like that of a text shadow (has neither spread nor inset style).
    802                 ShadowData shadowData = ShadowData(dropShadowOperation.location(), dropShadowOperation.stdDeviation(), 0, ShadowStyle::Normal, false, dropShadowOperation.color());
     802                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());
    803803                filterValue->append(valueForShadow(&shadowData, CSSPropertyTextShadow, style, adjust));
    804804                break;
  • trunk/Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp

    r282826 r284437  
    12691269    auto paintNormalShadow = [&](const ShadowData& shadow) {
    12701270        // 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.
    1271         auto shadowOffset = roundSizeToDevicePixels({ shadow.x(), shadow.y() }, paintingContext.deviceScaleFactor);
     1271        auto shadowOffset = roundSizeToDevicePixels({ shadow.x().value(), shadow.y().value() }, paintingContext.deviceScaleFactor);
    12721272        float shadowPaintingExtent = ceilToDevicePixel(shadow.paintingExtent(), paintingContext.deviceScaleFactor);
    1273         float shadowSpread = roundToDevicePixel(shadow.spread(), paintingContext.deviceScaleFactor);
    1274         int shadowRadius = shadow.radius();
     1273        float shadowSpread = roundToDevicePixel(shadow.spread().value(), paintingContext.deviceScaleFactor);
     1274        auto shadowRadius = shadow.radius();
    12751275
    12761276        auto fillRect = borderRect;
     
    12991299        auto adjustedShadowOffset = shadowRectOrigin - adjustedFillRect.rect().location();
    13001300
    1301         paintingContext.context.setShadow(adjustedShadowOffset, shadowRadius, shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
     1301        paintingContext.context.setShadow(adjustedShadowOffset, shadowRadius.value(), shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
    13021302
    13031303        if (hasBorderRadius) {
     
    13401340
    13411341    auto paintInsetShadow = [&](const ShadowData& shadow) {
    1342         auto shadowOffset = roundSizeToDevicePixels({ shadow.x(), shadow.y() }, paintingContext.deviceScaleFactor);
     1342        auto shadowOffset = roundSizeToDevicePixels({ shadow.x().value(), shadow.y().value() }, paintingContext.deviceScaleFactor);
    13431343        float shadowPaintingExtent = ceilToDevicePixel(shadow.paintingExtent(), paintingContext.deviceScaleFactor);
    1344         float shadowSpread = roundToDevicePixel(shadow.spread(), paintingContext.deviceScaleFactor);
    1345         int shadowRadius = shadow.radius();
     1344        float shadowSpread = roundToDevicePixel(shadow.spread().value(), paintingContext.deviceScaleFactor);
     1345        auto shadowRadius = shadow.radius();
    13461346
    13471347        auto holeRect = borderRect.rect();
     
    14101410        shadowOffset -= extraOffset;
    14111411
    1412         paintingContext.context.setShadow(shadowOffset, shadowRadius, shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
     1412        paintingContext.context.setShadow(shadowOffset, shadowRadius.value(), shadow.color(), shadow.isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
    14131413        paintingContext.context.fillRectWithRoundedHole(shadowCastingRect, roundedHoleRect, fillColor);
    14141414    };
     
    14191419            continue;
    14201420
    1421         LayoutSize shadowOffset(shadow->x(), shadow->y());
    1422         if (shadowOffset.isZero() && !shadow->radius() && !shadow->spread())
     1421        LayoutSize shadowOffset(shadow->x().value(), shadow->y().value());
     1422        if (shadowOffset.isZero() && shadow->radius().isZero() && shadow->spread().isZero())
    14231423            continue;
    14241424
  • trunk/Source/WebCore/editing/Editor.cpp

    r284095 r284437  
    40374037
    40384038    if (auto* shadowData = style->textShadow())
    4039         attributes.fontShadow = { shadowData->color(), { static_cast<float>(shadowData->x()), static_cast<float>(shadowData->y()) }, static_cast<double>(shadowData->radius()) };
     4039        attributes.fontShadow = { shadowData->color(), { shadowData->x().value(), shadowData->y().value() }, shadowData->radius().value() };
    40404040
    40414041    switch (style->verticalAlign()) {
  • trunk/Source/WebCore/platform/LengthPoint.h

    r282826 r284437  
    6060    const Length& y() const { return m_y; }
    6161
     62    bool isZero() const { return m_x.isZero() && m_y.isZero(); }
     63
    6264private:
    6365    // FIXME: it would be nice to pack the two Lengths together better somehow (to avoid padding between them).
  • trunk/Source/WebCore/platform/mac/WebCoreNSFontManagerExtras.mm

    r236854 r284437  
    3131#import "ColorMac.h"
    3232#import "FontAttributeChanges.h"
     33#import "LayoutUnit.h"
    3334#import <AppKit/NSFontManager.h>
    3435
     
    137138    NSShadow *convertedShadow = [convertedAttributesA objectForKey:NSShadowAttributeName];
    138139    if (convertedShadow) {
    139         FloatSize offset { static_cast<float>(convertedShadow.shadowOffset.width), static_cast<float>(convertedShadow.shadowOffset.height) };
     140        FloatSize offset { LayoutUnit::fromFloatRound(static_cast<float>(convertedShadow.shadowOffset.width)).toFloat(), LayoutUnit::fromFloatRound(static_cast<float>(convertedShadow.shadowOffset.height)).toFloat() };
    140141        changes.setShadow({ colorFromNSColor(convertedShadow.shadowColor ?: NSColor.blackColor), offset, convertedShadow.shadowBlurRadius });
    141142    } else if (![convertedAttributesB objectForKey:NSShadowAttributeName])
  • trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp

    r282826 r284437  
    5656    if (lineStyle.textShadow()) {
    5757        Color shadowColor = lineStyle.colorByApplyingColorFilter(lineStyle.textShadow()->color());
    58         context.setShadow(LayoutSize(lineStyle.textShadow()->x(), lineStyle.textShadow()->y()), lineStyle.textShadow()->radius(), shadowColor);
     58        context.setShadow(LayoutSize(lineStyle.textShadow()->x().value(), lineStyle.textShadow()->y().value()), lineStyle.textShadow()->radius().value(), shadowColor);
    5959        setShadow = true;
    6060    }
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r284380 r284437  
    704704        boxShadow = boxShadow->next();
    705705
    706     FloatSize shadowOffset(boxShadow->x(), boxShadow->y());
    707     context.setShadow(shadowOffset, boxShadow->radius(), style.colorByApplyingColorFilter(boxShadow->color()), boxShadow->isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
     706    FloatSize shadowOffset(boxShadow->x().value(), boxShadow->y().value());
     707    context.setShadow(shadowOffset, boxShadow->radius().value(), style.colorByApplyingColorFilter(boxShadow->color()), boxShadow->isWebkitBoxShadow() ? ShadowRadiusMode::Legacy : ShadowRadiusMode::Default);
    708708}
    709709
     
    23552355        hasOneNormalBoxShadow = true;
    23562356
    2357         if (currentShadow->spread())
     2357        if (!currentShadow->spread().isZero())
    23582358            return false;
    23592359    }
     
    24302430            continue;
    24312431
    2432         LayoutSize shadowOffset(shadow->x(), shadow->y());
     2432        LayoutSize shadowOffset(shadow->x().value(), shadow->y().value());
    24332433        LayoutUnit shadowPaintingExtent = shadow->paintingExtent();
    2434         LayoutUnit shadowSpread = shadow->spread();
    2435         int shadowRadius = shadow->radius();
     2434        LayoutUnit shadowSpread = LayoutUnit(shadow->spread().value());
     2435        auto shadowRadius = shadow->radius().value();
    24362436
    24372437        if (shadowOffset.isZero() && !shadowRadius && !shadowSpread)
  • trunk/Source/WebCore/rendering/TextBoxPainter.cpp

    r284334 r284437  
    624624        return nullptr;
    625625
    626     static NeverDestroyed<ShadowData> debugTextShadow(IntPoint(0, 0), 10, 20, ShadowStyle::Normal, true, SRGBA<uint8_t> { 150, 0, 0, 190 });
     626    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 });
    627627    return &debugTextShadow.get();
    628628}
  • trunk/Source/WebCore/rendering/TextDecorationPainter.cpp

    r283464 r284437  
    247247        && (!m_decorations.contains(TextDecoration::LineThrough) || m_styles.linethroughColor.isOpaque());
    248248
    249     int extraOffset = 0;
     249    float extraOffset = 0;
    250250    bool clipping = !areLinesOpaque && m_shadow && m_shadow->next();
    251251    if (clipping) {
     
    255255            FloatRect shadowRect(localOrigin, FloatSize(m_width, fontMetrics.ascent() + 2));
    256256            shadowRect.inflate(shadowExtent);
    257             int shadowX = m_isHorizontal ? shadow->x() : shadow->y();
    258             int shadowY = m_isHorizontal ? shadow->y() : -shadow->x();
     257            float shadowX = LayoutUnit(m_isHorizontal ? shadow->x().value() : shadow->y().value());
     258            float shadowY = LayoutUnit(m_isHorizontal ? shadow->y().value() : -shadow->x().value());
    259259            shadowRect.move(shadowX, shadowY);
    260260            clipRect.unite(shadowRect);
    261             extraOffset = std::max(extraOffset, std::max(0, shadowY) + shadowExtent);
     261            extraOffset = std::max(extraOffset, std::max(0.f, shadowY) + shadowExtent);
    262262        }
    263263        m_context.save();
     
    275275                extraOffset = 0;
    276276            }
    277             int shadowX = m_isHorizontal ? shadow->x() : shadow->y();
    278             int shadowY = m_isHorizontal ? shadow->y() : -shadow->x();
     277            float shadowX = LayoutUnit(m_isHorizontal ? shadow->x().value() : shadow->y().value());
     278            float shadowY = LayoutUnit(m_isHorizontal ? shadow->y().value() : -shadow->x().value());
    279279           
    280280            Color shadowColor = shadow->color();
    281281            if (m_shadowColorFilter)
    282282                m_shadowColorFilter->transformColor(shadowColor);
    283             m_context.setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius(), shadowColor);
     283            m_context.setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius().value(), shadowColor);
    284284            shadow = shadow->next();
    285285        }
  • trunk/Source/WebCore/rendering/TextPainter.cpp

    r282961 r284437  
    5151    }
    5252
    53     int shadowX = orientation == FontOrientation::Horizontal ? shadow->x() : shadow->y();
    54     int shadowY = orientation == FontOrientation::Horizontal ? shadow->y() : -shadow->x();
     53    float shadowX = orientation == FontOrientation::Horizontal ? shadow->x().value() : shadow->y().value();
     54    float shadowY = orientation == FontOrientation::Horizontal ? shadow->y().value() : -shadow->x().value();
    5555    FloatSize shadowOffset(shadowX, shadowY);
    56     int shadowRadius = shadow->radius();
     56    auto shadowRadius = shadow->radius();
    5757    Color shadowColor = shadow->color();
    5858    if (colorFilter)
     
    7070
    7171        m_didSaveContext = true;
    72         m_extraOffset = FloatSize(0, 2 * shadowRect.height() + std::max(0.0f, shadowOffset.height()) + shadowRadius);
     72        m_extraOffset = FloatSize(0, 2 * shadowRect.height() + std::max(0.0f, shadowOffset.height()) + shadowRadius.value());
    7373        shadowOffset -= m_extraOffset;
    7474    }
    7575
    7676    if (!m_avoidDrawingShadow)
    77         context.setShadow(shadowOffset, shadowRadius, shadowColor);
     77        context.setShadow(shadowOffset, shadowRadius.value(), shadowColor);
    7878}
    7979
     
    8585inline bool ShadowApplier::shadowIsCompletelyCoveredByText(bool textIsOpaque)
    8686{
    87     return textIsOpaque && m_shadow && m_shadow->location().isZero() && !m_shadow->radius();
     87    return textIsOpaque && m_shadow && m_shadow->location().isZero() && m_shadow->radius().isZero();
    8888}
    8989
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r284225 r284437  
    14611461void RenderStyle::setTextShadow(std::unique_ptr<ShadowData> shadowData, bool add)
    14621462{
    1463     ASSERT(!shadowData || (!shadowData->spread() && shadowData->style() == ShadowStyle::Normal));
     1463    ASSERT(!shadowData || (shadowData->spread().isZero() && shadowData->style() == ShadowStyle::Normal));
    14641464
    14651465    auto& rareData = m_rareInheritedData.access();
     
    19691969            continue;
    19701970
    1971         auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
    1972         top = std::min<LayoutUnit>(top, shadow->y() - extentAndSpread);
    1973         right = std::max<LayoutUnit>(right, shadow->x() + extentAndSpread);
    1974         bottom = std::max<LayoutUnit>(bottom, shadow->y() + extentAndSpread);
    1975         left = std::min<LayoutUnit>(left, shadow->x() - extentAndSpread);
     1971        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
     1972        top = std::min<LayoutUnit>(top, LayoutUnit(shadow->y().value()) - extentAndSpread);
     1973        right = std::max<LayoutUnit>(right, LayoutUnit(shadow->x().value()) + extentAndSpread);
     1974        bottom = std::max<LayoutUnit>(bottom, LayoutUnit(shadow->y().value()) + extentAndSpread);
     1975        left = std::min<LayoutUnit>(left, LayoutUnit(shadow->x().value()) - extentAndSpread);
    19761976    }
    19771977   
     
    19901990            continue;
    19911991
    1992         auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
    1993         top = std::max<LayoutUnit>(top, shadow->y() + extentAndSpread);
    1994         right = std::min<LayoutUnit>(right, shadow->x() - extentAndSpread);
    1995         bottom = std::min<LayoutUnit>(bottom, shadow->y() - extentAndSpread);
    1996         left = std::max<LayoutUnit>(left, shadow->x() + extentAndSpread);
     1992        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
     1993        top = std::max<LayoutUnit>(top, LayoutUnit(shadow->y().value()) + extentAndSpread);
     1994        right = std::min<LayoutUnit>(right, LayoutUnit(shadow->x().value()) - extentAndSpread);
     1995        bottom = std::min<LayoutUnit>(bottom, LayoutUnit(shadow->y().value()) - extentAndSpread);
     1996        left = std::max<LayoutUnit>(left, LayoutUnit(shadow->x().value()) + extentAndSpread);
    19971997    }
    19981998
     
    20092009            continue;
    20102010
    2011         auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
    2012         left = std::min<LayoutUnit>(left, shadow->x() - extentAndSpread);
    2013         right = std::max<LayoutUnit>(right, shadow->x() + extentAndSpread);
     2011        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
     2012        left = std::min<LayoutUnit>(left, LayoutUnit(shadow->x().value()) - extentAndSpread);
     2013        right = std::max<LayoutUnit>(right, LayoutUnit(shadow->x().value()) + extentAndSpread);
    20142014    }
    20152015}
     
    20242024            continue;
    20252025
    2026         auto extentAndSpread = shadow->paintingExtent() + shadow->spread();
    2027         top = std::min<LayoutUnit>(top, shadow->y() - extentAndSpread);
    2028         bottom = std::max<LayoutUnit>(bottom, shadow->y() + extentAndSpread);
     2026        auto extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value());
     2027        top = std::min<LayoutUnit>(top, LayoutUnit(shadow->y().intValue()) - extentAndSpread);
     2028        bottom = std::max<LayoutUnit>(bottom, LayoutUnit(shadow->y().intValue()) + extentAndSpread);
    20292029    }
    20302030}
  • trunk/Source/WebCore/rendering/style/ShadowData.cpp

    r282826 r284437  
    2929
    3030ShadowData::ShadowData(const ShadowData& o)
    31     : m_location(o.m_location)
     31    : m_location(o.m_location.x(), o.m_location.y())
    3232    , m_spread(o.m_spread)
    3333    , m_radius(o.m_radius)
     
    6262{
    6363    do {
    64         LayoutUnit extentAndSpread = shadow->paintingExtent() + shadow->spread() + additionalOutlineSize;
     64        LayoutUnit extentAndSpread = shadow->paintingExtent() + LayoutUnit(shadow->spread().value()) + additionalOutlineSize;
    6565        if (shadow->style() == ShadowStyle::Normal) {
    66             shadowLeft = std::min(shadow->x() - extentAndSpread, shadowLeft);
    67             shadowRight = std::max(shadow->x() + extentAndSpread, shadowRight);
    68             shadowTop = std::min(shadow->y() - extentAndSpread, shadowTop);
    69             shadowBottom = std::max(shadow->y() + extentAndSpread, shadowBottom);
     66            shadowLeft = std::min(LayoutUnit(shadow->x().value()) - extentAndSpread, shadowLeft);
     67            shadowRight = std::max(LayoutUnit(shadow->x().value()) + extentAndSpread, shadowRight);
     68            shadowTop = std::min(LayoutUnit(shadow->y().value()) - extentAndSpread, shadowTop);
     69            shadowBottom = std::max(LayoutUnit(shadow->y().value()) + extentAndSpread, shadowBottom);
    7070        }
    7171
  • trunk/Source/WebCore/rendering/style/ShadowData.h

    r282826 r284437  
    2828#include "FloatRect.h"
    2929#include "LayoutRect.h"
     30#include "Length.h"
     31#include "LengthPoint.h"
    3032
    3133namespace WebCore {
     
    4042    ShadowData() = default;
    4143
    42     ShadowData(const LayoutPoint& location, int radius, LayoutUnit spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
    43         : m_location(location)
     44    ShadowData(const LengthPoint& location, Length radius, Length spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
     45        : m_location(location.x(), location.y())
    4446        , m_spread(spread)
    4547        , m_radius(radius)
     
    6163    }
    6264   
    63     LayoutUnit x() const { return m_location.x(); }
    64     LayoutUnit y() const { return m_location.y(); }
    65     LayoutPoint location() const { return m_location; }
    66     int radius() const { return m_radius; }
     65    const Length& x() const { return m_location.x(); }
     66    const Length& y() const { return m_location.y(); }
     67    const LengthPoint& location() const { return m_location; }
     68    const Length& radius() const { return m_radius; }
    6769    LayoutUnit paintingExtent() const
    6870    {
     
    7173        // undetectable at around 1.4x the radius.
    7274        const float radiusExtentMultiplier = 1.4;
    73         return LayoutUnit(ceilf(m_radius * radiusExtentMultiplier));
     75        return LayoutUnit(ceilf(m_radius.value() * radiusExtentMultiplier));
    7476    }
    75     LayoutUnit spread() const { return m_spread; }
     77    const Length& spread() const { return m_spread; }
    7678    ShadowStyle style() const { return m_style; }
    7779
     
    8890
    8991private:
    90     LayoutPoint m_location;
    91     LayoutUnit m_spread;
    92     int m_radius { 0 }; // This is the "blur radius", or twice the standard deviation of the Gaussian blur.
     92    LengthPoint m_location;
     93    Length m_spread;
     94    Length m_radius; // This is the "blur radius", or twice the standard deviation of the Gaussian blur.
    9395    Color m_color;
    9496    ShadowStyle m_style { ShadowStyle::Normal };
  • trunk/Source/WebCore/style/StyleBuilderCustom.h

    r284225 r284437  
    946946        auto& shadowValue = downcast<CSSShadowValue>(item.get());
    947947        auto conversionData = builderState.cssToLengthConversionData();
    948         auto x = shadowValue.x->computeLength<LayoutUnit>(conversionData);
    949         auto y = shadowValue.y->computeLength<LayoutUnit>(conversionData);
    950         int blur = shadowValue.blur ? shadowValue.blur->computeLength<int>(conversionData) : 0;
    951         auto spread = shadowValue.spread ? shadowValue.spread->computeLength<LayoutUnit>(conversionData) : LayoutUnit(0);
     948        auto x = shadowValue.x->computeLength<Length>(conversionData);
     949        auto y = shadowValue.y->computeLength<Length>(conversionData);
     950        auto blur = shadowValue.blur ? shadowValue.blur->computeLength<Length>(conversionData) : Length(0, LengthType::Fixed);
     951        auto spread = shadowValue.spread ? shadowValue.spread->computeLength<Length>(conversionData) : Length(0, LengthType::Fixed);
    952952        ShadowStyle shadowStyle = shadowValue.style && shadowValue.style->valueID() == CSSValueInset ? ShadowStyle::Inset : ShadowStyle::Normal;
    953953        Color color;
     
    957957            color = builderState.style().color();
    958958
    959         auto shadowData = makeUnique<ShadowData>(LayoutPoint(x, y), blur, spread, shadowStyle, property == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparentBlack);
     959        auto shadowData = makeUnique<ShadowData>(LengthPoint(x, y), blur, spread, shadowStyle, property == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparentBlack);
    960960        if (property == CSSPropertyTextShadow)
    961961            builderState.style().setTextShadow(WTFMove(shadowData), !isFirstEntry); // add to the list if this is not the first entry
Note: See TracChangeset for help on using the changeset viewer.