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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251776
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-10-30 Dirk Schulze <krit@webkit.org>
+
+ [css-masking] Unprefix -webkit-clip-path
+ https://bugs.webkit.org/show_bug.cgi?id=187888
+
+ Reviewed by Simon Fraser.
+
+ 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:
+
2019-10-25 Antoine Quint <graouts@apple.com>
[Web Animations] Update WPT tests related to Web Animations and remove imported Mozilla tests
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<body style="margin:0">
- <div style="position:absolute; top:0; left:0; clip-path: url(clipPath-html-01.xhtml#c1); width:500px; height:500px; background:lime;"></div>
- <svg:svg height="0">
- <!-- use an empty g to force clipPath-html-01.xhtml to load before onload -->
- <svg:use xlink:href="clipPath-html-01.xhtml#empty" />
- </svg:svg>
+ <div style="position:absolute; top:0; left:250px; width:250px; height:500px; background:lime;"></div>
</body>
</html>
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<body style="margin:0">
- <div style="clip-path: url(clipPath-html-02.xhtml#c1); width:500px; height:200px; background:lime;">
+ <div style="width:500px; height:200px; background:lime;">
<div style="height:200px;"/>
<div style="height:200px; background:blue;"/>
</div>
- <svg:svg height="0">
- <!-- use an empty g to force clipPath-html-02.xhtml to load before onload -->
- <svg:use xlink:href="clipPath-html-02.xhtml#empty" />
- </svg:svg>
</body>
</html>
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<body style="margin:0">
- <div style="clip-path: url(#c1); width:500px; height:200px; background:lime;">
+ <div style="clip-path: url(#c1); width:500px; height:500px; background:lime;">
<div style="height:200px;"/>
<div style="height:200px; background:blue;"/>
</div>
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<body style="margin:0">
- <div style="clip-path: url(clipPath-html-03.xhtml#c1); width:500px; height:200px; background:lime;">
- <div style="height:200px;"/>
- <div style="height:200px; background:blue;"/>
- </div>
- <svg:svg height="0">
- <!-- use an empty g to force clipPath-html-03.xhtml to load before onload -->
- <svg:use xlink:href="clipPath-html-03.xhtml#empty" />
+ <svg:svg width="200" height="300">
+ <svg:rect width="200" height="150" fill="lime"/>
+ <svg:rect x="100" y="150" width="100" height="50" fill="lime"/>
+ <svg:rect x="100" y="200" width="100" height="100" fill="blue"/>
</svg:svg>
</body>
</html>
</head>
<body style="margin:0; width:350px; line-height:100px;">
<span class="unit"/><span class="unit"
- /><span style="clip-path:url(clipPath-html-04.xhtml#c1); background:lime;"><span class="unit"/><span class="unit"
+ /><span style="-webkit-clip-path:polygon(50px 0, 250px 0, 250px 200px, 50px 200px); background:lime;"><span class="unit"/><span class="unit"
/></span>
- <svg:svg height="0">
- <!-- use an empty g to force clipPath-html-04.xhtml to load before onload -->
- <svg:use xlink:href="clipPath-html-04.xhtml#empty" />
- </svg:svg>
</body>
</html>
</head>
<body style="margin:0; width:350px; line-height:100px;">
<span class="unit"/><span class="unit"
- /><span style="clip-path:url(clipPath-html-05.xhtml#c1); background:lime;"><span class="unit"/><span class="unit"
+ /><span style="-webkit-clip-path: polygon(10% 0, 90% 0, 90% 100%, 10% 100%); background:lime;"><span class="unit"/><span class="unit"
/></span>
- <svg:svg height="0">
- <!-- use an empty g to force clipPath-html-05.xhtml to load before onload -->
- <svg:use xlink:href="clipPath-html-05.xhtml#empty" />
- </svg:svg>
</body>
</html>
</style>
</head>
<body style="margin:0">
- <span style="clip-path: url(clipPath-html-06.xhtml#c1);">
+ <span style="-webkit-clip-path: polygon(0 50%, 50% 50%, 50% 100%, 0 100%);">
<span class="unit" style="background:lime;"></span>
<div style="height:200px; width:100px;"/>
<span class="unit" style="background:lime;"></span>
+2019-10-30 Dirk Schulze <krit@webkit.org>
+
+ [css-masking] Unprefix -webkit-clip-path
+ https://bugs.webkit.org/show_bug.cgi?id=187888
+
+ Reviewed by Simon Fraser.
+
+ 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:
+
2019-10-30 Chris Dumez <cdumez@apple.com>
Unreviewed, unskip imported/w3c/web-platform-tests/cors/credentials-flag.htm
-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
-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
-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
-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
+PASS Property clip-path value 'circle(calc(10px + 0.5em) at -50% 50%)' computes to 'circle(30px at -50% 50%)'
+PASS Property clip-path value 'circle(calc(10px - 0.5em) at 50% -50%)' computes to 'circle(0px at 50% -50%)'
+PASS Property clip-path value 'ellipse(at 50% 50%)' computes to 'ellipse(at 50% 50%)'
+PASS Property clip-path value 'ellipse(60% closest-side at 50% 50%)' computes to 'ellipse(60% closest-side at 50% 50%)'
PASS e.style['clip-path'] = "none" should set the property value
-FAIL e.style['clip-path'] = "inset(100%)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "inset(0 1px)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "inset(0px 1px 2%)" should set the property value assert_not_equals: property should be set got disallowed value ""
-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 ""
-FAIL e.style['clip-path'] = "inset(0px round 100%)" should set the property value assert_not_equals: property should be set got disallowed value ""
-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 ""
-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 ""
-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 ""
-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 ""
-FAIL e.style['clip-path'] = "circle()" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "circle(1px)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "circle(closest-side)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "circle(at 10% 20%)" should set the property value assert_not_equals: property should be set got disallowed value ""
-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 ""
-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 ""
-FAIL e.style['clip-path'] = "ellipse()" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "ellipse(1px closest-side)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "ellipse(at 10% 20%)" should set the property value assert_not_equals: property should be set got disallowed value ""
-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 ""
-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 ""
-FAIL e.style['clip-path'] = "polygon(1% 2%)" should set the property value assert_not_equals: property should be set got disallowed value ""
-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 ""
-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 ""
-FAIL e.style['clip-path'] = "border-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "padding-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "content-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "margin-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "fill-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "stroke-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clip-path'] = "view-box" should set the property value assert_not_equals: property should be set got disallowed value ""
-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 ""
-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 ""
+PASS e.style['clip-path'] = "inset(100%)" should set the property value
+PASS e.style['clip-path'] = "inset(0 1px)" should set the property value
+PASS e.style['clip-path'] = "inset(0px 1px 2%)" should set the property value
+PASS e.style['clip-path'] = "inset(0px 1px 2% 3em)" should set the property value
+PASS e.style['clip-path'] = "inset(0px round 100%)" should set the property value
+PASS e.style['clip-path'] = "inset(0px round 0 1px)" should set the property value
+PASS e.style['clip-path'] = "inset(0px round 0px 1px 2%)" should set the property value
+PASS e.style['clip-path'] = "inset(0px round 0px 1px 2% 3em)" should set the property value
+PASS e.style['clip-path'] = "inset(10px round 20% / 0px 1px 2% 3em)" should set the property value
+PASS e.style['clip-path'] = "circle()" should set the property value
+PASS e.style['clip-path'] = "circle(1px)" should set the property value
+PASS e.style['clip-path'] = "circle(closest-side)" should set the property value
+PASS e.style['clip-path'] = "circle(at 10% 20%)" should set the property value
+PASS e.style['clip-path'] = "circle(farthest-side at center top)" should set the property value
+PASS e.style['clip-path'] = "circle(4% at top right)" should set the property value
+PASS e.style['clip-path'] = "ellipse()" should set the property value
+PASS e.style['clip-path'] = "ellipse(1px closest-side)" should set the property value
+PASS e.style['clip-path'] = "ellipse(at 10% 20%)" should set the property value
+PASS e.style['clip-path'] = "ellipse(closest-side closest-side at 10% 20%)" should set the property value
+PASS e.style['clip-path'] = "ellipse(farthest-side 4% at bottom left)" should set the property value
+PASS e.style['clip-path'] = "polygon(1% 2%)" should set the property value
+PASS e.style['clip-path'] = "polygon(nonzero, 1px 2px, 3em 4em)" should set the property value
+PASS e.style['clip-path'] = "polygon(evenodd, 1px 2px, 3em 4em, 5pt 6%)" should set the property value
+PASS e.style['clip-path'] = "border-box" should set the property value
+PASS e.style['clip-path'] = "padding-box" should set the property value
+PASS e.style['clip-path'] = "content-box" should set the property value
+PASS e.style['clip-path'] = "margin-box" should set the property value
+PASS e.style['clip-path'] = "fill-box" should set the property value
+PASS e.style['clip-path'] = "stroke-box" should set the property value
+PASS e.style['clip-path'] = "view-box" should set the property value
+PASS e.style['clip-path'] = "circle(7% at 8% 9%) border-box" should set the property value
+PASS e.style['clip-path'] = "border-box circle(7% at 8% 9%)" should set the property value
PASS e.style['clip-path'] = "url(https://example.com/)" should set the property value
PASS e.style['clip-path'] = "url(\"https://example.com/\")" should set the property value
-FAIL Serialization of basic shapes assert_equals: circle(at left bottom) expected "circle(at 0% 100%)" but got ""
-FAIL Serialization of basic shapes 1 assert_equals: circle(at bottom left) expected "circle(at 0% 100%)" but got ""
-FAIL Serialization of basic shapes 2 assert_equals: circle(at right calc(10% + 5px)) expected "circle(at 100% calc(10% + 5px))" but got ""
-FAIL Serialization of basic shapes 3 assert_equals: ellipse(at left bottom) expected "ellipse(at 0% 100%)" but got ""
-FAIL Serialization of basic shapes 4 assert_equals: ellipse(at bottom left) expected "ellipse(at 0% 100%)" but got ""
-FAIL Serialization of basic shapes 5 assert_equals: ellipse(at right calc(10% + 5px)) expected "ellipse(at 100% calc(10% + 5px))" but got ""
-FAIL Serialization of basic shapes 6 assert_equals: circle() expected "circle(at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 7 assert_equals: circle(0px) expected "circle(0px at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 8 assert_equals: circle(closest-side) expected "circle(at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 9 assert_equals: circle(farthest-side) expected "circle(farthest-side at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 10 assert_equals: ellipse() expected "ellipse(at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 11 assert_equals: ellipse(closest-side farthest-side) expected "ellipse(closest-side farthest-side at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 12 assert_equals: circle(at top 0% right 5px) expected "circle(at right 5px top 0%)" but got ""
-FAIL Serialization of basic shapes 13 assert_equals: ellipse(at top 0% right 10px) expected "ellipse(at right 10px top 0%)" but got ""
-FAIL Serialization of basic shapes 14 assert_equals: circle(closest-side at center) expected "circle(at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 15 assert_equals: ellipse(closest-side closest-side at center) expected "ellipse(at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 16 assert_equals: circle(farthest-side at center) expected "circle(farthest-side at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 17 assert_equals: circle(10px at center) expected "circle(10px at 50% 50%)" but got ""
-FAIL Serialization of basic shapes 18 assert_equals: ellipse(farthest-side 10px at center) expected "ellipse(farthest-side 10px at 50% 50%)" but got ""
-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 ""
-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 ""
-FAIL Serialization of basic shapes 21 assert_equals: circle(at right 5px bottom 10px) expected "circle(at right 5px bottom 10px)" but got ""
-FAIL Serialization of basic shapes 22 assert_equals: ellipse(at right 5px bottom 10px) expected "ellipse(at right 5px bottom 10px)" but got ""
-FAIL Serialization of basic shapes 23 assert_equals: circle(at right 5% top 0px) expected "circle(at 95% 0%)" but got ""
-FAIL Serialization of basic shapes 24 assert_equals: ellipse(at right 5% top 0px) expected "ellipse(at 95% 0%)" but got ""
-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 ""
-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 ""
+PASS Serialization of basic shapes
+PASS Serialization of basic shapes 1
+PASS Serialization of basic shapes 2
+PASS Serialization of basic shapes 3
+PASS Serialization of basic shapes 4
+PASS Serialization of basic shapes 5
+PASS Serialization of basic shapes 6
+PASS Serialization of basic shapes 7
+PASS Serialization of basic shapes 8
+PASS Serialization of basic shapes 9
+PASS Serialization of basic shapes 10
+PASS Serialization of basic shapes 11
+PASS Serialization of basic shapes 12
+PASS Serialization of basic shapes 13
+PASS Serialization of basic shapes 14
+PASS Serialization of basic shapes 15
+PASS Serialization of basic shapes 16
+PASS Serialization of basic shapes 17
+PASS Serialization of basic shapes 18
+PASS Serialization of basic shapes 19
+PASS Serialization of basic shapes 20
+PASS Serialization of basic shapes 21
+PASS Serialization of basic shapes 22
+PASS Serialization of basic shapes 23
+PASS Serialization of basic shapes 24
+PASS Serialization of basic shapes 25
+PASS Serialization of basic shapes 26
.flex {
display: flex;
height: 50px;
+ width: 200px;
background: rebeccapurple;
+ left: 50px;
+ top: -100px;
+ position: relative;
}
</style>
<div class="test">
+2019-10-30 Dirk Schulze <krit@webkit.org>
+
+ [css-masking] Unprefix -webkit-clip-path
+ https://bugs.webkit.org/show_bug.cgi?id=187888
+
+ Reviewed by Simon Fraser.
+
+ 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):
+
2019-10-30 Philippe Normand <philn@igalia.com>
REGRESSION(r249428): [GStreamer] VP9 video rendered green
return counterToCSSValue(style, propertyID);
case CSSPropertyCounterReset:
return counterToCSSValue(style, propertyID);
- case CSSPropertyWebkitClipPath: {
+ case CSSPropertyClipPath: {
auto* operation = style.clipPath();
if (!operation)
return cssValuePool.createIdentifierValue(CSSValueNone);
#endif
case CSSPropertyBufferedRendering:
- case CSSPropertyClipPath:
case CSSPropertyClipRule:
case CSSPropertyMask:
case CSSPropertyEnableBackground:
"url": "https://www.w3.org/TR/CSS22/visufx.html#propdef-clip"
}
},
- "-webkit-clip-path": {
- "codegen-properties": {
- "converter": "ClipPath"
- }
- },
"clip-path": {
"codegen-properties": {
- "name-for-methods": "ClipperResource",
- "converter": "SVGURIReference",
- "svg": true
- },
- "specification": {
- "category": "css-masking",
- "url": "https://www.w3.org/TR/css-masking-1/#the-clip-path"
+ "aliases": [
+ "-webkit-clip-path"
+ ],
+ "converter": "ClipPath"
}
},
"clip-rule": {
return CSSPrimitiveValue::create(svgStyle.dominantBaseline());
case CSSPropertyTextAnchor:
return CSSPrimitiveValue::create(svgStyle.textAnchor());
- case CSSPropertyClipPath:
- if (!svgStyle.clipperResource().isEmpty())
- return CSSPrimitiveValue::create(svgStyle.clipperResource(), CSSPrimitiveValue::CSS_URI);
- return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyMask:
if (!svgStyle.maskerResource().isEmpty())
return CSSPrimitiveValue::create(svgStyle.maskerResource(), CSSPrimitiveValue::CSS_URI);
return list;
}
-static RefPtr<CSSValue> consumeWebkitClipPath(CSSParserTokenRange& range, const CSSParserContext& context)
+static RefPtr<CSSValue> consumeClipPath(CSSParserTokenRange& range, const CSSParserContext& context)
{
if (range.peek().id() == CSSValueNone)
return consumeIdent(range);
case CSSPropertyMarkerStart:
case CSSPropertyMarkerMid:
case CSSPropertyMarkerEnd:
- case CSSPropertyClipPath:
case CSSPropertyMask:
return consumeNoneOrURI(m_range);
case CSSPropertyFlexBasis:
return consumeVerticalAlign(m_range, m_context.mode);
case CSSPropertyShapeOutside:
return consumeShapeOutside(m_range, m_context);
- case CSSPropertyWebkitClipPath:
- return consumeWebkitClipPath(m_range, m_context);
+ case CSSPropertyClipPath:
+ return consumeClipPath(m_range, m_context);
case CSSPropertyJustifyContent:
// justify-content property does not allow the <baseline-position> values.
if (isBaselineKeyword(m_range.peek().id()))
#endif
new PropertyWrapperFilter(CSSPropertyAppleColorFilter, &RenderStyle::appleColorFilter, &RenderStyle::setAppleColorFilter),
- new PropertyWrapperClipPath(CSSPropertyWebkitClipPath, &RenderStyle::clipPath, &RenderStyle::setClipPath),
+ new PropertyWrapperClipPath(CSSPropertyClipPath, &RenderStyle::clipPath, &RenderStyle::setClipPath),
new PropertyWrapperShape(CSSPropertyShapeOutside, &RenderStyle::shapeOutside, &RenderStyle::setShapeOutside),
new LengthPropertyWrapper(CSSPropertyShapeMargin, &RenderStyle::shapeMargin, &RenderStyle::setShapeMargin),
static Color initialFloodColor() { return Color(0, 0, 0); }
static Color initialLightingColor() { return Color(255, 255, 255); }
static ShadowData* initialShadow() { return nullptr; }
- static String initialClipperResource() { return String(); }
static String initialMaskerResource() { return String(); }
static String initialMarkerStartResource() { return String(); }
static String initialMarkerMidResource() { return String(); }
void setShadow(std::unique_ptr<ShadowData>&& data) { m_shadowData.access().shadow = WTFMove(data); }
// Setters for non-inherited resources
- void setClipperResource(const String&);
void setMaskerResource(const String&);
// Setters for inherited resources
const Length& ry() const { return m_layoutData->ry; }
const Length& x() const { return m_layoutData->x; }
const Length& y() const { return m_layoutData->y; }
- const String& clipperResource() const { return m_nonInheritedResourceData->clipper; }
const String& maskerResource() const { return m_nonInheritedResourceData->masker; }
const String& markerStartResource() const { return m_inheritedResourceData->markerStart; }
const String& markerMidResource() const { return m_inheritedResourceData->markerMid; }
const String& visitedLinkStrokePaintUri() const { return m_strokeData->visitedLinkPaintUri; }
// convenience
- bool hasClipper() const { return !clipperResource().isEmpty(); }
bool hasMasker() const { return !maskerResource().isEmpty(); }
bool hasMarkers() const { return !markerStartResource().isEmpty() || !markerMidResource().isEmpty() || !markerEndResource().isEmpty(); }
bool hasStroke() const { return strokePaintType() != SVGPaintType::None; }
m_miscData.access().baselineShiftValue = shiftValue;
}
-inline void SVGRenderStyle::setClipperResource(const String& resource)
-{
- if (!(m_nonInheritedResourceData->clipper == resource))
- m_nonInheritedResourceData.access().clipper = resource;
-}
-
inline void SVGRenderStyle::setMaskerResource(const String& resource)
{
if (!(m_nonInheritedResourceData->masker == resource))
}
StyleResourceData::StyleResourceData()
- : clipper(SVGRenderStyle::initialClipperResource())
- , masker(SVGRenderStyle::initialMaskerResource())
+ : masker(SVGRenderStyle::initialMaskerResource())
{
}
inline StyleResourceData::StyleResourceData(const StyleResourceData& other)
: RefCounted<StyleResourceData>()
- , clipper(other.clipper)
, masker(other.masker)
{
}
bool StyleResourceData::operator==(const StyleResourceData& other) const
{
- return clipper == other.clipper
- && masker == other.masker;
+ return masker == other.masker;
}
StyleInheritedResourceData::StyleInheritedResourceData()
TextStream& operator<<(TextStream& ts, const StyleResourceData& data)
{
- ts.dumpProperty("clipper", data.clipper);
ts.dumpProperty("masker", data.masker);
return ts;
}
return !(*this == other);
}
- String clipper;
String masker;
private:
case CSSPropertyTransformStyle:
case CSSPropertyWebkitTransformStyle:
case CSSPropertyClipPath:
- case CSSPropertyWebkitClipPath:
case CSSPropertyMask:
case CSSPropertyOpacity:
case CSSPropertyPosition:
bool RenderSVGResourceClipper::pathOnlyClipping(GraphicsContext& context, const AffineTransform& animatedLocalTransform, const FloatRect& objectBoundingBox)
{
// If the current clip-path gets clipped itself, we have to fallback to masking.
- if (!style().svgStyle().clipperResource().isEmpty())
+ if (style().clipPath())
return false;
WindRule clipRule = WindRule::NonZero;
Path clipPath = Path();
continue;
const SVGRenderStyle& svgStyle = style.svgStyle();
// Current shape in clip-path gets clipped too. Fallback to masking.
- if (!svgStyle.clipperResource().isEmpty())
+ if (style.clipPath())
return false;
// Fallback to masking, if there is more than one clipping path.
if (clipPath.isEmpty()) {
ts << " " << masker->resourceBoundingBox(renderer) << "\n";
}
}
- if (!svgStyle.clipperResource().isEmpty()) {
- if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(renderer.document(), svgStyle.clipperResource())) {
+ if (style.clipPath() && is<ReferenceClipPathOperation>(style.clipPath())) {
+ auto resourceClipPath = downcast<ReferenceClipPathOperation>(style.clipPath());
+ AtomString id = resourceClipPath->fragment();
+ if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(renderer.document(), id)) {
ts << indent << " ";
- writeNameAndQuotedValue(ts, "clipPath", svgStyle.clipperResource());
+ writeNameAndQuotedValue(ts, "clipPath", resourceClipPath->fragment());
ts << " ";
writeStandardPrefix(ts, *clipper, behavior, WriteIndentOrNot::No);
ts << " " << clipper->resourceBoundingBox(renderer) << "\n";
bool foundResources = false;
if (clipperFilterMaskerTags().contains(tagName)) {
- if (svgStyle.hasClipper()) {
- AtomString id(svgStyle.clipperResource());
- if (setClipper(getRenderSVGResourceById<RenderSVGResourceClipper>(document, id)))
- foundResources = true;
- else
- registerPendingResource(extensions, id, element);
- } else if (is<ReferenceClipPathOperation>(style.clipPath())) {
+ if (is<ReferenceClipPathOperation>(style.clipPath())) {
// FIXME: -webkit-clip-path should support external resources
// https://bugs.webkit.org/show_bug.cgi?id=127032
auto& clipPath = downcast<ReferenceClipPathOperation>(*style.clipPath());