[webkit-changes] [WebKit/WebKit] 891e5f: [LegacySVG] clip-path inset is incorrectly applied...
Simon Fraser
noreply at github.com
Tue Aug 6 09:04:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 891e5f19413790c00aea80246816bc341cf78f3f
https://github.com/WebKit/WebKit/commit/891e5f19413790c00aea80246816bc341cf78f3f
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-08-06 (Tue, 06 Aug 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-marginBox-1d.html
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderView.cpp
M Source/WebCore/rendering/svg/SVGRenderSupport.cpp
M Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Log Message:
-----------
[LegacySVG] clip-path inset is incorrectly applied to the svg element.
https://bugs.webkit.org/show_bug.cgi?id=227704
rdar://80516912
Reviewed by Said Abou-Hallawa.
`clip-path()` on the SVG root element on the legacy code path (LBSE disabled) must be applied
in RenderLayer, because the clipping needs to clip the CSS-rendered borders and shadows on the
element, and the RenderLayer code path gets the geometry right.
We then have to not clip in `SVGRenderingContext::prepareToRenderSVGContent()` when applied
to the LegacyRenderSVGRoot.
In addition, fix RenderView's `rendererObscuresBackground()` to check for the legacy renderer
type, otherwise we'd end up with unfilled areas.
I verified that this behaves correctly with CSS and property-applied clip-path on the SVG root
inside the SVG, and when applied via CSS to SVG embedded in HTML.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-marginBox-1d.html:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::rendererObscuresBackground):
* Source/WebCore/rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::clipContextToCSSClippingArea):
* Source/WebCore/rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
Canonical link: https://commits.webkit.org/281893@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list