Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f0e94b3e0d74743015530dea3aadeca2fdda735d
      
https://github.com/WebKit/WebKit/commit/f0e94b3e0d74743015530dea3aadeca2fdda735d
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-10-13 (Tue, 13 Oct 2026)

  Changed paths:
    M LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h
    M Source/WebCore/rendering/RenderLayerSVGAdditions.cpp

  Log Message:
  -----------
  [LBSE] Apply 'mix-blend-mode' on the document element <svg> to its contents 
only
https://bugs.webkit.org/show_bug.cgi?id=326844

Reviewed by Rob Buis.

If the outermost <svg> element is the document root, its layer is responsible
for painting the page background. In that case, LBSE applied the blend mode
to the whole layer, _also_ blending the background, which is wrong.

Match what the legacy SVG engine does: apply the blend mode only to the
SVG contents - fixes both svg/css/mix-blend-mode-background-root.svg and
svg/css/mix-blend-mode-opacity-root.svg.

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::blendModeAppliesToSVGRootContentsOnly const):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::paintForegroundChildrenForSVG):

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



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

Reply via email to