Changeset 289903 in webkit


Ignore:
Timestamp:
Feb 16, 2022 10:08:58 AM (5 months ago)
Author:
Martin Robinson
Message:

transform: perspective(0) should not be considered an identity operation
https://bugs.webkit.org/show_bug.cgi?id=236644

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update expectations.
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

No new tests. This is covered by existing WPT tests.

  • platform/graphics/transforms/PerspectiveTransformOperation.h: When the value of a perspective operation

is zero, it isn't an identity operation, because it will be rounded to 1px.

Location:
trunk
Files:
5 edited

Legend:

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

    r289902 r289903  
     12022-02-16  Martin Robinson  <mrobinson@webkit.org>
     2
     3        transform: perspective(0) should not be considered an identity operation
     4        https://bugs.webkit.org/show_bug.cgi?id=236644
     5
     6        Reviewed by Antoine Quint.
     7
     8        * web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update expectations.
     9        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
     10
    1112022-02-16  Ziran Sun  <zsun@igalia.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt

    r289032 r289903  
    162162PASS CSS Transitions: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
    163163PASS CSS Transitions with transition: all: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
    164 FAIL CSS Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 1 , 0 , 0 , 0.25 , 0.75 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0.25 , 1 ) "
    165 FAIL Web Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 1 , 0 , 0 , 0.25 , 0.75 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0.25 , 1 ) "
    166 FAIL CSS Transitions: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
    167 FAIL CSS Transitions with transition: all: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
    168 FAIL CSS Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
    169 FAIL Web Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
     164PASS CSS Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
     165PASS Web Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
     166PASS CSS Transitions: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
     167PASS CSS Transitions with transition: all: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
     168PASS CSS Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
     169PASS Web Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
    170170PASS CSS Transitions: property <transform> from [perspective(10px) translateZ(0.5px)] to [perspective(1px) translateZ(0.5px)] at (-1) should be [translateZ(0.5px)]
    171171PASS CSS Transitions with transition: all: property <transform> from [perspective(10px) translateZ(0.5px)] to [perspective(1px) translateZ(0.5px)] at (-1) should be [translateZ(0.5px)]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt

    r289862 r289903  
    228228PASS transform: non-invertible matrices in matched transform lists
    229229PASS transform: non-invertible matrices in mismatched transform lists
    230 FAIL transform: perspective assert_approx_equals: expected matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.55, 0, 0, 0, 1) but got matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.05, 0, 0, 0, 1): The value should be matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.55, 0, 0, 0, 1) at 500ms but got matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.05, 0, 0, 0, 1) expected -0.55 +/- 0.0001 but got -0.05
     230PASS transform: perspective
    231231PASS transform-box (type: discrete) has testInterpolation function
    232232PASS transform-box uses discrete animation when animating between "fill-box" and "border-box" with linear easing
  • trunk/Source/WebCore/ChangeLog

    r289902 r289903  
     12022-02-16  Martin Robinson  <mrobinson@webkit.org>
     2
     3        transform: perspective(0) should not be considered an identity operation
     4        https://bugs.webkit.org/show_bug.cgi?id=236644
     5
     6        Reviewed by Antoine Quint.
     7
     8        No new tests. This is covered by existing WPT tests.
     9
     10        * platform/graphics/transforms/PerspectiveTransformOperation.h: When the value of a perspective operation
     11        is zero, it isn't an identity operation, because it will be rounded to 1px.
     12
    1132022-02-16  Ziran Sun  <zsun@igalia.com>
    214
  • trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h

    r286816 r289903  
    5151   
    5252private:
    53     bool isIdentity() const override { return !m_p || !floatValueForLength(*m_p, 1); }
     53    bool isIdentity() const override { return !m_p; }
    5454    bool isAffectedByTransformOrigin() const override { return !isIdentity(); }
    5555    bool isRepresentableIn2D() const final { return false; }
Note: See TracChangeset for help on using the changeset viewer.