Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6d0d68f4fda386b6b9db349f8f2f97625ef69455
      
https://github.com/WebKit/WebKit/commit/6d0d68f4fda386b6b9db349f8f2f97625ef69455
  Author: Matt Woodrow <[email protected]>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    A 
LayoutTests/compositing/update-compositing-rects-with-sharing-descendants-expected.html
    A 
LayoutTests/compositing/update-compositing-rects-with-sharing-descendants.html
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  compositingStatusChanged can set invalid repaint rects while backing sharing 
state is in-flight.
https://bugs.webkit.org/show_bug.cgi?id=282518
<rdar://139172121>

Reviewed by Simon Fraser.

When RenderLayerCompositor::computeCompositingRequirements makes a layer
composited, it calls compositingStatusChanged to recompute the repaint rects on
descendants.

This happens before updateBackingSharingAfterDescendantTraversal, so any backing
sharing happening on descendants hasn't yet been resolved.

Backing sharing always clears the state on layers, and then re-sets it once
completed, even if there aren't any changes.

This means we recompute the repaint rects using the 'repaint container' as if
backing sharing wasn't happening, which is incorrect. Once backing sharing is
finalised, we would recompute again if there had been changes, but if not this
invalid state remains.

The fix is to defer compositingStatusChanged until after backing sharing is
finalized.

* 
LayoutTests/compositing/update-compositing-rects-with-sharing-descendants-expected.html:
 Added.
* 
LayoutTests/compositing/update-compositing-rects-with-sharing-descendants.html: 
Added.
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerGainedCompositedScrollableOverflow):
(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::updateLayerCompositingState):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to