⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280721 in webkit


Ignore:
Timestamp:
Aug 6, 2021, 6:42:59 AM (5 years ago)
Author:
Antti Koivisto
Message:

REGRESSION (r274038): Keyframe animation with top/left with percentages fails to animate
https://bugs.webkit.org/show_bug.cgi?id=228811
<rdar://problem/81568266>

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-position/animations/bottom-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/left-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/right-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/top-composition-expected.txt:

Source/WebCore:

r274038 ended up disabling interpolation of percent values for top/left/bottom/right.

Test: animations/top-left-percent-interpolation.html

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

Enable them.

LayoutTests:

  • animations/top-left-percent-interpolation-expected.txt: Added.
  • animations/top-left-percent-interpolation.html: Added.
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r280720 r280721  
     12021-08-06  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r274038): Keyframe animation with top/left with percentages fails to animate
     4        https://bugs.webkit.org/show_bug.cgi?id=228811
     5        <rdar://problem/81568266>
     6
     7        Reviewed by Alan Bujtas.
     8
     9        * animations/top-left-percent-interpolation-expected.txt: Added.
     10        * animations/top-left-percent-interpolation.html: Added.
     11
    1122021-08-06  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r280703 r280721  
     12021-08-06  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r274038): Keyframe animation with top/left with percentages fails to animate
     4        https://bugs.webkit.org/show_bug.cgi?id=228811
     5        <rdar://problem/81568266>
     6
     7        Reviewed by Alan Bujtas.
     8
     9        * web-platform-tests/css/css-position/animations/bottom-composition-expected.txt:
     10        * web-platform-tests/css/css-position/animations/left-composition-expected.txt:
     11        * web-platform-tests/css/css-position/animations/right-composition-expected.txt:
     12        * web-platform-tests/css/css-position/animations/top-composition-expected.txt:
     13
    1142021-08-05  Tim Nguyen  <ntim@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/animations/bottom-composition-expected.txt

    r276138 r280721  
    1010FAIL Compositing: property <bottom> underlying [100px] from add [10px] to add [2px] at (1) should be [102px] assert_equals: expected "102px " but got "2px "
    1111FAIL Compositing: property <bottom> underlying [100px] from add [10px] to add [2px] at (1.5) should be [98px] assert_equals: expected "98px " but got "- 2px "
    12 FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( 0 % + 100px ) "
     12FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( - 6 % + 130px ) "
    1313FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (0) should be [calc(100px + 10%)] assert_equals: expected "calc ( 10 % + 100px ) " but got "calc ( 0 % + 100px ) "
    14 FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "20 % "
     14FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "calc ( 10 % + 50px ) "
    1515FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (1) should be [30%] assert_equals: expected "30 % " but got "20 % "
    16 FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "20 % "
     16FAIL Compositing: property <bottom> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "calc ( 30 % - 50px ) "
    1717FAIL Compositing: property <bottom> underlying [50px] from add [100px] to replace [200px] at (-0.3) should be [135px] assert_equals: expected "135px " but got "70px "
    1818FAIL Compositing: property <bottom> underlying [50px] from add [100px] to replace [200px] at (0) should be [150px] assert_equals: expected "150px " but got "100px "
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/animations/left-composition-expected.txt

    r276138 r280721  
    1010FAIL Compositing: property <left> underlying [100px] from add [10px] to add [2px] at (1) should be [102px] assert_equals: expected "102px " but got "2px "
    1111FAIL Compositing: property <left> underlying [100px] from add [10px] to add [2px] at (1.5) should be [98px] assert_equals: expected "98px " but got "- 2px "
    12 FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( 0 % + 100px ) "
     12FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( - 6 % + 130px ) "
    1313FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (0) should be [calc(100px + 10%)] assert_equals: expected "calc ( 10 % + 100px ) " but got "calc ( 0 % + 100px ) "
    14 FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "20 % "
     14FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "calc ( 10 % + 50px ) "
    1515FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (1) should be [30%] assert_equals: expected "30 % " but got "20 % "
    16 FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "20 % "
    17 FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (-0.3) should be [calc(130px + 13%)] assert_equals: expected "calc ( 13 % + 130px ) " but got "calc ( 0 % + 100px ) "
     16FAIL Compositing: property <left> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "calc ( 30 % - 50px ) "
     17FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (-0.3) should be [calc(130px + 13%)] assert_equals: expected "calc ( 13 % + 130px ) " but got "calc ( 3 % + 130px ) "
    1818FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (0) should be [calc(100px + 10%)] assert_equals: expected "calc ( 10 % + 100px ) " but got "calc ( 0 % + 100px ) "
    19 FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (0.5) should be [calc(50px + 5%)] assert_equals: expected "calc ( 5 % + 50px ) " but got "- 10 % "
     19FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (0.5) should be [calc(50px + 5%)] assert_equals: expected "calc ( 5 % + 50px ) " but got "calc ( - 5 % + 50px ) "
    2020FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (1) should be [0%] assert_equals: expected "0 % " but got "- 10 % "
    21 FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (1.5) should be [calc(-50px - 5%)] assert_equals: expected "calc ( - 5 % - 50px ) " but got "- 10 % "
     21FAIL Compositing: property <left> underlying [10%] from add [100px] to add [-10%] at (1.5) should be [calc(-50px - 5%)] assert_equals: expected "calc ( - 5 % - 50px ) " but got "calc ( - 15 % - 50px ) "
    2222FAIL Compositing: property <left> underlying [50px] from add [100px] to replace [200px] at (-0.3) should be [135px] assert_equals: expected "135px " but got "70px "
    2323FAIL Compositing: property <left> underlying [50px] from add [100px] to replace [200px] at (0) should be [150px] assert_equals: expected "150px " but got "100px "
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/animations/right-composition-expected.txt

    r276138 r280721  
    1010FAIL Compositing: property <right> underlying [100px] from add [10px] to add [2px] at (1) should be [102px] assert_equals: expected "102px " but got "2px "
    1111FAIL Compositing: property <right> underlying [100px] from add [10px] to add [2px] at (1.5) should be [98px] assert_equals: expected "98px " but got "- 2px "
    12 FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( 0 % + 100px ) "
     12FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( - 6 % + 130px ) "
    1313FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (0) should be [calc(100px + 10%)] assert_equals: expected "calc ( 10 % + 100px ) " but got "calc ( 0 % + 100px ) "
    14 FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "20 % "
     14FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "calc ( 10 % + 50px ) "
    1515FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (1) should be [30%] assert_equals: expected "30 % " but got "20 % "
    16 FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "20 % "
     16FAIL Compositing: property <right> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "calc ( 30 % - 50px ) "
    1717FAIL Compositing: property <right> underlying [50px] from add [100px] to replace [200px] at (-0.3) should be [135px] assert_equals: expected "135px " but got "70px "
    1818FAIL Compositing: property <right> underlying [50px] from add [100px] to replace [200px] at (0) should be [150px] assert_equals: expected "150px " but got "100px "
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/animations/top-composition-expected.txt

    r276138 r280721  
    1010FAIL Compositing: property <top> underlying [100px] from add [10px] to add [2px] at (1) should be [102px] assert_equals: expected "102px " but got "2px "
    1111FAIL Compositing: property <top> underlying [100px] from add [10px] to add [2px] at (1.5) should be [98px] assert_equals: expected "98px " but got "- 2px "
    12 FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( 0 % + 100px ) "
     12FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (-0.3) should be [calc(130px + 4%)] assert_equals: expected "calc ( 4 % + 130px ) " but got "calc ( - 6 % + 130px ) "
    1313FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (0) should be [calc(100px + 10%)] assert_equals: expected "calc ( 10 % + 100px ) " but got "calc ( 0 % + 100px ) "
    14 FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "20 % "
     14FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (0.5) should be [calc(50px + 20%)] assert_equals: expected "calc ( 20 % + 50px ) " but got "calc ( 10 % + 50px ) "
    1515FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (1) should be [30%] assert_equals: expected "30 % " but got "20 % "
    16 FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "20 % "
     16FAIL Compositing: property <top> underlying [10%] from add [100px] to add [20%] at (1.5) should be [calc(-50px + 40%)] assert_equals: expected "calc ( 40 % - 50px ) " but got "calc ( 30 % - 50px ) "
    1717FAIL Compositing: property <top> underlying [50px] from add [100px] to replace [200px] at (-0.3) should be [135px] assert_equals: expected "135px " but got "70px "
    1818FAIL Compositing: property <top> underlying [50px] from add [100px] to replace [200px] at (0) should be [150px] assert_equals: expected "150px " but got "100px "
  • trunk/Source/WebCore/ChangeLog

    r280720 r280721  
     12021-08-06  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r274038): Keyframe animation with top/left with percentages fails to animate
     4        https://bugs.webkit.org/show_bug.cgi?id=228811
     5        <rdar://problem/81568266>
     6
     7        Reviewed by Alan Bujtas.
     8
     9        r274038 ended up disabling interpolation of percent values for top/left/bottom/right.
     10
     11        Test: animations/top-left-percent-interpolation.html
     12
     13        * animation/CSSPropertyAnimation.cpp:
     14        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     15
     16        Enable them.
     17
    1182021-08-06  Youenn Fablet  <youenn@apple.com>
    219
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r278253 r280721  
    22802280    // build the list of property wrappers to do the comparisons and blends
    22812281    AnimationPropertyWrapperBase* animatableLonghandPropertyWrappers[] = {
    2282         new LengthPropertyWrapper(CSSPropertyLeft, &RenderStyle::left, &RenderStyle::setLeft),
    2283         new LengthPropertyWrapper(CSSPropertyRight, &RenderStyle::right, &RenderStyle::setRight),
    2284         new LengthPropertyWrapper(CSSPropertyTop, &RenderStyle::top, &RenderStyle::setTop),
    2285         new LengthPropertyWrapper(CSSPropertyBottom, &RenderStyle::bottom, &RenderStyle::setBottom),
     2282        new LengthPropertyWrapper(CSSPropertyLeft, &RenderStyle::left, &RenderStyle::setLeft, { LengthPropertyWrapper::Flags::IsLengthPercentage }),
     2283        new LengthPropertyWrapper(CSSPropertyRight, &RenderStyle::right, &RenderStyle::setRight, { LengthPropertyWrapper::Flags::IsLengthPercentage }),
     2284        new LengthPropertyWrapper(CSSPropertyTop, &RenderStyle::top, &RenderStyle::setTop, { LengthPropertyWrapper::Flags::IsLengthPercentage }),
     2285        new LengthPropertyWrapper(CSSPropertyBottom, &RenderStyle::bottom, &RenderStyle::setBottom, { LengthPropertyWrapper::Flags::IsLengthPercentage }),
    22862286
    22872287        new LengthPropertyWrapper(CSSPropertyWidth, &RenderStyle::width, &RenderStyle::setWidth, { LengthPropertyWrapper::Flags::IsLengthPercentage, LengthPropertyWrapper::Flags::NegativeLengthsAreInvalid }),
Note: See TracChangeset for help on using the changeset viewer.