Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 657503c4ea11293a4cbc0d928e75ddbea887fbf6
      
https://github.com/WebKit/WebKit/commit/657503c4ea11293a4cbc0d928e75ddbea887fbf6
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-05-06 (Wed, 06 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/RenderSVGContainer.cpp
    M Source/WebCore/rendering/svg/RenderSVGRoot.cpp

  Log Message:
  -----------
  [LBSE] Introduce DOM-order paint infrastructure for non-layered SVG children
https://bugs.webkit.org/show_bug.cgi?id=313780

Reviewed by Rob Buis.

Preparatory refactor for making RenderLayer creation conditional on LBSE
SVG renderers (bug 308565). Today every SVG renderer unconditionally owns a
layer, so painting can rely on walking z-order layer lists. Once layer
creation becomes conditional, SVG content will contain a mix of layered and
non-layered renderers that must paint in strict DOM document order,
interleaving both kinds.

This patch introduces the painting half of that infrastructure ahead of the
requiresLayer() change so it can be reviewed and landed independently. The
new code paths are gated by !hasSelfPaintingLayer() (in
RenderSVGContainer::paint and RenderSVGRoot::paintContents) and by m_svgData
(in RenderLayer::paintLayerContents). 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. The hit-test counterpart lands
in a separate patch.

* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::hasVisibleContentForPaintingForSVG const):
(WebCore::RenderLayer::paintResourceLayerForSVG):
(WebCore::RenderLayer::paintNegativeZOrderChildrenForSVG):
(WebCore::RenderLayer::paintForegroundChildrenForSVG):
(WebCore::RenderLayer::shouldSkipRepaintAfterLayoutForSVG const):
(WebCore::RenderLayer::paintNonLayerChildForFragmentsForSVG):
(WebCore::RenderLayer::paintChildrenInDOMOrderForSVG):
(WebCore::RenderLayer::computeRendererTransformForSVG const):
(WebCore::RenderLayer::paintRendererByApplyingTransformForSVG):
(WebCore::RenderLayer::paintSubtreeWithinTransformScopeForSVG):
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintContents):

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



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

Reply via email to