Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b7b505112f252c8dcbaa2f820272cbe47fd99610
      
https://github.com/WebKit/WebKit/commit/b7b505112f252c8dcbaa2f820272cbe47fd99610
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/interact-events-01-b-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/struct-group-02-b-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/embedding-external-svgs-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/inner-svg-hit-test-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/svg-overflow-types-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/text-ctm-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/use-clipped-hit-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/use-recalcStyle-crash-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/viewbox-syntax-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
    M 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/repaint/svgsvgelement-repaint-children-expected.txt
    A LayoutTests/svg/custom/nested-svg-viewport-clip-layered-child-expected.svg
    A LayoutTests/svg/custom/nested-svg-viewport-clip-layered-child.svg
    M Source/WebCore/rendering/RenderLayerSVGAdditions.cpp
    M Source/WebCore/rendering/svg/RenderSVGModelObjectInlines.h
    M Source/WebCore/rendering/svg/RenderSVGViewportContainer.h

  Log Message:
  -----------
  [LBSE] A nested <svg> does not clip layered descendants to its viewport
https://bugs.webkit.org/show_bug.cgi?id=325538

Reviewed by Rob Buis.

A nested <svg> with 'overflow: hidden' does not clip descendants that have
their own layer, such as a transformed <g>. The clip is applied in
RenderSVGContainer::paint(), but layered descendants are painted from the
enclosing layer and never see the clip. To support this properly, give
all containers that clip to overflow their own layer, just like it's already
done for containers having 'clip-path' or 'mask'.

With a small tweak to RenderLayer::hitTestChildrenForSVG(), svg/custom/
image-clipped-hit.svg now fully passes in LBSE.

Test: svg/custom/nested-svg-viewport-clip-layered-child.svg

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/interact-events-01-b-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/struct-group-02-b-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/embedding-external-svgs-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/inner-svg-hit-test-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/svg-overflow-types-expected.txt:
* LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/text-ctm-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/use-clipped-hit-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/use-recalcStyle-crash-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/viewbox-syntax-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/repaint/inner-svg-change-viewPort-relative-expected.txt:
* 
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/repaint/svgsvgelement-repaint-children-expected.txt:
* LayoutTests/svg/custom/nested-svg-viewport-clip-layered-child-expected.svg: 
Added.
* LayoutTests/svg/custom/nested-svg-viewport-clip-layered-child.svg: Added.
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::hitTestChildrenForSVG):
(WebCore::RenderLayer::paintSubtreeWithinTransformScopeForSVG):
* Source/WebCore/rendering/svg/RenderSVGModelObjectInlines.h:
(WebCore::RenderSVGModelObject::clipsSubtree):
* Source/WebCore/rendering/svg/RenderSVGViewportContainer.h:

Canonical link: https://commits.webkit.org/322191@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to