Changeset 282359 in webkit


Ignore:
Timestamp:
Sep 13, 2021 2:32:57 PM (10 months ago)
Author:
jh718.park@samsung.com
Message:

transform-origin should not accept 4 lengths
https://bugs.webkit.org/show_bug.cgi?id=186965

transform-origin accepts 1, 2, or 3 values per the spec below.
https://drafts.csswg.org/css-transforms/#propdef-transform-origin

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/parsing/transform-origin-invalid-expected.txt:

Source/WebCore:

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeTransformOrigin):

Location:
trunk
Files:
4 edited

Legend:

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

    r282357 r282359  
     12021-09-13  Joonghun Park  <jh718.park@samsung.com>
     2
     3        transform-origin should not accept 4 lengths
     4        https://bugs.webkit.org/show_bug.cgi?id=186965
     5
     6        transform-origin accepts 1, 2, or 3 values per the spec below.
     7        https://drafts.csswg.org/css-transforms/#propdef-transform-origin
     8
     9        Reviewed by Simon Fraser.
     10
     11        * web-platform-tests/css/css-transforms/parsing/transform-origin-invalid-expected.txt:
     12
    1132021-09-13  Sam Sneddon  <gsnedders@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/transform-origin-invalid-expected.txt

    r267650 r282359  
    22PASS e.style['transform-origin'] = "1px 2px 3%" should not set the property value
    33PASS e.style['transform-origin'] = "1px 2px left" should not set the property value
    4 FAIL e.style['transform-origin'] = "1px 2px 3px 4px" should not set the property value assert_equals: expected "" but got "1px 2px 3px"
     4PASS e.style['transform-origin'] = "1px 2px 3px 4px" should not set the property value
    55PASS e.style['transform-origin'] = "1px left" should not set the property value
    66PASS e.style['transform-origin'] = "top 1px" should not set the property value
  • trunk/Source/WebCore/ChangeLog

    r282358 r282359  
     12021-09-13  Joonghun Park  <jh718.park@samsung.com>
     2
     3        transform-origin should not accept 4 lengths
     4        https://bugs.webkit.org/show_bug.cgi?id=186965
     5
     6        transform-origin accepts 1, 2, or 3 values per the spec below.
     7        https://drafts.csswg.org/css-transforms/#propdef-transform-origin
     8
     9        Reviewed by Simon Fraser.
     10
     11        * css/parser/CSSPropertyParser.cpp:
     12        (WebCore::CSSPropertyParser::consumeTransformOrigin):
     13
    1142021-09-13  Tyler Wilcock  <tyler_w@apple.com>
    215
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r282234 r282359  
    358358        auto resultZ = consumeLength(m_range, m_context.mode, ValueRange::All);
    359359        bool hasZ = resultZ;
    360         if (!hasZ && !atEnd)
     360        if ((!hasZ && !atEnd) || !m_range.atEnd())
    361361            return false;
    362362        addProperty(CSSPropertyTransformOriginX, CSSPropertyTransformOrigin, WTFMove(resultXY->x), important);
Note: See TracChangeset for help on using the changeset viewer.