Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc1354a1d26db54d17f7d3989a81036a46ee2d60
      
https://github.com/WebKit/WebKit/commit/dc1354a1d26db54d17f7d3989a81036a46ee2d60
  Author: Matt Woodrow <[email protected]>
  Date:   2024-06-09 (Sun, 09 Jun 2024)

  Changed paths:
    M 
LayoutTests/compositing/shared-backing/overflow-scroll/nested-scroller-sharing-expected.txt
    M 
LayoutTests/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-expected.txt
    A 
LayoutTests/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-horizontal-expected.txt
    A 
LayoutTests/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-horizontal.html
    M 
LayoutTests/fast/repaint/background-attachment-fixed-in-composited-scroll-expected.txt
    M 
LayoutTests/platform/ios/compositing/shared-backing/overflow-scroll/nested-scroller-sharing-expected.txt
    M 
LayoutTests/platform/ios/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-expected.txt
    A 
LayoutTests/platform/ios/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-horizontal-expected.txt
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h

  Log Message:
  -----------
  Speedometer 3: Fix the overflow:scroll layerization on 
TodoMVC-React-Complex-DOM.
https://bugs.webkit.org/show_bug.cgi?id=268117
<rdar://113239854>

Reviewed by Simon Fraser.

Patch by Matt Woodrow with small changes by Cameron McCormack.

This page has a composited layer that overlaps the right edge of scroller. Most 
of the
sub-layers inside the scroller are on the left edge and can't ever overlap the 
layer
outside the scroller (since the scroller only moves vertically). We currently 
can't detect
that there won't ever be overlap between the sublayers and the outside layer, 
so everything
in the scroller becomes composited too.

This adds support for overlapping backing provider candidates.

In order for a layer to be added to a candidate that isn't the topmost, we need 
to ensure
that the layer doesn't (and won't) intersect with the candidates above it.

Generally we just use the bounds of the candidate for this intersection test, 
which should
have the same results as disallowing overlapping candidates (except for having 
more in the
candidate list, and potentially worse performance checking them).

If the candidate is composited scrolling that only moves in one axis, we use 
the bounds
of the current layer in the other axis.

This relies on the list of backing sharing candidates being sorted in z-order, 
which wasn't
the case previously (candidates were added after traversing their descendants). 
This now captures
a snapshot of the backing sharing state before traversing descendants, and then 
uses that to
insert it at the right spot after descendant traversal.

* 
LayoutTests/compositing/shared-backing/overflow-scroll/nested-scroller-sharing-expected.txt:
* 
LayoutTests/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-expected.txt:
* 
LayoutTests/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-horizontal-expected.txt
* 
LayoutTests/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-horizontal.html
* 
LayoutTests/fast/repaint/background-attachment-fixed-in-composited-scroll-expected.txt:
* 
LayoutTests/platform/ios/compositing/shared-backing/overflow-scroll/overlapping-scroller-sharing-horizontal-expected.txt
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::BackingSharingState::BackingSharingState):
(WebCore::RenderLayerCompositor::BackingSharingState::snapshot):
(WebCore::RenderLayerCompositor::BackingSharingState::startBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::addBackingSharingCandidate):
(WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidateForLayer):
(WebCore::RenderLayerCompositor::BackingSharingState::isAdditionalProviderCandidate
 const):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
(WebCore::RenderLayerCompositor::updateBackingSharingBeforeDescendantTraversal):
(WebCore::RenderLayerCompositor::updateBackingSharingAfterDescendantTraversal):
(WebCore::RenderLayerCompositor::computeClippedOverlapBounds const):
(WebCore::RenderLayerCompositor::addToOverlapMap const):
* Source/WebCore/rendering/RenderLayerCompositor.h:

Canonical link: https://commits.webkit.org/279868@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