WebKit Bugzilla
Attachment 359854 Details for
Bug 193699
: Compositing updates need to reparent scrolling tree nodes with a changed ancestor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193699-20190122215526.patch (text/plain), 24.70 KB, created by
Simon Fraser (smfr)
on 2019-01-22 21:55:27 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-01-22 21:55:27 PST
Size:
24.70 KB
patch
obsolete
>Subversion Revision: 240326 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f1739cec0dec78e6c2fb80ef346267ebaad77fc0..83ea871b9e837935e305bf9b596b832db50090c2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,36 @@ >+2019-01-22 Simon Fraser <simon.fraser@apple.com> >+ >+ Compositing updates need to reparent scrolling tree nodes with a changed ancestor >+ https://bugs.webkit.org/show_bug.cgi?id=193699 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Now that compositing updates are incremental and may not do a full layer walk, >+ we need to ensure that when a scrolling tree node is removed, we traverse to all >+ descendant layers whose scrolling tree nodes refer to the removed node as their parent. >+ >+ To achieve this, add a RenderLayer dirty bit for "NeedsScrollingTreeUpdate" which >+ ensures that the updateBackingAndHierarchy part of the compositing update traverses >+ layers with the bit set. >+ >+ Adjust the compositing logging to make the legend easier to read. >+ >+ Tests: scrollingcoordinator/reparent-across-compositing-layers.html >+ scrollingcoordinator/reparent-with-layer-removal.html >+ >+ * page/scrolling/AsyncScrollingCoordinator.cpp: >+ (WebCore::AsyncScrollingCoordinator::childrenOfNode const): >+ * page/scrolling/AsyncScrollingCoordinator.h: >+ * page/scrolling/ScrollingCoordinator.h: >+ (WebCore::ScrollingCoordinator::childrenOfNode const): >+ * rendering/RenderLayer.cpp: >+ (WebCore::outputPaintOrderTreeLegend): >+ (WebCore::outputPaintOrderTreeRecursive): >+ * rendering/RenderLayer.h: >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): >+ (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): >+ > 2019-01-22 Simon Fraser <simon.fraser@apple.com> > > Adding a child to a ScrollingStateNode needs to trigger a tree state commit >diff --git a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >index fb4e9e131b1234cc79651bddc5ce7a6d62efd79a..0493ec1160c3102c3b1ae4d715f24e1300dbdca8 100644 >--- a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >+++ b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >@@ -502,6 +502,24 @@ void AsyncScrollingCoordinator::clearStateTree() > m_scrollingStateTree->clear(); > } > >+Vector<ScrollingNodeID> AsyncScrollingCoordinator::childrenOfNode(ScrollingNodeID nodeID) const >+{ >+ auto* scrollingNode = m_scrollingStateTree->stateNodeForID(nodeID); >+ if (!scrollingNode) >+ return { }; >+ >+ auto* children = scrollingNode->children(); >+ if (!children || children->isEmpty()) >+ return { }; >+ >+ Vector<ScrollingNodeID> childNodeIDs; >+ childNodeIDs.reserveInitialCapacity(children->size()); >+ for (const auto& childNode : *children) >+ childNodeIDs.uncheckedAppend(childNode->scrollingNodeID()); >+ >+ return childNodeIDs; >+} >+ > void AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions(ScrollingNodeID scrollingNodeID, const LayoutRect& viewportRect, ScrollingLayerPositionAction action) > { > auto* scrollingNode = m_scrollingStateTree->stateNodeForID(scrollingNodeID); >diff --git a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h >index 07968b8ab7dcd86efeb8acf8f4860d188ca15187..57177edf691b1a1b9c53ce2b599806af728ff045 100644 >--- a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h >+++ b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h >@@ -100,7 +100,9 @@ private: > WEBCORE_EXPORT ScrollingNodeID attachToStateTree(ScrollingNodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID, size_t childIndex) override; > WEBCORE_EXPORT void detachFromStateTree(ScrollingNodeID) override; > WEBCORE_EXPORT void clearStateTree() override; >- >+ >+ WEBCORE_EXPORT Vector<ScrollingNodeID> childrenOfNode(ScrollingNodeID) const override; >+ > WEBCORE_EXPORT void setNodeLayers(ScrollingNodeID, GraphicsLayer* /*layer*/, GraphicsLayer* /*scrolledContentsLayer*/ = nullptr, GraphicsLayer* /*counterScrollingLayer*/ = nullptr, GraphicsLayer* /*insetClipLayer*/ = nullptr) override; > WEBCORE_EXPORT void setScrollingNodeGeometry(ScrollingNodeID, const ScrollingGeometry&) override; > WEBCORE_EXPORT void setViewportConstraintedNodeGeometry(ScrollingNodeID, const ViewportConstraints&) override; >diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.h b/Source/WebCore/page/scrolling/ScrollingCoordinator.h >index a9b12cca90e04af3dad4300d236e914e15754ae6..f7a1c56e36a77d93c18bf9b6906dc9644b48e25c 100644 >--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.h >+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.h >@@ -168,6 +168,7 @@ public: > virtual bool requestScrollPositionUpdate(FrameView&, const IntPoint&) { return false; } > virtual bool handleWheelEvent(FrameView&, const PlatformWheelEvent&) { return true; } > virtual ScrollingNodeID attachToStateTree(ScrollingNodeType, ScrollingNodeID newNodeID, ScrollingNodeID /*parentID*/, size_t /*childIndex*/ = notFound) { return newNodeID; } >+ virtual Vector<ScrollingNodeID> childrenOfNode(ScrollingNodeID) const { return { }; } > > virtual void detachFromStateTree(ScrollingNodeID) { } > virtual void clearStateTree() { } >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index ccef3639b0787aeb6211f92964ba943a8c586fea..2d275fb5aad48ac83ab24814dd03a2471c2e459f 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -6632,9 +6632,8 @@ static void outputPaintOrderTreeLegend(TextStream& stream) > stream.nextLine(); > stream << "(S)tacking Context, (N)ormal flow only, (O)verflow clip, (A)lpha (opacity or mask), has (B)lend mode, (I)solates blending, (T)ransform-ish, (F)ilter, Fi(X)ed position, (C)omposited, (c)omposited descendant\n" > "Dirty (z)-lists, Dirty (n)ormal flow lists\n" >- "Descendant needs overlap (t)raversal, Descendant needs (b)acking or hierarchy update, All descendants need (r)equirements traversal, All (s)ubsequent layers need requirements traversal, All descendants need (h)ierarchy traversal\n" >- "Needs compositing paint order update on (s)ubsequent layers, Needs compositing paint (o)rder children update, " >- "Needs post-(l)ayout update, Needs compositing (g)eometry update, (k)ids need geometry update, Needs compositing (c)onfig update, Needs compositing layer conne(x)ion update"; >+ "Traversal needs: requirements (t)raversal on descendants, (b)acking or hierarchy traversal on descendants, (r)equirements traversal on all descendants, requirements traversal on all (s)ubsequent layers, (h)ierarchy traversal on all descendants, update of paint (o)rder children\n" >+ "Update needs: post-(l)ayout requirements, (g)eometry, (k)ids geometry, (c)onfig, layer conne(x)ion, (s)crolling tree\n"; > stream.nextLine(); > } > >@@ -6671,15 +6670,16 @@ static void outputPaintOrderTreeRecursive(TextStream& stream, const WebCore::Ren > stream << (layer.descendantsNeedCompositingRequirementsTraversal() ? "r" : "-"); > stream << (layer.subsequentLayersNeedCompositingRequirementsTraversal() ? "s" : "-"); > stream << (layer.descendantsNeedUpdateBackingAndHierarchyTraversal() ? "h" : "-"); >+ stream << (layer.needsCompositingPaintOrderChildrenUpdate() ? "o" : "-"); > > stream << " "; > >- stream << (layer.needsCompositingPaintOrderChildrenUpdate() ? "o" : "-"); > stream << (layer.needsPostLayoutCompositingUpdate() ? "l" : "-"); > stream << (layer.needsCompositingGeometryUpdate() ? "g" : "-"); > stream << (layer.childrenNeedCompositingGeometryUpdate() ? "k" : "-"); > stream << (layer.needsCompositingConfigurationUpdate() ? "c" : "-"); > stream << (layer.needsCompositingLayerConnection() ? "x" : "-"); >+ stream << (layer.needsScrollingTreeUpdate() ? "s" : "-"); > > stream << " "; > >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index 78ff638c1984aec767d01f751f5d15be07960bf4..76bcd1a632ebf85318ad8f8e6af5d01de202790b 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -202,9 +202,10 @@ private: > // Things that trigger HasDescendantNeedingBackingOrHierarchyTraversal > NeedsGeometryUpdate = 1 << 6, // This layer needs a geometry update. > NeedsConfigurationUpdate = 1 << 7, // This layer needs a configuration update (updating its internal compositing hierarchy). >- NeedsLayerConnection = 1 << 8, // This layer needs hookup with its parents or children. >- ChildrenNeedGeometryUpdate = 1 << 9, // This layer's composited children needs a geometry update. >- DescendantsNeedBackingAndHierarchyTraversal = 1 << 10, // Something changed that forces us to traverse all descendant layers in updateBackingAndHierarchy. >+ NeedsScrollingTreeUpdate = 1 << 8, // Something changed that requires this layer's scrolling tree node to be updated. >+ NeedsLayerConnection = 1 << 9, // This layer needs hookup with its parents or children. >+ ChildrenNeedGeometryUpdate = 1 << 10, // This layer's composited children needs a geometry update. >+ DescendantsNeedBackingAndHierarchyTraversal = 1 << 11, // Something changed that forces us to traverse all descendant layers in updateBackingAndHierarchy. > }; > > static constexpr OptionSet<Compositing> computeCompositingRequirementsFlags() >@@ -223,6 +224,7 @@ private: > Compositing::NeedsLayerConnection, > Compositing::NeedsGeometryUpdate, > Compositing::NeedsConfigurationUpdate, >+ Compositing::NeedsScrollingTreeUpdate, > Compositing::ChildrenNeedGeometryUpdate, > Compositing::DescendantsNeedBackingAndHierarchyTraversal, > }; >@@ -242,6 +244,7 @@ public: > bool needsCompositingLayerConnection() const { return m_compositingDirtyBits.contains(Compositing::NeedsLayerConnection); } > bool needsCompositingGeometryUpdate() const { return m_compositingDirtyBits.contains(Compositing::NeedsGeometryUpdate); } > bool needsCompositingConfigurationUpdate() const { return m_compositingDirtyBits.contains(Compositing::NeedsConfigurationUpdate); } >+ bool needsScrollingTreeUpdate() const { return m_compositingDirtyBits.contains(Compositing::NeedsScrollingTreeUpdate); } > bool childrenNeedCompositingGeometryUpdate() const { return m_compositingDirtyBits.contains(Compositing::ChildrenNeedGeometryUpdate); } > bool descendantsNeedUpdateBackingAndHierarchyTraversal() const { return m_compositingDirtyBits.contains(Compositing::DescendantsNeedBackingAndHierarchyTraversal); } > >@@ -269,6 +272,7 @@ public: > void setNeedsCompositingLayerConnection() { setBackingAndHierarchyTraversalDirtyBit<Compositing::NeedsLayerConnection>(); } > void setNeedsCompositingGeometryUpdate() { setBackingAndHierarchyTraversalDirtyBit<Compositing::NeedsGeometryUpdate>(); } > void setNeedsCompositingConfigurationUpdate() { setBackingAndHierarchyTraversalDirtyBit<Compositing::NeedsConfigurationUpdate>(); } >+ void setNeedsScrollingTreeUpdate() { setBackingAndHierarchyTraversalDirtyBit<Compositing::NeedsScrollingTreeUpdate>(); } > void setChildrenNeedCompositingGeometryUpdate() { setBackingAndHierarchyTraversalDirtyBit<Compositing::ChildrenNeedGeometryUpdate>(); } > void setDescendantsNeedUpdateBackingAndHierarchyTraversal() { setBackingAndHierarchyTraversalDirtyBit<Compositing::DescendantsNeedBackingAndHierarchyTraversal>(); } > >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 97d75621f73d7f58d0c91e230c883ef8929dcd23..9a783dc16c451b3bd3d400349565072d0f81c8d5 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -1130,7 +1130,7 @@ void RenderLayerCompositor::updateBackingAndHierarchy(RenderLayer& layer, Vector > layerBacking->updateDebugIndicators(m_showDebugBorders, m_showRepaintCounter); > } > >- if (layerNeedsUpdate || layer.needsCompositingGeometryUpdate()) >+ if (layerNeedsUpdate || layer.needsCompositingGeometryUpdate() || layer.needsScrollingTreeUpdate()) > layerBacking->updateGeometry(); > > if (auto* reflection = layer.reflectionLayer()) { >@@ -3837,14 +3837,29 @@ void RenderLayerCompositor::detachScrollCoordinatedLayer(RenderLayer& layer, Opt > if (!backing) > return; > >+ auto* scrollingCoordinator = this->scrollingCoordinator(); >+ >+ auto dirtyDescendantScrollingLayers = [&] (ScrollingNodeID nodeID) { >+ auto childNodes = scrollingCoordinator->childrenOfNode(nodeID); >+ for (auto childNodeID : childNodes) { >+ // FIXME: The child might be in a child frame. Need to do something that crosses frame boundaries. >+ if (auto* layer = m_scrollingNodeToLayerMap.get(childNodeID)) >+ layer->setNeedsScrollingTreeUpdate(); >+ } >+ }; >+ > if (roles.contains(ScrollCoordinationRole::Scrolling)) { >- if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling)) >+ if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling)) { >+ dirtyDescendantScrollingLayers(nodeID); > m_scrollingNodeToLayerMap.remove(nodeID); >+ } > } > > if (roles.contains(ScrollCoordinationRole::ViewportConstrained)) { >- if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::ViewportConstrained)) >+ if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::ViewportConstrained)) { >+ dirtyDescendantScrollingLayers(nodeID); > m_scrollingNodeToLayerMap.remove(nodeID); >+ } > } > > backing->detachFromScrollingCoordinator(roles); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0484ee9c83e77ec994d6550a82a053097398f28e..77388275a07befe0c197da0de3901b98a86d4243 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-22 Simon Fraser <simon.fraser@apple.com> >+ >+ Compositing updates need to reparent scrolling tree nodes with a changed ancestor >+ https://bugs.webkit.org/show_bug.cgi?id=193699 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/ios-wk2/scrollingcoordinator/reparent-across-compositing-layers-expected.txt: Added. >+ * platform/ios-wk2/scrollingcoordinator/reparent-with-layer-removal-expected.txt: Added. >+ * scrollingcoordinator/reparent-across-compositing-layers-expected.txt: Added. >+ * scrollingcoordinator/reparent-across-compositing-layers.html: Added. >+ * scrollingcoordinator/reparent-with-layer-removal-expected.txt: Added. >+ * scrollingcoordinator/reparent-with-layer-removal.html: Added. >+ > 2019-01-22 Simon Fraser <simon.fraser@apple.com> > > Adding a child to a ScrollingStateNode needs to trigger a tree state commit >diff --git a/LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-across-compositing-layers-expected.txt b/LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-across-compositing-layers-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e651f7916f5599d6f2ded457ccaea775c340529a >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-across-compositing-layers-expected.txt >@@ -0,0 +1,22 @@ >+Scrolling content >+Intermediate >+Inner scrolling content >+ >+(Frame scrolling node >+ (scrollable area size 800 600) >+ (contents size 800 600) >+ (scrollable area parameters >+ (horizontal scroll elasticity 1) >+ (vertical scroll elasticity 1) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0)) >+ (visual viewport enabled 1) >+ (layout viewport at (0,0) size 800x600) >+ (min layout viewport origin (0,0)) >+ (max layout viewport origin (0,0)) >+ (behavior for fixed 0) >+ (children 0 >+ ) >+) >+ >+ >diff --git a/LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-with-layer-removal-expected.txt b/LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-with-layer-removal-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..a855f98b32e567e076c27abe999392b5a9017200 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-with-layer-removal-expected.txt >@@ -0,0 +1,31 @@ >+Scrolling content >+Intermediate >+Inner scrolling content >+ >+(Frame scrolling node >+ (scrollable area size 800 600) >+ (contents size 800 1041) >+ (scrollable area parameters >+ (horizontal scroll elasticity 1) >+ (vertical scroll elasticity 1) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0)) >+ (visual viewport enabled 1) >+ (layout viewport at (0,0) size 800x600) >+ (min layout viewport origin (0,0)) >+ (max layout viewport origin (0,441)) >+ (behavior for fixed 0) >+ (children 1 >+ (Overflow scrolling node >+ (scrollable area size 440 340) >+ (contents size 440 1040) >+ (scrollable area parameters >+ (horizontal scroll elasticity 1) >+ (vertical scroll elasticity 1) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0)) >+ ) >+ ) >+) >+ >+ >diff --git a/LayoutTests/scrollingcoordinator/reparent-across-compositing-layers-expected.txt b/LayoutTests/scrollingcoordinator/reparent-across-compositing-layers-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..353babe68b49c4ed5a23fa02927bc137cc303b33 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/reparent-across-compositing-layers-expected.txt >@@ -0,0 +1,22 @@ >+Scrolling content >+Intermediate >+Inner scrolling content >+ >+(Frame scrolling node >+ (scrollable area size 800 600) >+ (contents size 800 600) >+ (scrollable area parameters >+ (horizontal scroll elasticity 2) >+ (vertical scroll elasticity 2) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0)) >+ (visual viewport enabled 1) >+ (layout viewport at (0,0) size 800x600) >+ (min layout viewport origin (0,0)) >+ (max layout viewport origin (0,0)) >+ (behavior for fixed 0) >+ (children 0 >+ ) >+) >+ >+ >diff --git a/LayoutTests/scrollingcoordinator/reparent-across-compositing-layers.html b/LayoutTests/scrollingcoordinator/reparent-across-compositing-layers.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3292d797b29068c30583363e2fca591ede7ed453 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/reparent-across-compositing-layers.html >@@ -0,0 +1,80 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>Check that compositing traverses deeply enough to re-parent scrolling tree nodes</title> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ if (window.internals) >+ window.internals.settings.setAsyncOverflowScrollingEnabled(true); >+ >+ function doTest() { >+ setTimeout(() => { >+ document.getElementById('main').classList.add('changed'); >+ if (window.internals) >+ document.getElementById('scrollingTree').innerText = window.internals.scrollingStateTreeAsText() + "\n"; >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }, 2500); >+ } >+ >+ window.addEventListener('load', doTest, false); >+ </script> >+ <style> >+ .scroller { >+ position: relative; >+ z-index: 0; /* We want z-order nesting */ >+ background-color: silver; >+ border: 1px solid black; >+ padding: 20px; >+ margin: 20px; >+ width: 400px; >+ height: 300px; >+ overflow: scroll; >+ } >+ >+ #main { >+ height: 500px; >+ } >+ >+ #main.changed { >+ overflow: hidden; >+ } >+ >+ .scrolling-content { >+ height: 1000px; >+ } >+ >+ .intermediate { >+ position: relative; >+ z-index: 0; >+ } >+ >+ .composited { >+ transform: translateZ(1px); >+ background-color: orange; >+ } >+ </style> >+</head> >+<body> >+ <div class="scroller" id="main"> >+ <div class="scrolling-content"> >+ Scrolling content >+ <div class="intermediate composited"> >+ Intermediate >+ <div class="inner scroller"> >+ <div class="scrolling-content"> >+ Inner scrolling content >+ </div> >+ </div> >+ </div> >+ </div> >+ </div> >+ </div> >+ <pre id="scrollingTree"></pre> >+</body> >+</html> >diff --git a/LayoutTests/scrollingcoordinator/reparent-with-layer-removal-expected.txt b/LayoutTests/scrollingcoordinator/reparent-with-layer-removal-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7b1e5616227262454a9c0dcceda9ace27524cd95 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/reparent-with-layer-removal-expected.txt >@@ -0,0 +1,32 @@ >+Scrolling content >+Intermediate >+Inner scrolling content >+ >+(Frame scrolling node >+ (scrollable area size 785 600) >+ (contents size 785 1041) >+ (scrollable area parameters >+ (horizontal scroll elasticity 2) >+ (vertical scroll elasticity 2) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0) >+ (has enabled vertical scrollbar 1)) >+ (visual viewport enabled 1) >+ (layout viewport at (0,0) size 785x600) >+ (min layout viewport origin (0,0)) >+ (max layout viewport origin (0,441)) >+ (behavior for fixed 0) >+ (children 1 >+ (Overflow scrolling node >+ (scrollable area size 425 325) >+ (contents size 425 1040) >+ (scrollable area parameters >+ (horizontal scroll elasticity 1) >+ (vertical scroll elasticity 1) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0)) >+ ) >+ ) >+) >+ >+ >diff --git a/LayoutTests/scrollingcoordinator/reparent-with-layer-removal.html b/LayoutTests/scrollingcoordinator/reparent-with-layer-removal.html >new file mode 100644 >index 0000000000000000000000000000000000000000..26fc525a0619126c85243e94867760e80e016dc7 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/reparent-with-layer-removal.html >@@ -0,0 +1,82 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>Check that compositing traverses deeply enough to re-parent scrolling tree nodes</title> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ if (window.internals) >+ window.internals.settings.setAsyncOverflowScrollingEnabled(true); >+ >+ function doTest() { >+ setTimeout(() => { >+ document.getElementById('main').classList.add('changed'); >+ if (window.internals) >+ document.getElementById('scrollingTree').innerText = window.internals.scrollingStateTreeAsText() + "\n"; >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }, 0); >+ } >+ >+ window.addEventListener('load', doTest, false); >+ </script> >+ <style> >+ .scroller { >+ position: relative; >+ z-index: 0; /* We want z-order nesting */ >+ background-color: silver; >+ border: 1px solid black; >+ padding: 20px; >+ margin: 20px; >+ width: 400px; >+ height: 300px; >+ overflow: scroll; >+ } >+ >+ #main { >+ height: 500px; >+ } >+ >+ #main.changed { >+ /* Make it not a RenderLayer */ >+ position: static; >+ overflow: visible; >+ } >+ >+ .scrolling-content { >+ height: 1000px; >+ } >+ >+ .intermediate { >+ position: relative; >+ z-index: 0; >+ } >+ >+ .composited { >+ transform: translateZ(1px); >+ background-color: orange; >+ } >+ </style> >+</head> >+<body> >+ <div class="scroller" id="main"> >+ <div class="scrolling-content"> >+ Scrolling content >+ <div class="intermediate composited"> >+ Intermediate >+ <div class="inner scroller"> >+ <div class="scrolling-content"> >+ Inner scrolling content >+ </div> >+ </div> >+ </div> >+ </div> >+ </div> >+ </div> >+ <pre id="scrollingTree"></pre> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
fred.wang
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193699
:
359822
|
359831
|
359841
|
359852
| 359854