Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 57772eae4c606149b2df65973542102aa77c123a
      
https://github.com/WebKit/WebKit/commit/57772eae4c606149b2df65973542102aa77c123a
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-14 (Wed, 14 Oct 2026)

  Changed paths:
    A 
LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller-expected.txt
    A 
LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller.html
    A 
LayoutTests/platform/ios/compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller-expected.txt
    M Source/WebCore/rendering/LayerOverlapMap.cpp

  Log Message:
  -----------
  Overlap is missed for layers inside a stacking-context composited scroller 
nested in another composited scroller
https://bugs.webkit.org/show_bug.cgi?id=326183
rdar://189067776

Reviewed by Matt Woodrow.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

OverlapMapContainer::ensureClippingScopeForLayers() walks the enclosing clipping
layers from root to leaf. When a child scope is missing, it creates that one
scope and stops. If more than one scope is missing, the rect ends up in an
ancestor scope instead of the leaf. findClippingScopeForLayers() then can't
find the leaf scope for later layers, so they are never tested against that
rect.

This happens when a composited scroller is a stacking context nested inside
another composited scroller. Its paint-order children start with an empty
overlap container, so the first layer added there is missing both the outer
and inner scroller scopes. Later overlapping siblings don't composite and
paint underneath the composited layer.

Fix this by creating every missing scope along the chain.

Test: 
compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller.html

* 
LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller-expected.txt:
 Added.
* 
LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller.html:
 Added.
* 
LayoutTests/platform/ios/compositing/layer-creation/clipping-scope/nested-scroller-overlap-inside-inner-scroller-expected.txt:
 Added.
* Source/WebCore/rendering/LayerOverlapMap.cpp:
(WebCore::OverlapMapContainer::ensureClippingScopeForLayers):

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



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

Reply via email to