Changeset 274355 in webkit


Ignore:
Timestamp:
Mar 12, 2021 7:06:12 AM (17 months ago)
Author:
graouts@webkit.org
Message:

Support animation of perspective-origin property
https://bugs.webkit.org/show_bug.cgi?id=223116

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add an extra 35 PASS results.

  • web-platform-tests/css/css-transforms/animation/perspective-origin-interpolation-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

While we have support for animating "perspective-origin-x" and "perspective-origin-y", which are
not part of the CSS Transforms standard, we do not support animation of "perspective-origin",
which we consider in WebKit to be a shorthand property. All that is needed to address this is to
add CSSPropertyPerspectiveOrigin in the list of animatable shorthand properties when creating
animation wrappers.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

Location:
trunk
Files:
7 edited

Legend:

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

    r274353 r274355  
     12021-03-12  Antoine Quint  <graouts@webkit.org>
     2
     3        Support animation of perspective-origin property
     4        https://bugs.webkit.org/show_bug.cgi?id=223116
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Add an extra 35 PASS results.
     9
     10        * web-platform-tests/css/css-transforms/animation/perspective-origin-interpolation-expected.txt:
     11        * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
     12        * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
     13        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
     14
    1152021-03-12  Antoine Quint  <graouts@webkit.org>
    216
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/perspective-origin-interpolation-expected.txt

    r274353 r274355  
    1818PASS CSS Animations: property <perspective-origin> from neutral to [20px 20px] at (1) should be [20px 20px]
    1919PASS CSS Animations: property <perspective-origin> from neutral to [20px 20px] at (1.5) should be [25px 15px]
    20 FAIL Web Animations: property <perspective-origin> from neutral to [20px 20px] at (-0.3) should be [7px 33px] assert_equals: expected "7px 33px " but got "10px 30px "
     20PASS Web Animations: property <perspective-origin> from neutral to [20px 20px] at (-0.3) should be [7px 33px]
    2121PASS Web Animations: property <perspective-origin> from neutral to [20px 20px] at (0) should be [10px 30px]
    22 FAIL Web Animations: property <perspective-origin> from neutral to [20px 20px] at (0.3) should be [13px 27px] assert_equals: expected "13px 27px " but got "10px 30px "
    23 FAIL Web Animations: property <perspective-origin> from neutral to [20px 20px] at (0.6) should be [16px 24px] assert_equals: expected "16px 24px " but got "10px 30px "
    24 FAIL Web Animations: property <perspective-origin> from neutral to [20px 20px] at (1) should be [20px 20px] assert_equals: expected "20px 20px " but got "10px 30px "
    25 FAIL Web Animations: property <perspective-origin> from neutral to [20px 20px] at (1.5) should be [25px 15px] assert_equals: expected "25px 15px " but got "10px 30px "
     22PASS Web Animations: property <perspective-origin> from neutral to [20px 20px] at (0.3) should be [13px 27px]
     23PASS Web Animations: property <perspective-origin> from neutral to [20px 20px] at (0.6) should be [16px 24px]
     24PASS Web Animations: property <perspective-origin> from neutral to [20px 20px] at (1) should be [20px 20px]
     25PASS Web Animations: property <perspective-origin> from neutral to [20px 20px] at (1.5) should be [25px 15px]
    2626PASS CSS Transitions: property <perspective-origin> from [initial] to [20px 20px] at (-0.3) should be [26.5px 26.5px]
    2727PASS CSS Transitions: property <perspective-origin> from [initial] to [20px 20px] at (0) should be [25px 25px]
     
    4242PASS CSS Animations: property <perspective-origin> from [initial] to [20px 20px] at (1) should be [20px 20px]
    4343PASS CSS Animations: property <perspective-origin> from [initial] to [20px 20px] at (1.5) should be [17.5px 17.5px]
    44 FAIL Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (-0.3) should be [26.5px 26.5px] assert_equals: expected "26.5px 26.5px " but got "10px 30px "
    45 FAIL Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (0) should be [25px 25px] assert_equals: expected "25px 25px " but got "10px 30px "
    46 FAIL Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (0.3) should be [23.5px 23.5px] assert_equals: expected "23.5px 23.5px " but got "10px 30px "
    47 FAIL Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (0.6) should be [22px 22px] assert_equals: expected "22px 22px " but got "10px 30px "
    48 FAIL Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (1) should be [20px 20px] assert_equals: expected "20px 20px " but got "10px 30px "
    49 FAIL Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (1.5) should be [17.5px 17.5px] assert_equals: expected "17.5px 17.5px " but got "10px 30px "
     44PASS Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (-0.3) should be [26.5px 26.5px]
     45PASS Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (0) should be [25px 25px]
     46PASS Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (0.3) should be [23.5px 23.5px]
     47PASS Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (0.6) should be [22px 22px]
     48PASS Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (1) should be [20px 20px]
     49PASS Web Animations: property <perspective-origin> from [initial] to [20px 20px] at (1.5) should be [17.5px 17.5px]
    5050PASS CSS Transitions: property <perspective-origin> from [inherit] to [20px 20px] at (-0.3) should be [33px 7px]
    5151PASS CSS Transitions: property <perspective-origin> from [inherit] to [20px 20px] at (0) should be [30px 10px]
     
    6666PASS CSS Animations: property <perspective-origin> from [inherit] to [20px 20px] at (1) should be [20px 20px]
    6767PASS CSS Animations: property <perspective-origin> from [inherit] to [20px 20px] at (1.5) should be [15px 25px]
    68 FAIL Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (-0.3) should be [33px 7px] assert_equals: expected "33px 7px " but got "10px 30px "
    69 FAIL Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (0) should be [30px 10px] assert_equals: expected "30px 10px " but got "10px 30px "
    70 FAIL Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (0.3) should be [27px 13px] assert_equals: expected "27px 13px " but got "10px 30px "
    71 FAIL Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (0.6) should be [24px 16px] assert_equals: expected "24px 16px " but got "10px 30px "
    72 FAIL Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (1) should be [20px 20px] assert_equals: expected "20px 20px " but got "10px 30px "
    73 FAIL Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (1.5) should be [15px 25px] assert_equals: expected "15px 25px " but got "10px 30px "
     68PASS Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (-0.3) should be [33px 7px]
     69PASS Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (0) should be [30px 10px]
     70PASS Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (0.3) should be [27px 13px]
     71PASS Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (0.6) should be [24px 16px]
     72PASS Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (1) should be [20px 20px]
     73PASS Web Animations: property <perspective-origin> from [inherit] to [20px 20px] at (1.5) should be [15px 25px]
    7474PASS CSS Transitions: property <perspective-origin> from [unset] to [20px 20px] at (-0.3) should be [26.5px 26.5px]
    7575PASS CSS Transitions: property <perspective-origin> from [unset] to [20px 20px] at (0) should be [25px 25px]
     
    9090PASS CSS Animations: property <perspective-origin> from [unset] to [20px 20px] at (1) should be [20px 20px]
    9191PASS CSS Animations: property <perspective-origin> from [unset] to [20px 20px] at (1.5) should be [17.5px 17.5px]
    92 FAIL Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (-0.3) should be [26.5px 26.5px] assert_equals: expected "26.5px 26.5px " but got "10px 30px "
    93 FAIL Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (0) should be [25px 25px] assert_equals: expected "25px 25px " but got "10px 30px "
    94 FAIL Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (0.3) should be [23.5px 23.5px] assert_equals: expected "23.5px 23.5px " but got "10px 30px "
    95 FAIL Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (0.6) should be [22px 22px] assert_equals: expected "22px 22px " but got "10px 30px "
    96 FAIL Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (1) should be [20px 20px] assert_equals: expected "20px 20px " but got "10px 30px "
    97 FAIL Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (1.5) should be [17.5px 17.5px] assert_equals: expected "17.5px 17.5px " but got "10px 30px "
     92PASS Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (-0.3) should be [26.5px 26.5px]
     93PASS Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (0) should be [25px 25px]
     94PASS Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (0.3) should be [23.5px 23.5px]
     95PASS Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (0.6) should be [22px 22px]
     96PASS Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (1) should be [20px 20px]
     97PASS Web Animations: property <perspective-origin> from [unset] to [20px 20px] at (1.5) should be [17.5px 17.5px]
    9898PASS CSS Transitions: property <perspective-origin> from [0% 50%] to [100% 150%] at (-0.3) should be [-30% 20%]
    9999PASS CSS Transitions: property <perspective-origin> from [0% 50%] to [100% 150%] at (0) should be [0% 50%]
     
    114114PASS CSS Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (1) should be [100% 150%]
    115115PASS CSS Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (1.5) should be [150% 200%]
    116 FAIL Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (-0.3) should be [-30% 20%] assert_equals: expected "- 15px 10px " but got "10px 30px "
    117 FAIL Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (0) should be [0% 50%] assert_equals: expected "0px 25px " but got "10px 30px "
    118 FAIL Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (0.3) should be [30% 80%] assert_equals: expected "15px 40px " but got "10px 30px "
    119 FAIL Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (0.6) should be [60% 110%] assert_equals: expected "30px 55px " but got "10px 30px "
    120 FAIL Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (1) should be [100% 150%] assert_equals: expected "50px 75px " but got "10px 30px "
    121 FAIL Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (1.5) should be [150% 200%] assert_equals: expected "75px 100px " but got "10px 30px "
     116PASS Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (-0.3) should be [-30% 20%]
     117PASS Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (0) should be [0% 50%]
     118PASS Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (0.3) should be [30% 80%]
     119PASS Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (0.6) should be [60% 110%]
     120PASS Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (1) should be [100% 150%]
     121PASS Web Animations: property <perspective-origin> from [0% 50%] to [100% 150%] at (1.5) should be [150% 200%]
    122122
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt

    r270801 r274355  
    8080FAIL perspective: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
    8181FAIL perspective: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
     82PASS perspective-origin (type: position) has testAccumulation function
     83FAIL perspective-origin: length pair assert_equals: The value should be 20px 20px at 0ms expected "20px 20px" but got "10px 10px"
     84FAIL perspective-origin: length pair of rem assert_equals: The value should be 20px 20px at 0ms expected "20px 20px" but got "10px 10px"
     85FAIL perspective-origin: position of percentage assert_equals: The value should be 1019.1875px 0px at 0ms expected "1019.1875px 0px" but got "548.796875px 0px"
    8286PASS pointer-events (type: discrete) has testAccumulation function
    8387PASS pointer-events: "none" onto "fill"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt

    r269812 r274355  
    8080FAIL perspective: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
    8181FAIL perspective: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
     82PASS perspective-origin (type: position) has testAddition function
     83FAIL perspective-origin: length pair assert_equals: The value should be 20px 20px at 0ms expected "20px 20px" but got "10px 10px"
     84FAIL perspective-origin: length pair of rem assert_equals: The value should be 20px 20px at 0ms expected "20px 20px" but got "10px 10px"
     85FAIL perspective-origin: position of percentage assert_equals: The value should be 1019.1875px 0px at 0ms expected "1019.1875px 0px" but got "548.796875px 0px"
    8286PASS pointer-events (type: discrete) has testAddition function
    8387PASS pointer-events: "none" onto "fill"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt

    r274038 r274355  
    9797PASS perspective supports animating as a length
    9898PASS perspective supports animating as a length of rem
     99PASS perspective-origin (type: position) has testInterpolation function
     100PASS perspective-origin supports animating as a length pair
     101PASS perspective-origin supports animating as a length pair of rem
     102PASS perspective-origin supports animating as a position of percent
    99103PASS pointer-events (type: discrete) has testInterpolation function
    100104PASS pointer-events uses discrete animation when animating between "fill" and "none" with linear easing
  • trunk/Source/WebCore/ChangeLog

    r274354 r274355  
     12021-03-12  Antoine Quint  <graouts@webkit.org>
     2
     3        Support animation of perspective-origin property
     4        https://bugs.webkit.org/show_bug.cgi?id=223116
     5
     6        Reviewed by Antti Koivisto.
     7
     8        While we have support for animating "perspective-origin-x" and "perspective-origin-y", which are
     9        not part of the CSS Transforms standard, we do not support animation of "perspective-origin",
     10        which we consider in WebKit to be a shorthand property. All that is needed to address this is to
     11        add CSSPropertyPerspectiveOrigin in the list of animatable shorthand properties when creating
     12        animation wrappers.
     13
     14        * animation/CSSPropertyAnimation.cpp:
     15        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     16
    1172021-03-12  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r274329 r274355  
    21502150        CSSPropertyColumnRule,
    21512151        CSSPropertyWebkitBorderRadius,
    2152         CSSPropertyTransformOrigin
     2152        CSSPropertyTransformOrigin,
     2153        CSSPropertyPerspectiveOrigin
    21532154    };
    21542155    const unsigned animatableShorthandPropertiesCount = WTF_ARRAY_LENGTH(animatableShorthandProperties);
Note: See TracChangeset for help on using the changeset viewer.