Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e74631887c2a0af1b13d0edb4eeda52f5a612db9
https://github.com/WebKit/WebKit/commit/e74631887c2a0af1b13d0edb4eeda52f5a612db9
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-05-08 (Fri, 08 May 2026)
Changed paths:
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderLayer.h
M Source/WebCore/rendering/RenderLayerSVGAdditions.cpp
M Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Log Message:
-----------
[LBSE] Introduce DOM-order hit-test infrastructure for non-layered SVG
children
https://bugs.webkit.org/show_bug.cgi?id=313781
Reviewed by Rob Buis.
Companion to the DOM-order paint patch (312729@main). Once LBSE makes layer
creation conditional (bug 308565) SVG content will contain a mix of layered and
non-layered renderers that must hit-test in strict DOM document order,
interleaving both kinds.
This patch introduces the hit-test half of that infrastructure ahead of the
requiresLayer() change so it can be reviewed and landed independently. The
new code paths are gated by m_svgData (in RenderLayer::hitTestLayer and
hitTestContents) and by the RenderSVGRoot's existing nodeAtPoint entry. With
every SVG renderer still owning a layer the non-layered branches never
fire, so output is equivalent to the existing z-order list iteration. The
follow-up bug 308565 patch flips requiresLayer() and lights up the new
paths.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestContents const):
(WebCore::RenderLayer::hitTestPositiveAndNormalFlowLists):
(WebCore::RenderLayer::hitTestLayerListAndMergeWithCandidate):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::hitTestChildrenForSVG):
(WebCore::RenderLayer::hitTestChildrenInDOMOrderForSVG):
(WebCore::RenderLayer::hitTestRendererByInversingTransformForSVG):
(WebCore::RenderLayer::hitTestSubtreeWithinTransformScopeForSVG):
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
Canonical link: https://commits.webkit.org/312869@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications