Title: [261053] trunk/Source/WebCore
Revision
261053
Author
[email protected]
Date
2020-05-02 12:35:03 -0700 (Sat, 02 May 2020)

Log Message

scrollableAreaForScrollingNodeID() gives the wrong answer for the FrameView
https://bugs.webkit.org/show_bug.cgi?id=211310

Reviewed by Zalan Bujtas.

Given the FrameView's scrollingNodeID, RenderLayerCompositor::scrollableAreaForScrollingNodeID()
would return the RenderView's layer when it should return the FrameView itself.

Fixing this allows removal of a special-case in setActiveScrollSnapIndices().

No behavior change.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scrollableAreaForScrollingNodeID const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (261052 => 261053)


--- trunk/Source/WebCore/ChangeLog	2020-05-02 19:32:26 UTC (rev 261052)
+++ trunk/Source/WebCore/ChangeLog	2020-05-02 19:35:03 UTC (rev 261053)
@@ -1,5 +1,24 @@
 2020-05-02  Simon Fraser  <[email protected]>
 
+        scrollableAreaForScrollingNodeID() gives the wrong answer for the FrameView
+        https://bugs.webkit.org/show_bug.cgi?id=211310
+
+        Reviewed by Zalan Bujtas.
+
+        Given the FrameView's scrollingNodeID, RenderLayerCompositor::scrollableAreaForScrollingNodeID()
+        would return the RenderView's layer when it should return the FrameView itself.
+
+        Fixing this allows removal of a special-case in setActiveScrollSnapIndices().
+
+        No behavior change.
+
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::scrollableAreaForScrollingNodeID const):
+
+2020-05-02  Simon Fraser  <[email protected]>
+
         handleWheelEventPhase() should include the relevant ScrollingNodeID
         https://bugs.webkit.org/show_bug.cgi?id=211315
 

Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (261052 => 261053)


--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2020-05-02 19:32:26 UTC (rev 261052)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2020-05-02 19:35:03 UTC (rev 261053)
@@ -885,13 +885,6 @@
     if (!frameView)
         return;
     
-    if (scrollingNodeID == frameView->scrollingNodeID()) {
-        frameView->setCurrentHorizontalSnapPointIndex(horizontalIndex);
-        frameView->setCurrentVerticalSnapPointIndex(verticalIndex);
-        return;
-    }
-    
-    // Overflow-scroll area.
     if (auto* scrollableArea = frameView->scrollableAreaForScrollingNodeID(scrollingNodeID)) {
         scrollableArea->setCurrentHorizontalSnapPointIndex(horizontalIndex);
         scrollableArea->setCurrentVerticalSnapPointIndex(verticalIndex);

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (261052 => 261053)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2020-05-02 19:32:26 UTC (rev 261052)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2020-05-02 19:35:03 UTC (rev 261053)
@@ -4774,6 +4774,9 @@
     if (!nodeID)
         return nullptr;
 
+    if (nodeID == m_renderView.frameView().scrollingNodeID())
+        return &m_renderView.frameView();
+
     return m_scrollingNodeToLayerMap.get(nodeID).get();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to