haikuwebkit/LayoutTests/svg/clip-path/webkit-clip-path-before-exp...

3 lines
96 B
XML
Raw Permalink Normal View History

[css-masking] Fully support -webkit-clip-path on SVG elements https://bugs.webkit.org/show_bug.cgi?id=185829 Reviewed by Simon Fraser. Source/WebCore: -webkit-clip-path contributes to SVG elements with boxes, shapes and now with element references to <clipPath> elements as well. Make sure that all types contribute to hit-testing of the SVG element as well as they should. Tests: svg/clip-path/webkit-clip-path-after-expected.svg svg/clip-path/webkit-clip-path-after.svg svg/clip-path/webkit-clip-path-before-expected.svg svg/clip-path/webkit-clip-path-before.svg svg/dynamic-updates/SVGClipPath-prefixed-influences-hitTesting.html svg/dynamic-updates/SVGClipPath-prefixed-path-influences-hitTesting.html svg/dynamic-updates/SVGClipPathElement-prefixed-css-transform-influences-hitTesting.html svg/dynamic-updates/SVGClipPathElement-prefixed-transform-influences-hitTesting.html * rendering/svg/SVGRenderSupport.cpp: Share code as much as possible. (WebCore::clipPathReferenceBox): (WebCore::isPointInCSSClippingArea): Take -webkit-clip-path into account. (WebCore::SVGRenderSupport::clipContextToCSSClippingArea): (WebCore::SVGRenderSupport::pointInClippingArea): * rendering/svg/SVGRenderSupport.h: * rendering/svg/SVGRenderingContext.cpp: Clip to -webkit-clip-path boxes, shapes and references. (WebCore::SVGRenderingContext::prepareToRenderSVGContent): * rendering/svg/SVGResources.cpp: Add -webkit-clip-path references to cached resources. Mimic SVG clip-path. (WebCore::SVGResources::buildCachedResources): LayoutTests: Test -webkit-clip-path element references on SVG elements. Make sure, -webkit-clip-path contributes to hit testing for element references and basic shapes. * svg/clip-path/webkit-clip-path-after-expected.svg: Added. * svg/clip-path/webkit-clip-path-after.svg: Added. * svg/clip-path/webkit-clip-path-before-expected.svg: Added. * svg/clip-path/webkit-clip-path-before.svg: Added. * svg/dynamic-updates/SVGClipPath-prefixed-influences-hitTesting-expected.txt: Added. * svg/dynamic-updates/SVGClipPath-prefixed-influences-hitTesting.html: Added. * svg/dynamic-updates/SVGClipPath-prefixed-path-influences-hitTesting-expected.txt: Added. * svg/dynamic-updates/SVGClipPath-prefixed-path-influences-hitTesting.html: Added. * svg/dynamic-updates/SVGClipPathElement-prefixed-css-transform-influences-hitTesting-expected.txt: Added. * svg/dynamic-updates/SVGClipPathElement-prefixed-css-transform-influences-hitTesting.html: Added. * svg/dynamic-updates/SVGClipPathElement-prefixed-transform-influences-hitTesting-expected.txt: Added. * svg/dynamic-updates/SVGClipPathElement-prefixed-transform-influences-hitTesting.html: Added. Canonical link: https://commits.webkit.org/202884@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-07-14 09:19:46 +00:00
<svg xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="100" fill="green"/>
</svg>