Changeset 276554 in webkit


Ignore:
Timestamp:
Apr 24, 2021 12:36:27 PM (15 months ago)
Author:
graouts@webkit.org
Message:

Improve parsing and computed style of the rotate CSS property
https://bugs.webkit.org/show_bug.cgi?id=225019

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 2 WPT progressions and add some new parsing WPT tests for rotate.

  • web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt: We don't support additive interpolation,

the FAIL result is most likely a test that passed without proper support for the feature which now fails due to lack of
support for this feature.

  • web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html:
  • 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:

There were a few issues with how we parsed the rotate CSS property and how we dealt with it
when resolving the computed style.

When parsing, we required individual vector coordinates to be 1 when others were 0 for a vector
to be considered parallel with the x, y or z axis. We now support any positive value. Then, as
we create the TransformOperation from the CSSValue, we must set the type to ROTATE_3D instead
of ROTATE_Z if the z axis was specified through the CSS value. Indeed, ROTATE_Z is equivalent
to ROTATE and without setting this type to ROTATE_3D, TransformOperation::is3DOperation() would
return false.

This is important because when figuring out the computed style, we should only return an angle
without a rotation vector if TransformOperation::is3DOperation() is false. For the case where
the operation was specified in 3D, we now use the same rule used when parsing to determine
whether the rotation vector is parallel with the x, y or z axis to use the matching keywords.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedRotate):

  • css/TransformFunctions.cpp:

(WebCore::rotateForValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeRotate):

Location:
trunk
Files:
11 edited

Legend:

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

    r276553 r276554  
     12021-04-24  Antoine Quint  <graouts@webkit.org>
     2
     3        Improve parsing and computed style of the rotate CSS property
     4        https://bugs.webkit.org/show_bug.cgi?id=225019
     5
     6        Reviewed by Dean Jackson.
     7
     8        Mark 2 WPT progressions and add some new parsing WPT tests for rotate.
     9
     10        * web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt: We don't support additive interpolation,
     11        the FAIL result is most likely a test that passed without proper support for the feature which now fails due to lack of
     12        support for this feature.
     13        * web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid-expected.txt:
     14        * web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html:
     15        * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
     16        * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
     17        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
     18
    1192021-04-24  Antoine Quint  <graouts@webkit.org>
    220
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt

    r276231 r276554  
    66FAIL Compositing: property <rotate> underlying [100deg] from add [10deg] to add [30deg] at (1) should be [130deg] assert_equals: expected "130deg " but got "30deg "
    77FAIL Compositing: property <rotate> underlying [100deg] from add [10deg] to add [30deg] at (2) should be [150deg] assert_equals: expected "150deg " but got "50deg "
    8 FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (-1) should be [1 0 0 160deg] assert_equals: expected "1 0 0 160deg " but got "1 0 0 - 240deg "
    9 FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0) should be [1 0 0 100deg] assert_equals: expected "1 0 0 100deg " but got "1 0 0 - 100deg "
    10 FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.25) should be [1 0 0 85deg] assert_equals: expected "1 0 0 85deg " but got "1 0 0 - 65deg "
    11 FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.75) should be [1 0 0 55deg] assert_equals: expected "1 0 0 55deg " but got "1 0 0 5deg "
     8FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (-1) should be [1 0 0 160deg] assert_equals: expected "x 160deg " but got "x - 240deg "
     9FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0) should be [1 0 0 100deg] assert_equals: expected "x 100deg " but got "x - 100deg "
     10FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.25) should be [1 0 0 85deg] assert_equals: expected "x 85deg " but got "x - 65deg "
     11FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.75) should be [1 0 0 55deg] assert_equals: expected "x 55deg " but got "x 5deg "
    1212PASS Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (1) should be [1 0 0 40deg]
    13 FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (2) should be [1 0 0 -20deg] assert_equals: expected "1 0 0 - 20deg " but got "1 0 0 180deg "
    14 FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (-1) should be [0 1 0 130deg] assert_equals: expected "0 1 0 130deg " but got "0 1 0 90deg "
     13FAIL Compositing: property <rotate> underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (2) should be [1 0 0 -20deg] assert_equals: expected "x - 20deg " but got "x 180deg "
     14FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (-1) should be [0 1 0 130deg] assert_equals: expected "y 130deg " but got "y 90deg "
    1515PASS Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0) should be [0 1 0 50deg]
    16 FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.25) should be [0 1 0 30deg] assert_equals: expected "0 1 0 30deg " but got "0 1 0 40deg "
    17 FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.75) should be [0 1 0 -10deg] assert_equals: expected "0 1 0 - 10deg " but got "0 1 0 20deg "
    18 FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (1) should be [0 1 0 -30deg] assert_equals: expected "0 1 0 - 30deg " but got "0 1 0 10deg "
    19 FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (2) should be [0 1 0 -110deg] assert_equals: expected "0 1 0 - 110deg " but got "0 1 0 - 30deg "
     16FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.25) should be [0 1 0 30deg] assert_equals: expected "y 30deg " but got "y 40deg "
     17FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.75) should be [0 1 0 -10deg] assert_equals: expected "y - 10deg " but got "y 20deg "
     18FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (1) should be [0 1 0 -30deg] assert_equals: expected "y - 30deg " but got "y 10deg "
     19FAIL Compositing: property <rotate> underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (2) should be [0 1 0 -110deg] assert_equals: expected "y - 110deg " but got "y - 30deg "
    2020FAIL Compositing: property <rotate> underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (-1) should be [1 2 3 10deg] assert_equals: expected "1 2 3 10deg " but got "- 0.27 - 0.53 - 0.8 30deg "
    2121FAIL Compositing: property <rotate> underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0) should be [1 2 3 50deg] assert_equals: expected "1 2 3 50deg " but got "0.27 0.53 0.8 10deg "
     
    3636PASS Compositing: property <rotate> underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (1) should be [0 1 0 100deg]
    3737FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (2) should be [-3.3235e-17 -1 -9.97049e-17 160deg] assert_equals: expected "0 - 1 0 160deg " but got "- 0.22 - 0.73 - 0.65 120.66deg "
    38 FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (-1) should be [-6.12323e-17 -1 1.57009e-16 90deg] assert_equals: expected "0 - 1 0 90deg " but got "y 90deg "
    39 FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (0) should be [-4.32978e-17 -0.707107 -0.707107 180deg] assert_equals: expected "0 - 0.71 - 0.71 180deg " but got "0 - 1 0 180deg "
     38FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (-1) should be [-6.12323e-17 -1 1.57009e-16 90deg] assert_equals: expected "0 - 1 0 90deg " but got "0 0 1 90deg "
     39FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (0) should be [-4.32978e-17 -0.707107 -0.707107 180deg] assert_equals: expected "0 - 0.71 - 0.71 180deg " but got "y 180deg "
    4040FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (0.25) should be [-1.48952e-16 -0.894427 -0.447214 131.81deg] assert_equals: expected "0 - 0.89 - 0.45 131.81deg " but got "0 0.96 0.28 148.6deg "
    4141FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (0.75) should be [-2.94392e-17 -0.707107 0.707107 70.5288deg] assert_equals: expected "0 - 0.71 0.71 70.53deg " but got "0 0.51 0.86 98.42deg "
    42 PASS Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (1) should be [90deg]
     42FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (1) should be [90deg] assert_equals: expected "90deg " but got "z 90deg "
    4343FAIL Compositing: property <rotate> underlying [1 0 0 90deg] from add [0 1 0 180deg] to replace [0 0 1 90deg] at (2) should be [-6.12323e-17 -1 -4.71028e-16 90deg] assert_equals: expected "0 - 1 0 90deg " but got "0 - 1 0 180deg "
    4444PASS Compositing: property <rotate> underlying [none] from add [none] to replace [0 1 0 100deg] at (-1) should be [0 1 0 -100deg]
     
    5454PASS Compositing: property <rotate> underlying [none] from add [2 4 6 270deg] to replace [none] at (1) should be [none]
    5555FAIL Compositing: property <rotate> underlying [none] from add [2 4 6 270deg] to replace [none] at (2) should be [2 4 6 -270deg] assert_equals: expected "2 4 6 - 270deg " but got "0.27 0.53 0.8 - 270deg "
    56 FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (-1) should be [0.31 -0.22 0.92 131.66deg] assert_equals: expected "0.31 - 0.22 0.92 131.66deg " but got "0 1 0 - 100deg "
     56FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (-1) should be [0.31 -0.22 0.92 131.66deg] assert_equals: expected "0.31 - 0.22 0.92 131.66deg " but got "y - 100deg "
    5757FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0) should be [1 2 3 90deg] assert_equals: expected "1 2 3 90deg " but got "none "
    58 FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.25) should be [0.21 0.73 0.64 86.72deg] assert_equals: expected "0.21 0.73 0.64 86.72deg " but got "0 1 0 25deg "
    59 FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.75) should be [0.07 0.97 0.21 92.05deg] assert_equals: expected "0.07 0.97 0.21 92.05deg " but got "0 1 0 75deg "
     58FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.25) should be [0.21 0.73 0.64 86.72deg] assert_equals: expected "0.21 0.73 0.64 86.72deg " but got "y 25deg "
     59FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.75) should be [0.07 0.97 0.21 92.05deg] assert_equals: expected "0.07 0.97 0.21 92.05deg " but got "y 75deg "
    6060PASS Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (1) should be [0 1 0 100deg]
    61 FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (2) should be [-0.2 0.79 -0.59 151.11deg] assert_equals: expected "- 0.2 0.79 - 0.59 151.11deg " but got "0 1 0 200deg "
     61FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (2) should be [-0.2 0.79 -0.59 151.11deg] assert_equals: expected "- 0.2 0.79 - 0.59 151.11deg " but got "y 200deg "
    6262FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (-1) should be [1 2 3 720deg] assert_equals: expected "1 2 3 720deg " but got "0.27 0.53 0.8 540deg "
    6363FAIL Compositing: property <rotate> underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0) should be [1 2 3 360deg] assert_equals: expected "1 2 3 360deg " but got "0.27 0.53 0.8 270deg "
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid-expected.txt

    r267985 r276554  
    44PASS e.style['rotate'] = "100 200 300 400grad" should set the property value
    55PASS e.style['rotate'] = "400grad 100 200 300" should set the property value
     6PASS e.style['rotate'] = "0 0 0 400grad" should set the property value
    67PASS e.style['rotate'] = "x 400grad" should set the property value
    78PASS e.style['rotate'] = "400grad x" should set the property value
     9PASS e.style['rotate'] = "0.5 0 0 400grad" should set the property value
    810PASS e.style['rotate'] = "1 0 0 400grad" should set the property value
    911PASS e.style['rotate'] = "y 400grad" should set the property value
    1012PASS e.style['rotate'] = "400grad y" should set the property value
     13PASS e.style['rotate'] = "0 0.5 0 400grad" should set the property value
    1114PASS e.style['rotate'] = "0 1 0 400grad" should set the property value
    1215PASS e.style['rotate'] = "z 400grad" should set the property value
    1316PASS e.style['rotate'] = "400grad z" should set the property value
     17PASS e.style['rotate'] = "0 0 0.5 400grad" should set the property value
    1418PASS e.style['rotate'] = "0 0 1 400grad" should set the property value
    1519
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html

    r267570 r276554  
    2323test_valid_value("rotate", "100 200 300 400grad");
    2424test_valid_value("rotate", "400grad 100 200 300", "100 200 300 400grad");
     25test_valid_value("rotate", "0 0 0 400grad", "0 0 0 400grad");
    2526
    2627// If the axis is parallel with the x, y, or z axis, it must serialize as the appropriate keyword.
    2728test_valid_value("rotate", "x 400grad");
    2829test_valid_value("rotate", "400grad x", "x 400grad");
     30test_valid_value("rotate", "0.5 0 0 400grad", "x 400grad");
    2931test_valid_value("rotate", "1 0 0 400grad", "x 400grad");
    3032
    3133test_valid_value("rotate", "y 400grad");
    3234test_valid_value("rotate", "400grad y", "y 400grad");
     35test_valid_value("rotate", "0 0.5 0 400grad", "y 400grad");
    3336test_valid_value("rotate", "0 1 0 400grad", "y 400grad");
    3437
    3538test_valid_value("rotate", "z 400grad");
    3639test_valid_value("rotate", "400grad z", "z 400grad");
     40test_valid_value("rotate", "0 0 0.5 400grad", "z 400grad");
    3741test_valid_value("rotate", "0 0 1 400grad", "z 400grad");
    3842</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt

    r276231 r276554  
    173173PASS rotate (type: rotateList) has testAccumulation function
    174174FAIL rotate without rotation axes assert_equals: The value should be -45deg at 0ms expected "-45deg" but got "-90deg"
    175 FAIL rotate with underlying transform assert_equals: The value should be x 45deg at 0ms expected "x 45deg" but got "1 0 0 90deg"
     175FAIL rotate with underlying transform assert_equals: The value should be x 45deg at 0ms expected "x 45deg" but got "x 90deg"
    176176PASS rotate with different rotation axes
    177177PASS translate (type: translateList) has testAccumulation function
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt

    r276231 r276554  
    168168PASS rotate (type: rotateList) has testAddition function
    169169FAIL rotate without rotation axes assert_equals: The value should be -45deg at 0ms expected "-45deg" but got "-90deg"
    170 FAIL rotate with underlying transform assert_equals: The value should be y 45deg at 0ms expected "y 45deg" but got "0 1 0 90deg"
     170FAIL rotate with underlying transform assert_equals: The value should be y 45deg at 0ms expected "y 45deg" but got "y 90deg"
    171171PASS rotate with different rotation axes
    172172PASS translate (type: translateList) has testAddition function
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt

    r276551 r276554  
    211211PASS rotate (type: rotateList) has testInterpolation function
    212212PASS rotate without rotation axes
    213 FAIL rotate with rotation axes assert_equals: The value should be y 45deg at 500ms expected "y 45deg" but got "0 1 0 45deg"
    214 FAIL rotate with rotation axes and range over 360 degrees assert_equals: The value should be y 180deg at 250ms expected "y 180deg" but got "0 1 0 180deg"
     213PASS rotate with rotation axes
     214PASS rotate with rotation axes and range over 360 degrees
    215215PASS rotate with different rotation axes
    216216PASS translate (type: translateList) has testInterpolation function
  • trunk/Source/WebCore/ChangeLog

    r276553 r276554  
     12021-04-24  Antoine Quint  <graouts@webkit.org>
     2
     3        Improve parsing and computed style of the rotate CSS property
     4        https://bugs.webkit.org/show_bug.cgi?id=225019
     5
     6        Reviewed by Dean Jackson.
     7
     8        There were a few issues with how we parsed the rotate CSS property and how we dealt with it
     9        when resolving the computed style.
     10
     11        When parsing, we required individual vector coordinates to be 1 when others were 0 for a vector
     12        to be considered parallel with the x, y or z axis. We now support any positive value. Then, as
     13        we create the TransformOperation from the CSSValue, we must set the type to ROTATE_3D instead
     14        of ROTATE_Z if the z axis was specified through the CSS value. Indeed, ROTATE_Z is equivalent
     15        to ROTATE and without setting this type to ROTATE_3D, TransformOperation::is3DOperation() would
     16        return false.
     17
     18        This is important because when figuring out the computed style, we should only return an angle
     19        without a rotation vector if TransformOperation::is3DOperation() is false. For the case where
     20        the operation was specified in 3D, we now use the same rule used when parsing to determine
     21        whether the rotation vector is parallel with the x, y or z axis to use the matching keywords.
     22
     23        * css/CSSComputedStyleDeclaration.cpp:
     24        (WebCore::computedRotate):
     25        * css/TransformFunctions.cpp:
     26        (WebCore::rotateForValue):
     27        * css/parser/CSSPropertyParser.cpp:
     28        (WebCore::consumeRotate):
     29
    1302021-04-24  Antoine Quint  <graouts@webkit.org>
    231
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r276551 r276554  
    654654        return cssValuePool.createIdentifierValue(CSSValueNone);
    655655
     656    if (!rotate->is3DOperation())
     657        return cssValuePool.createValue(rotate->angle(), CSSUnitType::CSS_DEG);
     658
    656659    auto list = CSSValueList::createSpaceSeparated();
    657660
    658     bool hasImplicitX = !rotate->x();
    659     bool hasImplicitY = !rotate->y();
    660     bool hasImplicitZ = rotate->z() == 1;
    661 
    662     if (!hasImplicitX && hasImplicitY && hasImplicitZ)
     661    if (rotate->x() && !rotate->y() && !rotate->z())
    663662        list->append(cssValuePool.createIdentifierValue(CSSValueX));
    664     else if (hasImplicitX && !hasImplicitY && hasImplicitZ)
     663    else if (!rotate->x() && rotate->y() && !rotate->z())
    665664        list->append(cssValuePool.createIdentifierValue(CSSValueY));
    666     else if (hasImplicitX && hasImplicitY && !hasImplicitZ)
     665    else if (!rotate->x() && !rotate->y() && rotate->z())
    667666        list->append(cssValuePool.createIdentifierValue(CSSValueZ));
    668     else if (!hasImplicitX || !hasImplicitY || !hasImplicitZ) {
     667    else {
    669668        list->append(cssValuePool.createValue(rotate->x(), CSSUnitType::CSS_NUMBER));
    670669        list->append(cssValuePool.createValue(rotate->y(), CSSUnitType::CSS_NUMBER));
  • trunk/Source/WebCore/css/TransformFunctions.cpp

    r272805 r276554  
    452452            y = 1.0;
    453453        } else if (axisIdentifier == CSSValueZ) {
    454             type = TransformOperation::ROTATE_Z;
     454            type = TransformOperation::ROTATE_3D;
    455455            z = 1.0;
    456456        } else
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r276550 r276554  
    20712071        auto z = downcast<CSSPrimitiveValue>(*list->itemWithoutBoundsCheck(2)).doubleValue();
    20722072
    2073         if (x == 1 && !y && !z) {
     2073        if (x && !y && !z) {
    20742074            list = CSSValueList::createSpaceSeparated();
    20752075            list->append(CSSPrimitiveValue::createIdentifier(CSSValueX));
    2076         } else if (!x && y == 1 && !z) {
     2076        } else if (!x && y && !z) {
    20772077            list = CSSValueList::createSpaceSeparated();
    20782078            list->append(CSSPrimitiveValue::createIdentifier(CSSValueY));
    2079         } else if (!x && !y && z == 1) {
     2079        } else if (!x && !y && z) {
    20802080            list = CSSValueList::createSpaceSeparated();
    20812081            list->append(CSSPrimitiveValue::createIdentifier(CSSValueZ));
Note: See TracChangeset for help on using the changeset viewer.