Title: [258805] trunk/Source/WebCore
- Revision
- 258805
- Author
- [email protected]
- Date
- 2020-03-20 22:54:52 -0700 (Fri, 20 Mar 2020)
Log Message
REGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html is failing and timing out
https://bugs.webkit.org/show_bug.cgi?id=209299
Reviewed by Daniel Bates.
fast/scrolling/arrow-key-scroll-in-rtl-document.html is unusual in that it uses monitorWheelEvents()
but then issues arrow key presses.
WebCore responds to arrow keys via WebEditorClient::handleKeyboardEvent() calling down into
WebPage::scroll() which ends up in FrameView::requestScrollPositionUpdate() and bounces to the
scrolling thread. This isn't tracked by existing 'defer' reasons on WheelEventTestMonitor, so add a
new defer reason that covers the period for adding the requested scroll go the scrolling state tree,
and responding to it in the scrolling thread.
* page/WheelEventTestMonitor.cpp:
(WebCore::operator<<):
* page/WheelEventTestMonitor.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):
* page/scrolling/ThreadedScrollingTree.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (258804 => 258805)
--- trunk/Source/WebCore/ChangeLog 2020-03-21 02:42:39 UTC (rev 258804)
+++ trunk/Source/WebCore/ChangeLog 2020-03-21 05:54:52 UTC (rev 258805)
@@ -1,3 +1,28 @@
+2020-03-20 Simon Fraser <[email protected]>
+
+ REGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html is failing and timing out
+ https://bugs.webkit.org/show_bug.cgi?id=209299
+
+ Reviewed by Daniel Bates.
+
+ fast/scrolling/arrow-key-scroll-in-rtl-document.html is unusual in that it uses monitorWheelEvents()
+ but then issues arrow key presses.
+
+ WebCore responds to arrow keys via WebEditorClient::handleKeyboardEvent() calling down into
+ WebPage::scroll() which ends up in FrameView::requestScrollPositionUpdate() and bounces to the
+ scrolling thread. This isn't tracked by existing 'defer' reasons on WheelEventTestMonitor, so add a
+ new defer reason that covers the period for adding the requested scroll go the scrolling state tree,
+ and responding to it in the scrolling thread.
+
+ * page/WheelEventTestMonitor.cpp:
+ (WebCore::operator<<):
+ * page/WheelEventTestMonitor.h:
+ * page/scrolling/AsyncScrollingCoordinator.cpp:
+ (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
+ * page/scrolling/ThreadedScrollingTree.cpp:
+ (WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):
+ * page/scrolling/ThreadedScrollingTree.h:
+
2020-03-20 David Kilzer <[email protected]>
Content-Type & Nosniff Ignored on XML External Entity Resources
Modified: trunk/Source/WebCore/page/WheelEventTestMonitor.cpp (258804 => 258805)
--- trunk/Source/WebCore/page/WheelEventTestMonitor.cpp 2020-03-21 02:42:39 UTC (rev 258804)
+++ trunk/Source/WebCore/page/WheelEventTestMonitor.cpp 2020-03-21 05:54:52 UTC (rev 258805)
@@ -172,6 +172,7 @@
case WheelEventTestMonitor::ScrollSnapInProgress: ts << "scroll-snapping"; break;
case WheelEventTestMonitor::ScrollingThreadSyncNeeded: ts << "scrolling thread sync needed"; break;
case WheelEventTestMonitor::ContentScrollInProgress: ts << "content scrolling"; break;
+ case WheelEventTestMonitor::RequestedScrollPosition: ts << "requested scroll position"; break;
}
return ts;
}
Modified: trunk/Source/WebCore/page/WheelEventTestMonitor.h (258804 => 258805)
--- trunk/Source/WebCore/page/WheelEventTestMonitor.h 2020-03-21 02:42:39 UTC (rev 258804)
+++ trunk/Source/WebCore/page/WheelEventTestMonitor.h 2020-03-21 05:54:52 UTC (rev 258805)
@@ -54,6 +54,7 @@
ScrollSnapInProgress = 1 << 3,
ScrollingThreadSyncNeeded = 1 << 4,
ContentScrollInProgress = 1 << 5,
+ RequestedScrollPosition = 1 << 6,
};
typedef const void* ScrollableAreaIdentifier;
Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (258804 => 258805)
--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2020-03-21 02:42:39 UTC (rev 258804)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2020-03-21 05:54:52 UTC (rev 258805)
@@ -260,6 +260,12 @@
if (!stateNode)
return false;
+#if PLATFORM(MAC)
+ if (m_page && m_page->isMonitoringWheelEvents()) {
+ LOG_WITH_STREAM(WheelEventTestMonitor, stream << " (!) AsyncScrollingCoordinator::requestScrollPositionUpdate: Adding deferral on " << scrollingNodeID << " for reason " << WheelEventTestMonitor::RequestedScrollPosition);
+ m_page->wheelEventTestMonitor()->deferForReason(reinterpret_cast<WheelEventTestMonitor::ScrollableAreaIdentifier>(scrollingNodeID), WheelEventTestMonitor::RequestedScrollPosition);
+ }
+#endif
stateNode->setRequestedScrollData({ scrollPosition, scrollType, clamping });
return true;
}
Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (258804 => 258805)
--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp 2020-03-21 02:42:39 UTC (rev 258804)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp 2020-03-21 05:54:52 UTC (rev 258805)
@@ -197,6 +197,10 @@
});
}
+void ThreadedScrollingTree::scrollingTreeNodeRequestsScroll(ScrollingNodeID nodeID, const FloatPoint& /*scrollPosition*/, ScrollType, ScrollClamping)
+{
+ removeWheelEventTestCompletionDeferralForReason(reinterpret_cast<WheelEventTestMonitor::ScrollableAreaIdentifier>(nodeID), WheelEventTestMonitor::RequestedScrollPosition);
+}
#endif
} // namespace WebCore
Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h (258804 => 258805)
--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h 2020-03-21 02:42:39 UTC (rev 258804)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h 2020-03-21 05:54:52 UTC (rev 258805)
@@ -65,6 +65,7 @@
#if PLATFORM(MAC)
void handleWheelEventPhase(PlatformWheelEventPhase) override;
void setActiveScrollSnapIndices(ScrollingNodeID, unsigned horizontalIndex, unsigned verticalIndex) override;
+ void scrollingTreeNodeRequestsScroll(ScrollingNodeID, const FloatPoint& /*scrollPosition*/, ScrollType, ScrollClamping) override;
#endif
#if PLATFORM(COCOA)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes