Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 066241971c0fdca3344fec22eb7fe0fa056b4b88
      
https://github.com/WebKit/WebKit/commit/066241971c0fdca3344fec22eb7fe0fa056b4b88
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-04 (Sat, 04 Apr 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderLayer.cpp

  Log Message:
  -----------
  setAncestorChainHasSelfPaintingLayerDescendant should use loop variable 
instead of this
https://bugs.webkit.org/show_bug.cgi?id=311482

Reviewed by Alan Baradlay.

The paint containment check and the flag assignments inside the loop
used unqualified renderer() and member variables, which resolve to
this-> rather than the current loop variable layer->. On the first
iteration (layer == this) this is harmless, but on subsequent
iterations the code checks the wrong renderer for paint containment
and sets the flags on the wrong layer.

The effect is that hasSelfPaintingLayerDescendant propagates past
contain:paint boundaries to ancestors that should be isolated. Those
ancestors then fail to early-out in paintLayerWithEffects, paintList,
hitTestLayer, and hitTestList, doing unnecessary traversal work before
finding nothing to paint or hit.

No new tests. The over-propagation only affects skip-optimizations in
painting and hit testing; visual output, elementFromPoint() results,
and all DOM-observable behavior are unchanged. The stale flag is also
transient: updateDescendantDependentFlags() recomputes the correct
value from children on the next dirty pass.

* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant):

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



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

Reply via email to