Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(265135@main): CSS filter is not applied on SVG element
https://bugs.webkit.org/show_bug.cgi?id=260152 rdar://114204485 Reviewed by Said Abou-Hallawa. Before 265135@main, an SVG root with a filter specified as presentation attribute (e.g: <svg filter="...">) was filtered twice instead of once: once by SVGRenderingContext, and another by RenderLayer. 265135@main attempted to fix this by instructing RenderLayer not to apply filters when rendering an SVG root. This caused a regression where an SVG root with a filter specified using CSS filter property is not filtered, because SVGRenderingContext is not responsible for apply CSS filters, and RenderLayer refuses to filter because it's an SVG root. Fix the previous attempt by fixing SVGRenderingContext to not filter when rendering an SVG root, so RenderLayer is now solely responsible for filtering SVG roots. Test: LayoutTests/svg/filters/css-filter-specified-on-svg-root.html * LayoutTests/svg/filters/css-filter-specified-on-svg-root-expected.html: Added. * LayoutTests/svg/filters/css-filter-specified-on-svg-root.html: Added. * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintsWithFilters const): (WebCore::RenderLayer::calculateClipRects const): * Source/WebCore/rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Canonical link: https://commits.webkit.org/267236@main
- Loading branch information