Changeset 251776 in webkit
- Timestamp:
- Oct 30, 2019 10:07:02 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/mozilla/ChangeLog
r251591 r251776 1 2019-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 1 22 2019-10-25 Antoine Quint <graouts@apple.com> 2 23 -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-01-expected.xhtml
r177330 r251776 7 7 xmlns:xlink="http://www.w3.org/1999/xlink"> 8 8 <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> 14 10 </body> 15 11 </html> -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-02-expected.xhtml
r177330 r251776 7 7 xmlns:xlink="http://www.w3.org/1999/xlink"> 8 8 <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;"> 10 10 <div style="height:200px;"/> 11 11 <div style="height:200px; background:blue;"/> 12 12 </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>17 13 </body> 18 14 </html> -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
r177330 r251776 7 7 xmlns:xlink="http://www.w3.org/1999/xlink"> 8 8 <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;"> 10 10 <div style="height:200px;"/> 11 11 <div style="height:200px; background:blue;"/> -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-03-expected.xhtml
r177330 r251776 7 7 xmlns:xlink="http://www.w3.org/1999/xlink"> 8 8 <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"/> 16 13 </svg:svg> 17 14 </body> -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-04-expected.xhtml
r177330 r251776 13 13 <body style="margin:0; width:350px; line-height:100px;"> 14 14 <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" 16 16 /></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>21 17 </body> 22 18 </html> -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-05-expected.xhtml
r177330 r251776 13 13 <body style="margin:0; width:350px; line-height:100px;"> 14 14 <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" 16 16 /></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>21 17 </body> 22 18 </html> -
trunk/LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-06-expected.xhtml
r177330 r251776 12 12 </head> 13 13 <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%);"> 15 15 <span class="unit" style="background:lime;"></span> 16 16 <div style="height:200px; width:100px;"/> -
trunk/LayoutTests/imported/w3c/ChangeLog
r251775 r251776 1 2019-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 1 17 2019-10-30 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt
r251634 r251776 1 1 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 2 PASS Property clip-path value 'circle(calc(10px + 0.5em) at -50% 50%)' computes to 'circle(30px at -50% 50%)' 3 PASS Property clip-path value 'circle(calc(10px - 0.5em) at 50% -50%)' computes to 'circle(0px at 50% -50%)' 4 PASS Property clip-path value 'ellipse(at 50% 50%)' computes to 'ellipse(at 50% 50%)' 5 PASS Property clip-path value 'ellipse(60% closest-side at 50% 50%)' computes to 'ellipse(60% closest-side at 50% 50%)' 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt
r250653 r251776 1 1 2 2 PASS 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 "" 3 PASS e.style['clip-path'] = "inset(100%)" should set the property value 4 PASS e.style['clip-path'] = "inset(0 1px)" should set the property value 5 PASS e.style['clip-path'] = "inset(0px 1px 2%)" should set the property value 6 PASS e.style['clip-path'] = "inset(0px 1px 2% 3em)" should set the property value 7 PASS e.style['clip-path'] = "inset(0px round 100%)" should set the property value 8 PASS e.style['clip-path'] = "inset(0px round 0 1px)" should set the property value 9 PASS e.style['clip-path'] = "inset(0px round 0px 1px 2%)" should set the property value 10 PASS e.style['clip-path'] = "inset(0px round 0px 1px 2% 3em)" should set the property value 11 PASS e.style['clip-path'] = "inset(10px round 20% / 0px 1px 2% 3em)" should set the property value 12 PASS e.style['clip-path'] = "circle()" should set the property value 13 PASS e.style['clip-path'] = "circle(1px)" should set the property value 14 PASS e.style['clip-path'] = "circle(closest-side)" should set the property value 15 PASS e.style['clip-path'] = "circle(at 10% 20%)" should set the property value 16 PASS e.style['clip-path'] = "circle(farthest-side at center top)" should set the property value 17 PASS e.style['clip-path'] = "circle(4% at top right)" should set the property value 18 PASS e.style['clip-path'] = "ellipse()" should set the property value 19 PASS e.style['clip-path'] = "ellipse(1px closest-side)" should set the property value 20 PASS e.style['clip-path'] = "ellipse(at 10% 20%)" should set the property value 21 PASS e.style['clip-path'] = "ellipse(closest-side closest-side at 10% 20%)" should set the property value 22 PASS e.style['clip-path'] = "ellipse(farthest-side 4% at bottom left)" should set the property value 23 PASS e.style['clip-path'] = "polygon(1% 2%)" should set the property value 24 PASS e.style['clip-path'] = "polygon(nonzero, 1px 2px, 3em 4em)" should set the property value 25 PASS e.style['clip-path'] = "polygon(evenodd, 1px 2px, 3em 4em, 5pt 6%)" should set the property value 26 PASS e.style['clip-path'] = "border-box" should set the property value 27 PASS e.style['clip-path'] = "padding-box" should set the property value 28 PASS e.style['clip-path'] = "content-box" should set the property value 29 PASS e.style['clip-path'] = "margin-box" should set the property value 30 PASS e.style['clip-path'] = "fill-box" should set the property value 31 PASS e.style['clip-path'] = "stroke-box" should set the property value 32 PASS e.style['clip-path'] = "view-box" should set the property value 33 PASS e.style['clip-path'] = "circle(7% at 8% 9%) border-box" should set the property value 34 PASS e.style['clip-path'] = "border-box circle(7% at 8% 9%)" should set the property value 35 35 PASS e.style['clip-path'] = "url(https://example.com/)" should set the property value 36 36 PASS 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 1 1 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 "" 2 PASS Serialization of basic shapes 3 PASS Serialization of basic shapes 1 4 PASS Serialization of basic shapes 2 5 PASS Serialization of basic shapes 3 6 PASS Serialization of basic shapes 4 7 PASS Serialization of basic shapes 5 8 PASS Serialization of basic shapes 6 9 PASS Serialization of basic shapes 7 10 PASS Serialization of basic shapes 8 11 PASS Serialization of basic shapes 9 12 PASS Serialization of basic shapes 10 13 PASS Serialization of basic shapes 11 14 PASS Serialization of basic shapes 12 15 PASS Serialization of basic shapes 13 16 PASS Serialization of basic shapes 14 17 PASS Serialization of basic shapes 15 18 PASS Serialization of basic shapes 16 19 PASS Serialization of basic shapes 17 20 PASS Serialization of basic shapes 18 21 PASS Serialization of basic shapes 19 22 PASS Serialization of basic shapes 20 23 PASS Serialization of basic shapes 21 24 PASS Serialization of basic shapes 22 25 PASS Serialization of basic shapes 23 26 PASS Serialization of basic shapes 24 27 PASS Serialization of basic shapes 25 28 PASS Serialization of basic shapes 26 29 29 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html
r232903 r251776 18 18 display: flex; 19 19 height: 50px; 20 width: 200px; 20 21 background: rebeccapurple; 22 left: 50px; 23 top: -100px; 24 position: relative; 21 25 } 22 26 </style> -
trunk/Source/WebCore/ChangeLog
r251772 r251776 1 2019-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 1 41 2019-10-30 Philippe Normand <philn@igalia.com> 2 42 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r251581 r251776 3543 3543 case CSSPropertyCounterReset: 3544 3544 return counterToCSSValue(style, propertyID); 3545 case CSSProperty WebkitClipPath: {3545 case CSSPropertyClipPath: { 3546 3546 auto* operation = style.clipPath(); 3547 3547 if (!operation) … … 3844 3844 3845 3845 case CSSPropertyBufferedRendering: 3846 case CSSPropertyClipPath:3847 3846 case CSSPropertyClipRule: 3848 3847 case CSSPropertyMask: -
trunk/Source/WebCore/css/CSSProperties.json
r251696 r251776 2124 2124 } 2125 2125 }, 2126 "-webkit-clip-path": { 2127 "codegen-properties": { 2126 "clip-path": { 2127 "codegen-properties": { 2128 "aliases": [ 2129 "-webkit-clip-path" 2130 ], 2128 2131 "converter": "ClipPath" 2129 }2130 },2131 "clip-path": {2132 "codegen-properties": {2133 "name-for-methods": "ClipperResource",2134 "converter": "SVGURIReference",2135 "svg": true2136 },2137 "specification": {2138 "category": "css-masking",2139 "url": "https://www.w3.org/TR/css-masking-1/#the-clip-path"2140 2132 } 2141 2133 }, -
trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
r245823 r251776 121 121 case CSSPropertyTextAnchor: 122 122 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);127 123 case CSSPropertyMask: 128 124 if (!svgStyle.maskerResource().isEmpty()) -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r251696 r251776 2587 2587 } 2588 2588 2589 static RefPtr<CSSValue> consume WebkitClipPath(CSSParserTokenRange& range, const CSSParserContext& context)2589 static RefPtr<CSSValue> consumeClipPath(CSSParserTokenRange& range, const CSSParserContext& context) 2590 2590 { 2591 2591 if (range.peek().id() == CSSValueNone) … … 4075 4075 case CSSPropertyMarkerMid: 4076 4076 case CSSPropertyMarkerEnd: 4077 case CSSPropertyClipPath:4078 4077 case CSSPropertyMask: 4079 4078 return consumeNoneOrURI(m_range); … … 4147 4146 case CSSPropertyShapeOutside: 4148 4147 return consumeShapeOutside(m_range, m_context); 4149 case CSSProperty WebkitClipPath:4150 return consume WebkitClipPath(m_range, m_context);4148 case CSSPropertyClipPath: 4149 return consumeClipPath(m_range, m_context); 4151 4150 case CSSPropertyJustifyContent: 4152 4151 // justify-content property does not allow the <baseline-position> values. -
trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
r249822 r251776 1647 1647 new PropertyWrapperFilter(CSSPropertyAppleColorFilter, &RenderStyle::appleColorFilter, &RenderStyle::setAppleColorFilter), 1648 1648 1649 new PropertyWrapperClipPath(CSSProperty WebkitClipPath, &RenderStyle::clipPath, &RenderStyle::setClipPath),1649 new PropertyWrapperClipPath(CSSPropertyClipPath, &RenderStyle::clipPath, &RenderStyle::setClipPath), 1650 1650 1651 1651 new PropertyWrapperShape(CSSPropertyShapeOutside, &RenderStyle::shapeOutside, &RenderStyle::setShapeOutside), -
trunk/Source/WebCore/rendering/style/SVGRenderStyle.h
r249822 r251776 77 77 static Color initialLightingColor() { return Color(255, 255, 255); } 78 78 static ShadowData* initialShadow() { return nullptr; } 79 static String initialClipperResource() { return String(); }80 79 static String initialMaskerResource() { return String(); } 81 80 static String initialMarkerStartResource() { return String(); } … … 127 126 128 127 // Setters for non-inherited resources 129 void setClipperResource(const String&);130 128 void setMaskerResource(const String&); 131 129 … … 175 173 const Length& x() const { return m_layoutData->x; } 176 174 const Length& y() const { return m_layoutData->y; } 177 const String& clipperResource() const { return m_nonInheritedResourceData->clipper; }178 175 const String& maskerResource() const { return m_nonInheritedResourceData->masker; } 179 176 const String& markerStartResource() const { return m_inheritedResourceData->markerStart; } … … 190 187 191 188 // convenience 192 bool hasClipper() const { return !clipperResource().isEmpty(); }193 189 bool hasMasker() const { return !maskerResource().isEmpty(); } 194 190 bool hasMarkers() const { return !markerStartResource().isEmpty() || !markerMidResource().isEmpty() || !markerEndResource().isEmpty(); } … … 405 401 } 406 402 407 inline void SVGRenderStyle::setClipperResource(const String& resource)408 {409 if (!(m_nonInheritedResourceData->clipper == resource))410 m_nonInheritedResourceData.access().clipper = resource;411 }412 413 403 inline void SVGRenderStyle::setMaskerResource(const String& resource) 414 404 { -
trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
r251052 r251776 218 218 219 219 StyleResourceData::StyleResourceData() 220 : clipper(SVGRenderStyle::initialClipperResource()) 221 , masker(SVGRenderStyle::initialMaskerResource()) 220 : masker(SVGRenderStyle::initialMaskerResource()) 222 221 { 223 222 } … … 225 224 inline StyleResourceData::StyleResourceData(const StyleResourceData& other) 226 225 : RefCounted<StyleResourceData>() 227 , clipper(other.clipper)228 226 , masker(other.masker) 229 227 { … … 237 235 bool StyleResourceData::operator==(const StyleResourceData& other) const 238 236 { 239 return clipper == other.clipper 240 && masker == other.masker; 237 return masker == other.masker; 241 238 } 242 239 … … 509 506 TextStream& operator<<(TextStream& ts, const StyleResourceData& data) 510 507 { 511 ts.dumpProperty("clipper", data.clipper);512 508 ts.dumpProperty("masker", data.masker); 513 509 return ts; -
trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h
r251052 r251776 287 287 } 288 288 289 String clipper;290 289 String masker; 291 290 -
trunk/Source/WebCore/rendering/style/WillChangeData.cpp
r243275 r251776 71 71 case CSSPropertyWebkitTransformStyle: 72 72 case CSSPropertyClipPath: 73 case CSSPropertyWebkitClipPath:74 73 case CSSPropertyMask: 75 74 case CSSPropertyOpacity: -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
r239461 r251776 77 77 { 78 78 // If the current clip-path gets clipped itself, we have to fallback to masking. 79 if ( !style().svgStyle().clipperResource().isEmpty())79 if (style().clipPath()) 80 80 return false; 81 81 WindRule clipRule = WindRule::NonZero; … … 102 102 const SVGRenderStyle& svgStyle = style.svgStyle(); 103 103 // Current shape in clip-path gets clipped too. Fallback to masking. 104 if ( !svgStyle.clipperResource().isEmpty())104 if (style.clipPath()) 105 105 return false; 106 106 // Fallback to masking, if there is more than one clipping path. -
trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
r246490 r251776 564 564 } 565 565 } 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)) { 568 570 ts << indent << " "; 569 writeNameAndQuotedValue(ts, "clipPath", svgStyle.clipperResource());571 writeNameAndQuotedValue(ts, "clipPath", resourceClipPath->fragment()); 570 572 ts << " "; 571 573 writeStandardPrefix(ts, *clipper, behavior, WriteIndentOrNot::No); -
trunk/Source/WebCore/rendering/svg/SVGResources.cpp
r248846 r251776 216 216 bool foundResources = false; 217 217 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())) { 225 219 // FIXME: -webkit-clip-path should support external resources 226 220 // https://bugs.webkit.org/show_bug.cgi?id=127032
Note: See TracChangeset
for help on using the changeset viewer.