WebKit Bugzilla
Attachment 358490 Details for
Bug 172917
: [Mac] Implement basic hit testing in the scrolling tree
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Temporary patch to set parentRelativeScrollableRect on scrolling nodes
0001-Mac-Temporary-patch-to-set-parentRelativeScrollableR.patch (text/plain), 24.02 KB, created by
Frédéric Wang (:fredw)
on 2019-01-07 03:32:17 PST
(
hide
)
Description:
Temporary patch to set parentRelativeScrollableRect on scrolling nodes
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2019-01-07 03:32:17 PST
Size:
24.02 KB
patch
obsolete
>From c27b2baf7be92a64eedf32922e17319d2ed4ddde Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Thu, 29 Nov 2018 10:13:54 +0100 >Subject: [PATCH xserver 1/3] [Mac] Temporary patch to set > parentRelativeScrollableRect on scrolling nodes. > >--- > ...rent-relative-scrollable-rect-expected.txt | 37 +++++++++++ > ...frame-parent-relative-scrollable-rect.html | 42 +++++++++++++ > ...scrolling-tree-includes-frame-expected.txt | 1 + > .../scrolling-tree-includes-frame.html | 4 +- > ...rent-relative-scrollable-rect-expected.txt | 35 +++++++++++ > ...scrolling-tree-includes-frame-expected.txt | 1 + > ...rent-relative-scrollable-rect-expected.txt | 20 ++++++ > ...scrolling-tree-includes-frame-expected.txt | 2 +- > ...rent-relative-scrollable-rect-expected.txt | 3 + > LayoutTests/platform/win/TestExpectations | 1 + > .../frames/coordinated-frame-expected.txt | 1 + > ...frame-gain-scrolling-ancestor-expected.txt | 1 + > .../coordinated-frame-in-fixed-expected.txt | 1 + > ...frame-lose-scrolling-ancestor-expected.txt | 1 + > .../frames/fixed-inside-frame-expected.txt | 1 + > .../rendering/RenderLayerCompositor.cpp | 62 +++++++++++-------- > .../WebCore/rendering/RenderLayerCompositor.h | 9 ++- > 17 files changed, 193 insertions(+), 29 deletions(-) > create mode 100644 LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt > create mode 100644 LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect.html > create mode 100644 LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt > create mode 100644 LayoutTests/platform/ios/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt > create mode 100644 LayoutTests/platform/mac-wk1/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt > >diff --git a/LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt b/LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >new file mode 100644 >index 00000000000..8932eeea5a4 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >@@ -0,0 +1,37 @@ >+ >+ >+(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 1 >+ (Frame scrolling node >+ (scrollable area size 85 185) >+ (contents size 308 416) >+ (parent relative scrollable rect at (105,115) size 100x200) >+ (scrollable area parameters >+ (horizontal scroll elasticity 0) >+ (vertical scroll elasticity 0) >+ (horizontal scrollbar mode 0) >+ (vertical scrollbar mode 0) >+ (has enabled horizontal scrollbar 1) >+ (has enabled vertical scrollbar 1)) >+ (visual viewport enabled 1) >+ (layout viewport at (0,0) size 85x185) >+ (min layout viewport origin (0,0)) >+ (max layout viewport origin (223,231)) >+ (behavior for fixed 0) >+ ) >+ ) >+) >+ >+ >diff --git a/LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect.html b/LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect.html >new file mode 100644 >index 00000000000..a7c991a7918 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect.html >@@ -0,0 +1,42 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Check the ParentRelativeScrollableRect of iframe in the scrolling tree</title> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ if (window.internals) >+ window.internals.settings.setAsyncFrameScrollingEnabled(true); >+ function doTest() >+ { >+ if (window.internals) >+ document.getElementById('scrollingTree').innerText = window.internals.scrollingStateTreeAsText() + "\n"; >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ } >+ </script> >+ <style> >+ iframe { >+ position: absolute; >+ left: 60px; >+ top: 70px; >+ width: 100px; >+ height: 200px; >+ background: gray; >+ overflow: scroll; >+ margin: 15px; >+ border: 10px solid blue; >+ padding: 20px; >+ } >+ </style> >+ </head> >+ <body> >+ <iframe onload="doTest()" srcdoc=" >+ <div style='width: 300px; height: 400px; background: white;'></div> >+ "> >+ </iframe> >+ <pre id="scrollingTree"></pre> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/scrolling-tree-includes-frame-expected.txt b/LayoutTests/fast/scrolling/scrolling-tree-includes-frame-expected.txt >index 99fdd043a97..09e3fd4c98c 100644 >--- a/LayoutTests/fast/scrolling/scrolling-tree-includes-frame-expected.txt >+++ b/LayoutTests/fast/scrolling/scrolling-tree-includes-frame-expected.txt >@@ -17,6 +17,7 @@ > (Frame scrolling node > (scrollable area size 85 185) > (contents size 308 416) >+ (parent relative scrollable rect at (60,70) size 100x200) > (scrollable area parameters > (horizontal scroll elasticity 0) > (vertical scroll elasticity 0) >diff --git a/LayoutTests/fast/scrolling/scrolling-tree-includes-frame.html b/LayoutTests/fast/scrolling/scrolling-tree-includes-frame.html >index 4bb2d190005..614cf4d4f83 100644 >--- a/LayoutTests/fast/scrolling/scrolling-tree-includes-frame.html >+++ b/LayoutTests/fast/scrolling/scrolling-tree-includes-frame.html >@@ -20,8 +20,8 @@ > <style> > iframe { > position: absolute; >- left: 0; >- top: 0; >+ left: 60px; >+ top: 70px; > width: 100px; > height: 200px; > margin: 0; >diff --git a/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt b/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >new file mode 100644 >index 00000000000..8a221dd2245 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >@@ -0,0 +1,35 @@ >+ >+ >+(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 1 >+ (Frame scrolling node >+ (scrollable area size 100 200) >+ (contents size 308 416) >+ (parent relative scrollable rect at (105,115) size 100x200) >+ (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 100x200) >+ (min layout viewport origin (0,0)) >+ (max layout viewport origin (208,216)) >+ (behavior for fixed 0) >+ ) >+ ) >+) >+ >+ >diff --git a/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt b/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt >index 4b34bf64bfc..fe3fd4e3f65 100644 >--- a/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt >+++ b/LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt >@@ -17,6 +17,7 @@ > (Frame scrolling node > (scrollable area size 100 200) > (contents size 308 416) >+ (parent relative scrollable rect at (60,70) size 100x200) > (scrollable area parameters > (horizontal scroll elasticity 1) > (vertical scroll elasticity 1) >diff --git a/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt b/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >new file mode 100644 >index 00000000000..42b6226bd97 >--- /dev/null >+++ b/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >@@ -0,0 +1,20 @@ >+ >+ >+(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)) >+ (synchronous event dispatch region for event wheel >+ at (61,71) size 100x200) >+ (behavior for fixed 0) >+) >+ >+ >diff --git a/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt b/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt >index 2b524e809a5..42b6226bd97 100644 >--- a/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt >+++ b/LayoutTests/platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt >@@ -13,7 +13,7 @@ > (min layout viewport origin (0,0)) > (max layout viewport origin (0,0)) > (synchronous event dispatch region for event wheel >- at (9,9) size 100x200) >+ at (61,71) size 100x200) > (behavior for fixed 0) > ) > >diff --git a/LayoutTests/platform/mac-wk1/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt b/LayoutTests/platform/mac-wk1/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >new file mode 100644 >index 00000000000..b28b04f6431 >--- /dev/null >+++ b/LayoutTests/platform/mac-wk1/fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect-expected.txt >@@ -0,0 +1,3 @@ >+ >+ >+ >diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations >index f34aa0eac01..cfde2d33970 100644 >--- a/LayoutTests/platform/win/TestExpectations >+++ b/LayoutTests/platform/win/TestExpectations >@@ -3561,6 +3561,7 @@ fast/multicol/table-vertical-align.html [ Failure ] > fast/parser/xml-error-unload-iframe.html [ Failure ] > fast/replaced/table-percent-height.html [ Failure ] > fast/scrolling/scrolling-tree-includes-frame.html [ Failure ] >+fast/scrolling/scrolling-tree-iframe-parent-relative-scrollable-rect.html [ Skip ] > fast/table/giantRowspan.html [ Failure ] > fast/table/giantRowspan2.html [ Failure ] > fast/text/emoji.html [ Failure ] >diff --git a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt >index 51c67f6ce67..90bd1fd4e17 100644 >--- a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt >+++ b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt >@@ -19,6 +19,7 @@ > (Frame scrolling node > (scrollable area size 485 300) > (contents size 485 420) >+ (parent relative scrollable rect at (37,39) size 500x300) > (scrollable area parameters > (horizontal scroll elasticity 0) > (vertical scroll elasticity 0) >diff --git a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt >index 2f4a32a0dbe..878617a3cc2 100644 >--- a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt >+++ b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt >@@ -24,6 +24,7 @@ > (Frame scrolling node > (scrollable area size 500 300) > (contents size 500 420) >+ (parent relative scrollable rect at (37,39) size 500x300) > (scrollable area parameters > (horizontal scroll elasticity 0) > (vertical scroll elasticity 0) >diff --git a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt >index b67332d9fca..50ee707fe97 100644 >--- a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt >+++ b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt >@@ -24,6 +24,7 @@ > (Frame scrolling node > (scrollable area size 485 300) > (contents size 485 420) >+ (parent relative scrollable rect at (29,29) size 500x300) > (scrollable area parameters > (horizontal scroll elasticity 0) > (vertical scroll elasticity 0) >diff --git a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt >index 9a9f562b360..1cbb2d4b608 100644 >--- a/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt >+++ b/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt >@@ -19,6 +19,7 @@ > (Frame scrolling node > (scrollable area size 500 300) > (contents size 500 420) >+ (parent relative scrollable rect at (29,29) size 500x300) > (scrollable area parameters > (horizontal scroll elasticity 0) > (vertical scroll elasticity 0) >diff --git a/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt b/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt >index 74da075953c..5918559ec35 100644 >--- a/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt >+++ b/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt >@@ -20,6 +20,7 @@ > (contents size 465 1016) > (requested scroll position 0 120) > (requested scroll position represents programmatic scroll 1) >+ (parent relative scrollable rect at (110,110) size 480x400) > (scrollable area parameters > (horizontal scroll elasticity 0) > (vertical scroll elasticity 0) >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 578efb2960f..5ca58bce015 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -3754,36 +3754,47 @@ StickyPositionViewportConstraints RenderLayerCompositor::computeStickyViewportCo > return constraints; > } > >-static ScrollingNodeID enclosingScrollingNodeID(RenderLayer& layer, IncludeSelfOrNot includeSelf) >+RenderLayerCompositor::EnclosingNodeData RenderLayerCompositor::findEnclosingScrollingNode(RenderLayer& layer, IncludeSelfOrNot includeSelf) > { > auto* currLayer = includeSelf == IncludeSelf ? &layer : layer.parent(); >+ EnclosingNodeData result; >+ >+ // FIXME: This does not take transforms into account: >+ // - Async scrolling should not be performed when there are non-axis-aligned transforms. >+ // - parentRelativeScrollableRect should be resized if there are scale transforms. > while (currLayer) { > if (auto* backing = currLayer->backing()) { >- if (ScrollingNodeID nodeID = backing->scrollingNodeIDForChildren()) >- return nodeID; >+ if (ScrollingNodeID nodeID = backing->scrollingNodeIDForChildren()) { >+ result.nodeID = nodeID; >+ if (auto* box = layer.renderBox()) { >+ result.parentRelativeScrollableRect = box->contentBoxRect(); >+ result.parentRelativeScrollableRect.setLocation(layer.convertToLayerCoords(currLayer, result.parentRelativeScrollableRect.location())); >+ } >+ return result; >+ } > } > currLayer = currLayer->parent(); > } > >- return 0; >+ return result; > } > >-static ScrollingNodeID scrollCoordinatedAncestorInParentOfFrame(Frame& frame) >+Optional<RenderLayerCompositor::EnclosingNodeData> RenderLayerCompositor::scrollCoordinatedAncestorInParentOfFrame(Frame& frame) > { > if (!frame.document() || !frame.view()) >- return 0; >+ return WTF::nullopt; > > // Find the frame's enclosing layer in our render tree. > auto* ownerElement = frame.document()->ownerElement(); > auto* frameRenderer = ownerElement ? ownerElement->renderer() : nullptr; > if (!frameRenderer) >- return 0; >+ return WTF::nullopt; > > auto* layerInParentDocument = frameRenderer->enclosingLayer(); > if (!layerInParentDocument) >- return 0; >+ return WTF::nullopt; > >- return enclosingScrollingNodeID(*layerInParentDocument, IncludeSelf); >+ return findEnclosingScrollingNode(*layerInParentDocument, IncludeSelf); > } > > void RenderLayerCompositor::reattachSubframeScrollLayers() >@@ -3805,11 +3816,11 @@ void RenderLayerCompositor::reattachSubframeScrollLayers() > if (!frameScrollingNodeID) > continue; > >- ScrollingNodeID parentNodeID = scrollCoordinatedAncestorInParentOfFrame(*child); >- if (!parentNodeID) >+ Optional<EnclosingNodeData> parentNodeData = scrollCoordinatedAncestorInParentOfFrame(*child); >+ if (!parentNodeData) > continue; > >- scrollingCoordinator->attachToStateTree(child->isMainFrame() ? ScrollingNodeType::MainFrame : ScrollingNodeType::Subframe, frameScrollingNodeID, parentNodeID); >+ scrollingCoordinator->attachToStateTree(child->isMainFrame() ? ScrollingNodeType::MainFrame : ScrollingNodeType::Subframe, frameScrollingNodeID, parentNodeData->nodeID); > } > } > >@@ -3871,15 +3882,16 @@ void RenderLayerCompositor::detachScrollCoordinatedLayer(RenderLayer& layer, Opt > backing->detachFromScrollingCoordinator(roles); > } > >-void RenderLayerCompositor::updateScrollCoordinationForThisFrame(ScrollingNodeID parentNodeID) >+void RenderLayerCompositor::updateScrollCoordinationForThisFrame(const EnclosingNodeData& parentNodeData) > { > auto* scrollingCoordinator = this->scrollingCoordinator(); > FrameView& frameView = m_renderView.frameView(); > ASSERT(scrollingCoordinator->coordinatesScrollingForFrameView(frameView)); > >- ScrollingNodeID nodeID = attachScrollingNode(*m_renderView.layer(), m_renderView.frame().isMainFrame() ? ScrollingNodeType::MainFrame : ScrollingNodeType::Subframe, parentNodeID); >+ ScrollingNodeID nodeID = attachScrollingNode(*m_renderView.layer(), m_renderView.frame().isMainFrame() ? ScrollingNodeType::MainFrame : ScrollingNodeType::Subframe, parentNodeData.nodeID); > ScrollingCoordinator::ScrollingGeometry scrollingGeometry; > // FIXME(https://webkit.org/b/172917): Pass parentRelativeScrollableRect? >+ scrollingGeometry.parentRelativeScrollableRect = parentNodeData.parentRelativeScrollableRect; > scrollingGeometry.scrollOrigin = frameView.scrollOrigin(); > scrollingGeometry.scrollableAreaSize = frameView.visibleContentRect().size(); > scrollingGeometry.contentSize = frameView.totalContentsSize(); >@@ -3903,17 +3915,17 @@ void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, Opt > return; > > if (!m_renderView.frame().isMainFrame()) { >- ScrollingNodeID parentDocumentHostingNodeID = scrollCoordinatedAncestorInParentOfFrame(m_renderView.frame()); >- if (!parentDocumentHostingNodeID) >+ Optional<EnclosingNodeData> parentDocumentHostingNodeData = scrollCoordinatedAncestorInParentOfFrame(m_renderView.frame()); >+ if (!parentDocumentHostingNodeData) > return; > >- updateScrollCoordinationForThisFrame(parentDocumentHostingNodeID); >+ updateScrollCoordinationForThisFrame(*parentDocumentHostingNodeData); > if (!(roles.contains(ScrollCoordinationRole::ViewportConstrained)) && isRenderViewLayer) > return; > } > >- ScrollingNodeID parentNodeID = enclosingScrollingNodeID(layer, ExcludeSelf); >- if (!parentNodeID && !isRenderViewLayer) >+ EnclosingNodeData parentNodeData = findEnclosingScrollingNode(layer, ExcludeSelf); >+ if (!parentNodeData.nodeID && !isRenderViewLayer) > return; > > auto* backing = layer.backing(); >@@ -3929,11 +3941,11 @@ void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, Opt > else > ASSERT_NOT_REACHED(); > >- ScrollingNodeID nodeID = attachScrollingNode(layer, nodeType, parentNodeID); >+ ScrollingNodeID nodeID = attachScrollingNode(layer, nodeType, parentNodeData.nodeID); > if (!nodeID) > return; > >- LOG_WITH_STREAM(Compositing, stream << "Registering ViewportConstrained " << nodeType << " node " << nodeID << " (layer " << backing->graphicsLayer()->primaryLayerID() << ") as child of " << parentNodeID); >+ LOG_WITH_STREAM(Compositing, stream << "Registering ViewportConstrained " << nodeType << " node " << nodeID << " (layer " << backing->graphicsLayer()->primaryLayerID() << ") as child of " << parentNodeData.nodeID); > > if (changes & ScrollingNodeChangeFlags::Layer) > scrollingCoordinator->updateNodeLayer(nodeID, backing->graphicsLayer()); >@@ -3953,16 +3965,16 @@ void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, Opt > } > } > >- parentNodeID = nodeID; >+ parentNodeData.nodeID = nodeID; > } else > detachScrollCoordinatedLayer(layer, ScrollCoordinationRole::ViewportConstrained); > > if (roles.contains(ScrollCoordinationRole::Scrolling)) { > if (isRenderViewLayer) >- updateScrollCoordinationForThisFrame(parentNodeID); >+ updateScrollCoordinationForThisFrame(parentNodeData); > else { > ScrollingNodeType nodeType = ScrollingNodeType::Overflow; >- ScrollingNodeID nodeID = attachScrollingNode(layer, nodeType, parentNodeID); >+ ScrollingNodeID nodeID = attachScrollingNode(layer, nodeType, parentNodeData.nodeID); > if (!nodeID) > return; > >@@ -3986,7 +3998,7 @@ void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, Opt > scrollingGeometry.currentVerticalSnapPointIndex = layer.currentVerticalSnapPointIndex(); > #endif > >- LOG(Compositing, "Registering Scrolling scrolling node %" PRIu64 " (layer %" PRIu64 ") as child of %" PRIu64, nodeID, backing->graphicsLayer()->primaryLayerID(), parentNodeID); >+ LOG(Compositing, "Registering Scrolling scrolling node %" PRIu64 " (layer %" PRIu64 ") as child of %" PRIu64, nodeID, backing->graphicsLayer()->primaryLayerID(), parentNodeData.nodeID); > > scrollingCoordinator->updateOverflowScrollingNode(nodeID, backing->scrollingLayer(), backing->scrollingContentsLayer(), scrollingGeometry); > } >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index 0e0e6d409bd..54d49b94a10 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -31,6 +31,7 @@ > #include "RenderLayer.h" > #include <wtf/HashMap.h> > #include <wtf/OptionSet.h> >+#include <wtf/Optional.h> > > namespace WebCore { > >@@ -449,7 +450,13 @@ private: > > void updateCustomLayersAfterFlush(); > >- void updateScrollCoordinationForThisFrame(ScrollingNodeID); >+ struct EnclosingNodeData { >+ ScrollingNodeID nodeID { 0 }; >+ LayoutRect parentRelativeScrollableRect; >+ }; >+ EnclosingNodeData findEnclosingScrollingNode(RenderLayer&, IncludeSelfOrNot); >+ Optional<EnclosingNodeData> scrollCoordinatedAncestorInParentOfFrame(Frame&); >+ void updateScrollCoordinationForThisFrame(const EnclosingNodeData&); > ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, ScrollingNodeID parentNodeID); > void updateScrollCoordinatedLayer(RenderLayer&, OptionSet<ScrollCoordinationRole>, OptionSet<ScrollingNodeChangeFlags>); > void detachScrollCoordinatedLayer(RenderLayer&, OptionSet<ScrollCoordinationRole>); >-- >2.20.1 >
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 172917
:
312007
|
312321
|
320274
|
320548
|
320627
|
320631
|
320652
|
320752
|
320919
|
355486
|
355637
|
355639
|
355640
|
355641
|
355642
|
355986
|
356005
|
356149
|
356503
|
358490
|
358491
|
358703
|
360651
|
360657
|
360668
|
360677
|
360689
|
360691