Changeset 275224 in webkit


Ignore:
Timestamp:
Mar 30, 2021 12:06:46 PM (16 months ago)
Author:
graouts@webkit.org
Message:

Account for "hanging" and "each-line" when blending text-interpolation
https://bugs.webkit.org/show_bug.cgi?id=223914

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt:
  • web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

Location:
trunk
Files:
5 edited

Legend:

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

    r275221 r275224  
     12021-03-30  Antoine Quint  <graouts@webkit.org>
     2
     3        Account for "hanging" and "each-line" when blending text-interpolation
     4        https://bugs.webkit.org/show_bug.cgi?id=223914
     5
     6        Reviewed by Dean Jackson.
     7
     8        * web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt:
     9        * web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:
     10
    1112021-03-30  Antoine Quint  <graouts@webkit.org>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt

    r275199 r275224  
    1919FAIL Compositing: property <text-indent> underlying [50%] from replace [-100%] to add [50%] at (1) should be [100%] assert_equals: expected "100 % " but got "50 % "
    2020FAIL Compositing: property <text-indent> underlying [50%] from replace [-100%] to add [50%] at (1.5) should be [200%] assert_equals: expected "200 % " but got "125 % "
    21 FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (-0.3) should be [20px hanging each-line] assert_equals: expected "20px hanging each - line " but got "20px "
    22 FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0) should be [50px hanging each-line] assert_equals: expected "50px hanging each - line " but got "50px "
    23 FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.3) should be [80px hanging each-line] assert_equals: expected "80px hanging each - line " but got "80px "
    24 FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.6) should be [110px hanging each-line] assert_equals: expected "110px hanging each - line " but got "110px "
    25 FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1) should be [150px hanging each-line] assert_equals: expected "150px hanging each - line " but got "150px "
    26 FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1.5) should be [200px hanging each-line] assert_equals: expected "200px hanging each - line " but got "200px "
    27 FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (-0.3) should be [300px each-line] assert_equals: expected "300px each - line " but got "20px each - line "
     21PASS Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (-0.3) should be [20px hanging each-line]
     22PASS Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0) should be [50px hanging each-line]
     23PASS Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.3) should be [80px hanging each-line]
     24PASS Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.6) should be [110px hanging each-line]
     25PASS Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1) should be [150px hanging each-line]
     26PASS Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1.5) should be [200px hanging each-line]
     27FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (-0.3) should be [300px each-line] assert_equals: expected "300px each - line " but got "50px each - line "
    2828FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0) should be [300px each-line] assert_equals: expected "300px each - line " but got "50px each - line "
    29 FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.3) should be [300px each-line] assert_equals: expected "300px each - line " but got "80px each - line "
    30 FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.6) should be [150px hanging] assert_equals: expected "150px hanging " but got "110px each - line "
    31 FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1) should be [150px hanging] assert_equals: expected "150px hanging " but got "150px each - line "
    32 FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1.5) should be [150px hanging] assert_equals: expected "150px hanging " but got "200px each - line "
     29FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.3) should be [300px each-line] assert_equals: expected "300px each - line " but got "50px each - line "
     30PASS Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.6) should be [150px hanging]
     31PASS Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1) should be [150px hanging]
     32PASS Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1.5) should be [150px hanging]
    3333
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt

    r275199 r275224  
    132132PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging]
    133133PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging]
    134 FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging] assert_equals: expected "- 15px hanging " but got "- 15px "
    135 FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging] assert_equals: expected "0px hanging " but got "0px "
    136 FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging] assert_equals: expected "15px hanging " but got "15px "
    137 FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging] assert_equals: expected "30px hanging " but got "30px "
    138 FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
    139 FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging] assert_equals: expected "75px hanging " but got "75px "
    140 FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging] assert_equals: expected "- 15px hanging " but got "- 15px "
    141 FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging] assert_equals: expected "0px hanging " but got "0px "
    142 FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging] assert_equals: expected "15px hanging " but got "15px "
    143 FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging] assert_equals: expected "30px hanging " but got "30px "
    144 FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
    145 FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging] assert_equals: expected "75px hanging " but got "75px "
     134PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging]
     135PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging]
     136PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging]
     137PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging]
     138PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging]
     139PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging]
     140PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging]
     141PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging]
     142PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging]
     143PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging]
     144PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging]
     145PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging]
    146146PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line]
    147147PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line]
     
    156156PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line]
    157157PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line]
    158 FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_equals: expected "- 15px hanging each - line " but got "- 15px "
    159 FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_equals: expected "0px hanging each - line " but got "0px "
    160 FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_equals: expected "15px hanging each - line " but got "15px "
    161 FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_equals: expected "30px hanging each - line " but got "30px "
    162 FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_equals: expected "50px hanging each - line " but got "50px "
    163 FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_equals: expected "75px hanging each - line " but got "75px "
    164 FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_equals: expected "- 15px hanging each - line " but got "- 15px "
    165 FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_equals: expected "0px hanging each - line " but got "0px "
    166 FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_equals: expected "15px hanging each - line " but got "15px "
    167 FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_equals: expected "30px hanging each - line " but got "30px "
    168 FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_equals: expected "50px hanging each - line " but got "50px "
    169 FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_equals: expected "75px hanging each - line " but got "75px "
    170 FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "- 15px hanging "
    171 FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging] assert_equals: expected "50px hanging " but got "0px hanging "
    172 FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "15px hanging "
    173 FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px hanging "
    174 FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px hanging "
     158PASS CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line]
     159PASS CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line]
     160PASS CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line]
     161PASS CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line]
     162PASS CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line]
     163PASS CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line]
     164PASS Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line]
     165PASS Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line]
     166PASS Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line]
     167PASS Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line]
     168PASS Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line]
     169PASS Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line]
     170PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging]
     171PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging]
     172PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging]
     173PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging]
     174PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging]
    175175PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging]
    176 FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px hanging "
    177 FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "- 15px hanging "
    178 FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging] assert_equals: expected "50px hanging " but got "0px hanging "
    179 FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "15px hanging "
    180 FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px hanging "
    181 FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px hanging "
     176PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging]
     177PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging]
     178PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging]
     179PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging]
     180PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging]
     181PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging]
    182182PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging]
    183 FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px hanging "
    184 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "- 15px "
    185 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line] assert_equals: expected "0px each - line " but got "0px "
    186 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "15px "
    187 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px "
    188 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px "
    189 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
    190 FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px "
    191 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "- 15px "
    192 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line] assert_equals: expected "0px each - line " but got "0px "
    193 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "15px "
    194 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px "
    195 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px "
    196 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
    197 FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px "
    198 FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "- 15px hanging each - line "
    199 FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "0px hanging each - line "
    200 FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "15px hanging each - line "
    201 FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px hanging each - line "
    202 FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px hanging each - line "
     183PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging]
     184PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line]
     185PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line]
     186PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line]
     187PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging]
     188PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging]
     189PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging]
     190PASS CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging]
     191PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line]
     192PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line]
     193PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line]
     194PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging]
     195PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging]
     196PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging]
     197PASS Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging]
     198PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging]
     199PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging]
     200PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging]
     201PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging]
     202PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging]
    203203PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging]
    204 FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px hanging each - line "
    205 FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "- 15px hanging each - line "
    206 FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "0px hanging each - line "
    207 FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "15px hanging each - line "
    208 FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px hanging each - line "
    209 FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px hanging each - line "
     204PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging]
     205PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging]
     206PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging]
     207PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging]
     208PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging]
     209PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging]
    210210PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging]
    211 FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px hanging each - line "
    212 FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px] assert_equals: expected "0px " but got "- 15px "
     211PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging]
     212PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px]
    213213PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [0px]
    214 FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px] assert_equals: expected "0px " but got "15px "
    215 FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px "
    216 FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px "
    217 FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "50px "
    218 FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px "
    219 FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px] assert_equals: expected "0px " but got "- 15px "
     214PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px]
     215PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging]
     216PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging]
     217PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging]
     218PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging]
     219PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px]
    220220PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [0px]
    221 FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px] assert_equals: expected "0px " but got "15px "
    222 FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px "
    223 FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px "
    224 FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "50px "
    225 FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px "
     221PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px]
     222PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging]
     223PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging]
     224PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging]
     225PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging]
    226226
  • trunk/Source/WebCore/ChangeLog

    r275221 r275224  
     12021-03-30  Antoine Quint  <graouts@webkit.org>
     2
     3        Account for "hanging" and "each-line" when blending text-interpolation
     4        https://bugs.webkit.org/show_bug.cgi?id=223914
     5
     6        Reviewed by Dean Jackson.
     7
     8        * animation/CSSPropertyAnimation.cpp:
     9        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     10
    1112021-03-30  Antoine Quint  <graouts@webkit.org>
    212
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r275202 r275224  
    19531953};
    19541954
     1955class TextIndentWrapper final : public LengthPropertyWrapper {
     1956    WTF_MAKE_FAST_ALLOCATED;
     1957public:
     1958    TextIndentWrapper()
     1959        : LengthPropertyWrapper(CSSPropertyTextIndent, &RenderStyle::textIndent, &RenderStyle::setTextIndent, LengthPropertyWrapper::Flags::IsLengthPercentage)
     1960    {
     1961    }
     1962
     1963private:
     1964    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     1965    {
     1966        if (from->textIndentLine() != to->textIndentLine())
     1967            return false;
     1968        if (from->textIndentType() != to->textIndentType())
     1969            return false;
     1970        return LengthPropertyWrapper::canInterpolate(from, to);
     1971    }
     1972
     1973    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1974    {
     1975        auto* blendingStyle = !canInterpolate(from, to) && progress ? to : from;
     1976        destination->setTextIndentLine(blendingStyle->textIndentLine());
     1977        destination->setTextIndentType(blendingStyle->textIndentType());
     1978        LengthPropertyWrapper::blend(client, destination, from, to, progress);
     1979    }
     1980};
     1981
    19551982class PerspectiveWrapper final : public NonNegativeFloatPropertyWrapper {
    19561983    WTF_MAKE_FAST_ALLOCATED;
     
    21742201        new PropertyWrapper<float>(CSSPropertyLetterSpacing, &RenderStyle::letterSpacing, &RenderStyle::setLetterSpacing),
    21752202        new LengthPropertyWrapper(CSSPropertyWordSpacing, &RenderStyle::wordSpacing, &RenderStyle::setWordSpacing),
    2176         new LengthPropertyWrapper(CSSPropertyTextIndent, &RenderStyle::textIndent, &RenderStyle::setTextIndent, LengthPropertyWrapper::Flags::IsLengthPercentage),
     2203        new TextIndentWrapper,
    21772204        new VerticalAlignWrapper,
    21782205
Note: See TracChangeset for help on using the changeset viewer.