Changeset 251776 in webkit


Ignore:
Timestamp:
Oct 30, 2019 10:07:02 AM (4 years ago)
Author:
krit@webkit.org
Message:

[css-masking] Unprefix -webkit-clip-path
https://bugs.webkit.org/show_bug.cgi?id=187888

Reviewed by Simon Fraser.

LayoutTests/imported/mozilla:

Integrated test expectations do not match the actual expected
behavior. The reason is that the expectation files reference
resources from different documents - which is not supported by
WebKit. Since unprefixed clip-path wasn't supported either
the test passed.

  • svg/svg-integration/clipPath-html-01-expected.xhtml:
  • svg/svg-integration/clipPath-html-02-expected.xhtml:
  • svg/svg-integration/clipPath-html-02.xhtml:
  • svg/svg-integration/clipPath-html-03-expected.xhtml:
  • svg/svg-integration/clipPath-html-04-expected.xhtml:
  • svg/svg-integration/clipPath-html-05-expected.xhtml:
  • svg/svg-integration/clipPath-html-06-expected.xhtml:

LayoutTests/imported/w3c:

Test started passing. Updating test results.

  • web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:
  • web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt:
  • web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html:

Test result is incorrect: Doesn't test the shifing of content when shape-outside is set.

  • web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html:

Source/WebCore:

Unprefix -webkit-clip-path. Make clip-path alias the prefixed version.

We already have a wide variaty of pre-/unprexied clip-path tests.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSProperties.json:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialShadow):
(WebCore::SVGRenderStyle::y const):
(WebCore::SVGRenderStyle::initialClipperResource): Deleted.
(WebCore::SVGRenderStyle::clipperResource const): Deleted.
(WebCore::SVGRenderStyle::hasClipper const): Deleted.
(WebCore::SVGRenderStyle::setClipperResource): Deleted.

  • rendering/style/SVGRenderStyleDefs.cpp:

(WebCore::StyleResourceData::StyleResourceData):
(WebCore::StyleResourceData::operator== const):

  • rendering/style/SVGRenderStyleDefs.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::pathOnlyClipping):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeResources):

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::buildCachedResources):

Location:
trunk
Files:
26 edited

Legend:

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

    r251591 r251776  
     12019-10-30  Dirk Schulze  <krit@webkit.org>
     2
     3        [css-masking] Unprefix -webkit-clip-path
     4        https://bugs.webkit.org/show_bug.cgi?id=187888
     5
     6        Reviewed by Simon Fraser.
     7
     8        Integrated test expectations do not match the actual expected
     9        behavior. The reason is that the expectation files reference
     10        resources from different documents - which is not supported by
     11        WebKit. Since unprefixed clip-path wasn't supported either
     12        the test passed.
     13
     14        * svg/svg-integration/clipPath-html-01-expected.xhtml:
     15        * svg/svg-integration/clipPath-html-02-expected.xhtml:
     16        * svg/svg-integration/clipPath-html-02.xhtml:
     17        * svg/svg-integration/clipPath-html-03-expected.xhtml:
     18        * svg/svg-integration/clipPath-html-04-expected.xhtml:
     19        * svg/svg-integration/clipPath-html-05-expected.xhtml:
     20        * svg/svg-integration/clipPath-html-06-expected.xhtml:
     21
    1222019-10-25  Antoine Quint  <graouts@apple.com>
    223
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-01-expected.xhtml

    r177330 r251776  
    77     xmlns:xlink="http://www.w3.org/1999/xlink">
    88<body style="margin:0">
    9   <div style="position:absolute; top:0; left:0; clip-path: url(clipPath-html-01.xhtml#c1); width:500px; height:500px; background:lime;"></div>
    10   <svg:svg height="0">
    11     <!-- use an empty g to force clipPath-html-01.xhtml to load before onload -->
    12     <svg:use xlink:href="clipPath-html-01.xhtml#empty" />
    13   </svg:svg>
     9  <div style="position:absolute; top:0; left:250px; width:250px; height:500px; background:lime;"></div>
    1410</body>
    1511</html>
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-02-expected.xhtml

    r177330 r251776  
    77     xmlns:xlink="http://www.w3.org/1999/xlink">
    88<body style="margin:0">
    9   <div style="clip-path: url(clipPath-html-02.xhtml#c1); width:500px; height:200px; background:lime;">
     9  <div style="width:500px; height:200px; background:lime;">
    1010    <div style="height:200px;"/>
    1111    <div style="height:200px; background:blue;"/>
    1212  </div>
    13   <svg:svg height="0">
    14     <!-- use an empty g to force clipPath-html-02.xhtml to load before onload -->
    15     <svg:use xlink:href="clipPath-html-02.xhtml#empty" />
    16   </svg:svg>
    1713</body>
    1814</html>
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml

    r177330 r251776  
    77      xmlns:xlink="http://www.w3.org/1999/xlink">
    88<body style="margin:0">
    9   <div style="clip-path: url(#c1); width:500px; height:200px; background:lime;">
     9  <div style="clip-path: url(#c1); width:500px; height:500px; background:lime;">
    1010    <div style="height:200px;"/>
    1111    <div style="height:200px; background:blue;"/>
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-03-expected.xhtml

    r177330 r251776  
    77     xmlns:xlink="http://www.w3.org/1999/xlink">
    88<body style="margin:0">
    9   <div style="clip-path: url(clipPath-html-03.xhtml#c1); width:500px; height:200px; background:lime;">
    10     <div style="height:200px;"/>
    11     <div style="height:200px; background:blue;"/>
    12   </div>
    13   <svg:svg height="0">
    14     <!-- use an empty g to force clipPath-html-03.xhtml to load before onload -->
    15     <svg:use xlink:href="clipPath-html-03.xhtml#empty" />
     9  <svg:svg width="200" height="300">
     10    <svg:rect width="200" height="150" fill="lime"/>
     11    <svg:rect x="100" y="150" width="100" height="50" fill="lime"/>
     12    <svg:rect x="100" y="200" width="100" height="100" fill="blue"/>
    1613  </svg:svg>
    1714</body>
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-04-expected.xhtml

    r177330 r251776  
    1313<body style="margin:0; width:350px; line-height:100px;">
    1414  <span class="unit"/><span class="unit"
    15   /><span style="clip-path:url(clipPath-html-04.xhtml#c1); background:lime;"><span class="unit"/><span class="unit"
     15  /><span style="-webkit-clip-path:polygon(50px 0, 250px 0, 250px 200px, 50px 200px); background:lime;"><span class="unit"/><span class="unit"
    1616  /></span>
    17   <svg:svg height="0">
    18     <!-- use an empty g to force clipPath-html-04.xhtml to load before onload -->
    19     <svg:use xlink:href="clipPath-html-04.xhtml#empty" />
    20   </svg:svg>
    2117</body>
    2218</html>
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-05-expected.xhtml

    r177330 r251776  
    1313<body style="margin:0; width:350px; line-height:100px;">
    1414  <span class="unit"/><span class="unit"
    15   /><span style="clip-path:url(clipPath-html-05.xhtml#c1); background:lime;"><span class="unit"/><span class="unit"
     15  /><span style="-webkit-clip-path: polygon(10% 0, 90% 0, 90% 100%, 10% 100%); background:lime;"><span class="unit"/><span class="unit"
    1616  /></span>
    17   <svg:svg height="0">
    18     <!-- use an empty g to force clipPath-html-05.xhtml to load before onload -->
    19     <svg:use xlink:href="clipPath-html-05.xhtml#empty" />
    20   </svg:svg>
    2117</body>
    2218</html>
  • trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-06-expected.xhtml

    r177330 r251776  
    1212</head>
    1313<body style="margin:0">
    14   <span style="clip-path: url(clipPath-html-06.xhtml#c1);">
     14  <span style="-webkit-clip-path: polygon(0 50%, 50% 50%, 50% 100%, 0 100%);">
    1515    <span class="unit" style="background:lime;"></span>
    1616    <div style="height:200px; width:100px;"/>
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r251775 r251776  
     12019-10-30  Dirk Schulze  <krit@webkit.org>
     2
     3        [css-masking] Unprefix -webkit-clip-path
     4        https://bugs.webkit.org/show_bug.cgi?id=187888
     5
     6        Reviewed by Simon Fraser.
     7
     8        Test started passing. Updating test results.
     9
     10        * web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:
     11        * web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt:
     12        * web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization-expected.txt:
     13        * web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html:
     14                Test result is incorrect: Doesn't test the shifing of content when shape-outside is set.
     15        * web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html:
     16
    1172019-10-30  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt

    r251634 r251776  
    11
    2 FAIL Property clip-path value 'circle(calc(10px + 0.5em) at -50% 50%)' computes to 'circle(30px at -50% 50%)' assert_true: 'circle(calc(10px + 0.5em) at -50% 50%)' is a supported value for clip-path. expected true got false
    3 FAIL Property clip-path value 'circle(calc(10px - 0.5em) at 50% -50%)' computes to 'circle(0px at 50% -50%)' assert_true: 'circle(calc(10px - 0.5em) at 50% -50%)' is a supported value for clip-path. expected true got false
    4 FAIL Property clip-path value 'ellipse(at 50% 50%)' computes to 'ellipse(at 50% 50%)' assert_true: 'ellipse(at 50% 50%)' is a supported value for clip-path. expected true got false
    5 FAIL Property clip-path value 'ellipse(60% closest-side at 50% 50%)' computes to 'ellipse(60% closest-side at 50% 50%)' assert_true: 'ellipse(60% closest-side at 50% 50%)' is a supported value for clip-path. expected true got false
     2PASS Property clip-path value 'circle(calc(10px + 0.5em) at -50% 50%)' computes to 'circle(30px at -50% 50%)'
     3PASS Property clip-path value 'circle(calc(10px - 0.5em) at 50% -50%)' computes to 'circle(0px at 50% -50%)'
     4PASS Property clip-path value 'ellipse(at 50% 50%)' computes to 'ellipse(at 50% 50%)'
     5PASS Property clip-path value 'ellipse(60% closest-side at 50% 50%)' computes to 'ellipse(60% closest-side at 50% 50%)'
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt

    r250653 r251776  
    11
    22PASS e.style['clip-path'] = "none" should set the property value
    3 FAIL e.style['clip-path'] = "inset(100%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    4 FAIL e.style['clip-path'] = "inset(0 1px)" should set the property value assert_not_equals: property should be set got disallowed value ""
    5 FAIL e.style['clip-path'] = "inset(0px 1px 2%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    6 FAIL e.style['clip-path'] = "inset(0px 1px 2% 3em)" should set the property value assert_not_equals: property should be set got disallowed value ""
    7 FAIL e.style['clip-path'] = "inset(0px round 100%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    8 FAIL e.style['clip-path'] = "inset(0px round 0 1px)" should set the property value assert_not_equals: property should be set got disallowed value ""
    9 FAIL e.style['clip-path'] = "inset(0px round 0px 1px 2%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    10 FAIL e.style['clip-path'] = "inset(0px round 0px 1px 2% 3em)" should set the property value assert_not_equals: property should be set got disallowed value ""
    11 FAIL e.style['clip-path'] = "inset(10px round 20% / 0px 1px 2% 3em)" should set the property value assert_not_equals: property should be set got disallowed value ""
    12 FAIL e.style['clip-path'] = "circle()" should set the property value assert_not_equals: property should be set got disallowed value ""
    13 FAIL e.style['clip-path'] = "circle(1px)" should set the property value assert_not_equals: property should be set got disallowed value ""
    14 FAIL e.style['clip-path'] = "circle(closest-side)" should set the property value assert_not_equals: property should be set got disallowed value ""
    15 FAIL e.style['clip-path'] = "circle(at 10% 20%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    16 FAIL e.style['clip-path'] = "circle(farthest-side at center top)" should set the property value assert_not_equals: property should be set got disallowed value ""
    17 FAIL e.style['clip-path'] = "circle(4% at top right)" should set the property value assert_not_equals: property should be set got disallowed value ""
    18 FAIL e.style['clip-path'] = "ellipse()" should set the property value assert_not_equals: property should be set got disallowed value ""
    19 FAIL e.style['clip-path'] = "ellipse(1px closest-side)" should set the property value assert_not_equals: property should be set got disallowed value ""
    20 FAIL e.style['clip-path'] = "ellipse(at 10% 20%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    21 FAIL e.style['clip-path'] = "ellipse(closest-side closest-side at 10% 20%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    22 FAIL e.style['clip-path'] = "ellipse(farthest-side 4% at bottom left)" should set the property value assert_not_equals: property should be set got disallowed value ""
    23 FAIL e.style['clip-path'] = "polygon(1% 2%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    24 FAIL e.style['clip-path'] = "polygon(nonzero, 1px 2px, 3em 4em)" should set the property value assert_not_equals: property should be set got disallowed value ""
    25 FAIL e.style['clip-path'] = "polygon(evenodd, 1px 2px, 3em 4em, 5pt 6%)" should set the property value assert_not_equals: property should be set got disallowed value ""
    26 FAIL e.style['clip-path'] = "border-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    27 FAIL e.style['clip-path'] = "padding-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    28 FAIL e.style['clip-path'] = "content-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    29 FAIL e.style['clip-path'] = "margin-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    30 FAIL e.style['clip-path'] = "fill-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    31 FAIL e.style['clip-path'] = "stroke-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    32 FAIL e.style['clip-path'] = "view-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    33 FAIL e.style['clip-path'] = "circle(7% at 8% 9%) border-box" should set the property value assert_not_equals: property should be set got disallowed value ""
    34 FAIL e.style['clip-path'] = "border-box circle(7% at 8% 9%)" should set the property value assert_not_equals: property should be set got disallowed value ""
     3PASS e.style['clip-path'] = "inset(100%)" should set the property value
     4PASS e.style['clip-path'] = "inset(0 1px)" should set the property value
     5PASS e.style['clip-path'] = "inset(0px 1px 2%)" should set the property value
     6PASS e.style['clip-path'] = "inset(0px 1px 2% 3em)" should set the property value
     7PASS e.style['clip-path'] = "inset(0px round 100%)" should set the property value
     8PASS e.style['clip-path'] = "inset(0px round 0 1px)" should set the property value
     9PASS e.style['clip-path'] = "inset(0px round 0px 1px 2%)" should set the property value
     10PASS e.style['clip-path'] = "inset(0px round 0px 1px 2% 3em)" should set the property value
     11PASS e.style['clip-path'] = "inset(10px round 20% / 0px 1px 2% 3em)" should set the property value
     12PASS e.style['clip-path'] = "circle()" should set the property value
     13PASS e.style['clip-path'] = "circle(1px)" should set the property value
     14PASS e.style['clip-path'] = "circle(closest-side)" should set the property value
     15PASS e.style['clip-path'] = "circle(at 10% 20%)" should set the property value
     16PASS e.style['clip-path'] = "circle(farthest-side at center top)" should set the property value
     17PASS e.style['clip-path'] = "circle(4% at top right)" should set the property value
     18PASS e.style['clip-path'] = "ellipse()" should set the property value
     19PASS e.style['clip-path'] = "ellipse(1px closest-side)" should set the property value
     20PASS e.style['clip-path'] = "ellipse(at 10% 20%)" should set the property value
     21PASS e.style['clip-path'] = "ellipse(closest-side closest-side at 10% 20%)" should set the property value
     22PASS e.style['clip-path'] = "ellipse(farthest-side 4% at bottom left)" should set the property value
     23PASS e.style['clip-path'] = "polygon(1% 2%)" should set the property value
     24PASS e.style['clip-path'] = "polygon(nonzero, 1px 2px, 3em 4em)" should set the property value
     25PASS e.style['clip-path'] = "polygon(evenodd, 1px 2px, 3em 4em, 5pt 6%)" should set the property value
     26PASS e.style['clip-path'] = "border-box" should set the property value
     27PASS e.style['clip-path'] = "padding-box" should set the property value
     28PASS e.style['clip-path'] = "content-box" should set the property value
     29PASS e.style['clip-path'] = "margin-box" should set the property value
     30PASS e.style['clip-path'] = "fill-box" should set the property value
     31PASS e.style['clip-path'] = "stroke-box" should set the property value
     32PASS e.style['clip-path'] = "view-box" should set the property value
     33PASS e.style['clip-path'] = "circle(7% at 8% 9%) border-box" should set the property value
     34PASS e.style['clip-path'] = "border-box circle(7% at 8% 9%)" should set the property value
    3535PASS e.style['clip-path'] = "url(https://example.com/)" should set the property value
    3636PASS e.style['clip-path'] = "url(\"https://example.com/\")" should set the property value
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization-expected.txt

    r232903 r251776  
    11
    2 FAIL Serialization of basic shapes assert_equals: circle(at left bottom) expected "circle(at 0% 100%)" but got ""
    3 FAIL Serialization of basic shapes 1 assert_equals: circle(at bottom left) expected "circle(at 0% 100%)" but got ""
    4 FAIL Serialization of basic shapes 2 assert_equals: circle(at right calc(10% + 5px)) expected "circle(at 100% calc(10% + 5px))" but got ""
    5 FAIL Serialization of basic shapes 3 assert_equals: ellipse(at left bottom) expected "ellipse(at 0% 100%)" but got ""
    6 FAIL Serialization of basic shapes 4 assert_equals: ellipse(at bottom left) expected "ellipse(at 0% 100%)" but got ""
    7 FAIL Serialization of basic shapes 5 assert_equals: ellipse(at right calc(10% + 5px)) expected "ellipse(at 100% calc(10% + 5px))" but got ""
    8 FAIL Serialization of basic shapes 6 assert_equals: circle() expected "circle(at 50% 50%)" but got ""
    9 FAIL Serialization of basic shapes 7 assert_equals: circle(0px) expected "circle(0px at 50% 50%)" but got ""
    10 FAIL Serialization of basic shapes 8 assert_equals: circle(closest-side) expected "circle(at 50% 50%)" but got ""
    11 FAIL Serialization of basic shapes 9 assert_equals: circle(farthest-side) expected "circle(farthest-side at 50% 50%)" but got ""
    12 FAIL Serialization of basic shapes 10 assert_equals: ellipse() expected "ellipse(at 50% 50%)" but got ""
    13 FAIL Serialization of basic shapes 11 assert_equals: ellipse(closest-side farthest-side) expected "ellipse(closest-side farthest-side at 50% 50%)" but got ""
    14 FAIL Serialization of basic shapes 12 assert_equals: circle(at top 0% right 5px) expected "circle(at right 5px top 0%)" but got ""
    15 FAIL Serialization of basic shapes 13 assert_equals: ellipse(at top 0% right 10px) expected "ellipse(at right 10px top 0%)" but got ""
    16 FAIL Serialization of basic shapes 14 assert_equals: circle(closest-side at center) expected "circle(at 50% 50%)" but got ""
    17 FAIL Serialization of basic shapes 15 assert_equals: ellipse(closest-side closest-side at center) expected "ellipse(at 50% 50%)" but got ""
    18 FAIL Serialization of basic shapes 16 assert_equals: circle(farthest-side at center) expected "circle(farthest-side at 50% 50%)" but got ""
    19 FAIL Serialization of basic shapes 17 assert_equals: circle(10px at center) expected "circle(10px at 50% 50%)" but got ""
    20 FAIL Serialization of basic shapes 18 assert_equals: ellipse(farthest-side 10px at center) expected "ellipse(farthest-side 10px at 50% 50%)" but got ""
    21 FAIL Serialization of basic shapes 19 assert_equals: ellipse(closest-side farthest-side at 50% 50%) expected "ellipse(closest-side farthest-side at 50% 50%)" but got ""
    22 FAIL Serialization of basic shapes 20 assert_equals: ellipse(closest-side 10% at 50% 50%) expected "ellipse(closest-side 10% at 50% 50%)" but got ""
    23 FAIL Serialization of basic shapes 21 assert_equals: circle(at right 5px bottom 10px) expected "circle(at right 5px bottom 10px)" but got ""
    24 FAIL Serialization of basic shapes 22 assert_equals: ellipse(at right 5px bottom 10px) expected "ellipse(at right 5px bottom 10px)" but got ""
    25 FAIL Serialization of basic shapes 23 assert_equals: circle(at right 5% top 0px) expected "circle(at 95% 0%)" but got ""
    26 FAIL Serialization of basic shapes 24 assert_equals: ellipse(at right 5% top 0px) expected "ellipse(at 95% 0%)" but got ""
    27 FAIL Serialization of basic shapes 25 assert_equals: circle(at right calc(10% + 5px) bottom calc(10% + 5px)) expected "circle(at right calc(10% + 5px) bottom calc(10% + 5px))" but got ""
    28 FAIL Serialization of basic shapes 26 assert_equals: ellipse(at right calc(10% + 5px) bottom calc(10% + 5px)) expected "ellipse(at right calc(10% + 5px) bottom calc(10% + 5px))" but got ""
     2PASS Serialization of basic shapes
     3PASS Serialization of basic shapes 1
     4PASS Serialization of basic shapes 2
     5PASS Serialization of basic shapes 3
     6PASS Serialization of basic shapes 4
     7PASS Serialization of basic shapes 5
     8PASS Serialization of basic shapes 6
     9PASS Serialization of basic shapes 7
     10PASS Serialization of basic shapes 8
     11PASS Serialization of basic shapes 9
     12PASS Serialization of basic shapes 10
     13PASS Serialization of basic shapes 11
     14PASS Serialization of basic shapes 12
     15PASS Serialization of basic shapes 13
     16PASS Serialization of basic shapes 14
     17PASS Serialization of basic shapes 15
     18PASS Serialization of basic shapes 16
     19PASS Serialization of basic shapes 17
     20PASS Serialization of basic shapes 18
     21PASS Serialization of basic shapes 19
     22PASS Serialization of basic shapes 20
     23PASS Serialization of basic shapes 21
     24PASS Serialization of basic shapes 22
     25PASS Serialization of basic shapes 23
     26PASS Serialization of basic shapes 24
     27PASS Serialization of basic shapes 25
     28PASS Serialization of basic shapes 26
    2929
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html

    r232903 r251776  
    1818  display: flex;
    1919  height: 50px;
     20  width: 200px;
    2021  background: rebeccapurple;
     22  left: 50px;
     23  top: -100px;
     24  position: relative;
    2125}
    2226</style>
  • trunk/Source/WebCore/ChangeLog

    r251772 r251776  
     12019-10-30  Dirk Schulze  <krit@webkit.org>
     2
     3        [css-masking] Unprefix -webkit-clip-path
     4        https://bugs.webkit.org/show_bug.cgi?id=187888
     5
     6        Reviewed by Simon Fraser.
     7
     8        Unprefix -webkit-clip-path. Make clip-path alias the prefixed version.
     9
     10        We already have a wide variaty of pre-/unprexied clip-path tests.
     11
     12        * css/CSSComputedStyleDeclaration.cpp:
     13        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
     14        * css/CSSProperties.json:
     15        * css/SVGCSSComputedStyleDeclaration.cpp:
     16        (WebCore::ComputedStyleExtractor::svgPropertyValue):
     17        * css/parser/CSSPropertyParser.cpp:
     18        (WebCore::CSSPropertyParser::parseSingleValue):
     19        * page/animation/CSSPropertyAnimation.cpp:
     20        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     21        * rendering/style/SVGRenderStyle.h:
     22        (WebCore::SVGRenderStyle::initialShadow):
     23        (WebCore::SVGRenderStyle::y const):
     24        (WebCore::SVGRenderStyle::initialClipperResource): Deleted.
     25        (WebCore::SVGRenderStyle::clipperResource const): Deleted.
     26        (WebCore::SVGRenderStyle::hasClipper const): Deleted.
     27        (WebCore::SVGRenderStyle::setClipperResource): Deleted.
     28        * rendering/style/SVGRenderStyleDefs.cpp:
     29        (WebCore::StyleResourceData::StyleResourceData):
     30        (WebCore::StyleResourceData::operator== const):
     31        * rendering/style/SVGRenderStyleDefs.h:
     32        * rendering/style/WillChangeData.cpp:
     33        (WebCore::WillChangeData::propertyCreatesStackingContext):
     34        * rendering/svg/RenderSVGResourceClipper.cpp:
     35        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
     36        * rendering/svg/SVGRenderTreeAsText.cpp:
     37        (WebCore::writeResources):
     38        * rendering/svg/SVGResources.cpp:
     39        (WebCore::SVGResources::buildCachedResources):
     40
    1412019-10-30  Philippe Normand  <philn@igalia.com>
    242
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r251581 r251776  
    35433543        case CSSPropertyCounterReset:
    35443544            return counterToCSSValue(style, propertyID);
    3545         case CSSPropertyWebkitClipPath: {
     3545        case CSSPropertyClipPath: {
    35463546            auto* operation = style.clipPath();
    35473547            if (!operation)
     
    38443844
    38453845        case CSSPropertyBufferedRendering:
    3846         case CSSPropertyClipPath:
    38473846        case CSSPropertyClipRule:
    38483847        case CSSPropertyMask:
  • trunk/Source/WebCore/css/CSSProperties.json

    r251696 r251776  
    21242124            }
    21252125        },
    2126         "-webkit-clip-path": {
    2127             "codegen-properties": {
     2126        "clip-path": {
     2127            "codegen-properties": {
     2128                "aliases": [
     2129                    "-webkit-clip-path"
     2130                ],
    21282131                "converter": "ClipPath"
    2129             }
    2130         },
    2131         "clip-path": {
    2132             "codegen-properties": {
    2133                 "name-for-methods": "ClipperResource",
    2134                 "converter": "SVGURIReference",
    2135                 "svg": true
    2136             },
    2137             "specification": {
    2138                 "category": "css-masking",
    2139                 "url": "https://www.w3.org/TR/css-masking-1/#the-clip-path"
    21402132            }
    21412133        },
  • trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp

    r245823 r251776  
    121121    case CSSPropertyTextAnchor:
    122122        return CSSPrimitiveValue::create(svgStyle.textAnchor());
    123     case CSSPropertyClipPath:
    124         if (!svgStyle.clipperResource().isEmpty())
    125             return CSSPrimitiveValue::create(svgStyle.clipperResource(), CSSPrimitiveValue::CSS_URI);
    126         return CSSPrimitiveValue::createIdentifier(CSSValueNone);
    127123    case CSSPropertyMask:
    128124        if (!svgStyle.maskerResource().isEmpty())
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r251696 r251776  
    25872587}
    25882588   
    2589 static RefPtr<CSSValue> consumeWebkitClipPath(CSSParserTokenRange& range, const CSSParserContext& context)
     2589static RefPtr<CSSValue> consumeClipPath(CSSParserTokenRange& range, const CSSParserContext& context)
    25902590{
    25912591    if (range.peek().id() == CSSValueNone)
     
    40754075    case CSSPropertyMarkerMid:
    40764076    case CSSPropertyMarkerEnd:
    4077     case CSSPropertyClipPath:
    40784077    case CSSPropertyMask:
    40794078        return consumeNoneOrURI(m_range);
     
    41474146    case CSSPropertyShapeOutside:
    41484147        return consumeShapeOutside(m_range, m_context);
    4149     case CSSPropertyWebkitClipPath:
    4150         return consumeWebkitClipPath(m_range, m_context);
     4148    case CSSPropertyClipPath:
     4149        return consumeClipPath(m_range, m_context);
    41514150    case CSSPropertyJustifyContent:
    41524151        // justify-content property does not allow the <baseline-position> values.
  • trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp

    r249822 r251776  
    16471647        new PropertyWrapperFilter(CSSPropertyAppleColorFilter, &RenderStyle::appleColorFilter, &RenderStyle::setAppleColorFilter),
    16481648
    1649         new PropertyWrapperClipPath(CSSPropertyWebkitClipPath, &RenderStyle::clipPath, &RenderStyle::setClipPath),
     1649        new PropertyWrapperClipPath(CSSPropertyClipPath, &RenderStyle::clipPath, &RenderStyle::setClipPath),
    16501650
    16511651        new PropertyWrapperShape(CSSPropertyShapeOutside, &RenderStyle::shapeOutside, &RenderStyle::setShapeOutside),
  • trunk/Source/WebCore/rendering/style/SVGRenderStyle.h

    r249822 r251776  
    7777    static Color initialLightingColor() { return Color(255, 255, 255); }
    7878    static ShadowData* initialShadow() { return nullptr; }
    79     static String initialClipperResource() { return String(); }
    8079    static String initialMaskerResource() { return String(); }
    8180    static String initialMarkerStartResource() { return String(); }
     
    127126
    128127    // Setters for non-inherited resources
    129     void setClipperResource(const String&);
    130128    void setMaskerResource(const String&);
    131129
     
    175173    const Length& x() const { return m_layoutData->x; }
    176174    const Length& y() const { return m_layoutData->y; }
    177     const String& clipperResource() const { return m_nonInheritedResourceData->clipper; }
    178175    const String& maskerResource() const { return m_nonInheritedResourceData->masker; }
    179176    const String& markerStartResource() const { return m_inheritedResourceData->markerStart; }
     
    190187
    191188    // convenience
    192     bool hasClipper() const { return !clipperResource().isEmpty(); }
    193189    bool hasMasker() const { return !maskerResource().isEmpty(); }
    194190    bool hasMarkers() const { return !markerStartResource().isEmpty() || !markerMidResource().isEmpty() || !markerEndResource().isEmpty(); }
     
    405401}
    406402
    407 inline void SVGRenderStyle::setClipperResource(const String& resource)
    408 {
    409     if (!(m_nonInheritedResourceData->clipper == resource))
    410         m_nonInheritedResourceData.access().clipper = resource;
    411 }
    412 
    413403inline void SVGRenderStyle::setMaskerResource(const String& resource)
    414404{
  • trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp

    r251052 r251776  
    218218
    219219StyleResourceData::StyleResourceData()
    220     : clipper(SVGRenderStyle::initialClipperResource())
    221     , masker(SVGRenderStyle::initialMaskerResource())
     220    : masker(SVGRenderStyle::initialMaskerResource())
    222221{
    223222}
     
    225224inline StyleResourceData::StyleResourceData(const StyleResourceData& other)
    226225    : RefCounted<StyleResourceData>()
    227     , clipper(other.clipper)
    228226    , masker(other.masker)
    229227{
     
    237235bool StyleResourceData::operator==(const StyleResourceData& other) const
    238236{
    239     return clipper == other.clipper
    240         && masker == other.masker;
     237    return masker == other.masker;
    241238}
    242239
     
    509506TextStream& operator<<(TextStream& ts, const StyleResourceData& data)
    510507{
    511     ts.dumpProperty("clipper", data.clipper);
    512508    ts.dumpProperty("masker", data.masker);
    513509    return ts;
  • trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h

    r251052 r251776  
    287287    }
    288288
    289     String clipper;
    290289    String masker;
    291290
  • trunk/Source/WebCore/rendering/style/WillChangeData.cpp

    r243275 r251776  
    7171    case CSSPropertyWebkitTransformStyle:
    7272    case CSSPropertyClipPath:
    73     case CSSPropertyWebkitClipPath:
    7473    case CSSPropertyMask:
    7574    case CSSPropertyOpacity:
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp

    r239461 r251776  
    7777{
    7878    // If the current clip-path gets clipped itself, we have to fallback to masking.
    79     if (!style().svgStyle().clipperResource().isEmpty())
     79    if (style().clipPath())
    8080        return false;
    8181    WindRule clipRule = WindRule::NonZero;
     
    102102        const SVGRenderStyle& svgStyle = style.svgStyle();
    103103        // Current shape in clip-path gets clipped too. Fallback to masking.
    104         if (!svgStyle.clipperResource().isEmpty())
     104        if (style.clipPath())
    105105            return false;
    106106        // Fallback to masking, if there is more than one clipping path.
  • trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp

    r246490 r251776  
    564564        }
    565565    }
    566     if (!svgStyle.clipperResource().isEmpty()) {
    567         if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(renderer.document(), svgStyle.clipperResource())) {
     566    if (style.clipPath() && is<ReferenceClipPathOperation>(style.clipPath())) {
     567        auto resourceClipPath = downcast<ReferenceClipPathOperation>(style.clipPath());
     568        AtomString id = resourceClipPath->fragment();
     569        if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(renderer.document(), id)) {
    568570            ts << indent << " ";
    569             writeNameAndQuotedValue(ts, "clipPath", svgStyle.clipperResource());
     571            writeNameAndQuotedValue(ts, "clipPath", resourceClipPath->fragment());
    570572            ts << " ";
    571573            writeStandardPrefix(ts, *clipper, behavior, WriteIndentOrNot::No);
  • trunk/Source/WebCore/rendering/svg/SVGResources.cpp

    r248846 r251776  
    216216    bool foundResources = false;
    217217    if (clipperFilterMaskerTags().contains(tagName)) {
    218         if (svgStyle.hasClipper()) {
    219             AtomString id(svgStyle.clipperResource());
    220             if (setClipper(getRenderSVGResourceById<RenderSVGResourceClipper>(document, id)))
    221                 foundResources = true;
    222             else
    223                 registerPendingResource(extensions, id, element);
    224         } else if (is<ReferenceClipPathOperation>(style.clipPath())) {
     218        if (is<ReferenceClipPathOperation>(style.clipPath())) {
    225219            // FIXME: -webkit-clip-path should support external resources
    226220            // https://bugs.webkit.org/show_bug.cgi?id=127032
Note: See TracChangeset for help on using the changeset viewer.