Diff
Modified: trunk/LayoutTests/ChangeLog (266291 => 266292)
--- trunk/LayoutTests/ChangeLog 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/LayoutTests/ChangeLog 2020-08-28 21:09:51 UTC (rev 266292)
@@ -1,3 +1,23 @@
+2020-08-27 Simon Fraser <[email protected]>
+
+ Vertical scrolling gets stuck when a horizontal scroller is under the mouse (google search results)
+ https://bugs.webkit.org/show_bug.cgi?id=215641
+ <rdar://problem/67430532>
+
+ Reviewed by Tim Horton.
+
+ After this change iframe-latch-small-deltas.html would time-out because WheelEventTestMonitor
+ would get stuck with a "content scrolling" defer region, due to begin/end wheel
+ events not getting both sent to the iframe. But the test was actually broken; logging shows
+ that it reset latching state anyway, and it's not testing the shipping configuration of
+ async iframe scrolling. So fix the test to use async iframe scrolling, and to avoid
+ rubber-banding, so that latching is not cleared due to elapsed time.
+
+ * fast/scrolling/latching/iframe-latch-small-deltas-expected.txt:
+ * fast/scrolling/latching/iframe-latch-small-deltas.html:
+ * fast/scrolling/mac/horizontal-overflow-trapping-small-deltas-expected.txt: Added.
+ * fast/scrolling/mac/horizontal-overflow-trapping-small-deltas.html: Added.
+
2020-08-28 Antoine Quint <[email protected]>
REGRESSION (r263506): scale transform transitions won't overshoot
Modified: trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt (266291 => 266292)
--- trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt 2020-08-28 21:09:51 UTC (rev 266292)
@@ -7,12 +7,12 @@
PASS iframeTarget.contentWindow.pageYOffset is 0
PASS window.pageYOffset is 200
After scroll
-PASS iframeTarget.contentWindow.pageYOffset is 500
+PASS iframeTarget.contentWindow.pageYOffset is 400
PASS window.pageYOffset is 200
After wait
-PASS iframeTarget.contentWindow.pageYOffset is 500
+PASS iframeTarget.contentWindow.pageYOffset is 400
PASS window.pageYOffset is 200
-PASS iframeTarget.contentWindow.pageYOffset is 480
+PASS iframeTarget.contentWindow.pageYOffset is 380
PASS window.pageYOffset is 200
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas.html (266291 => 266292)
--- trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas.html 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas.html 2020-08-28 21:09:51 UTC (rev 266292)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncFrameScrollingEnabled=true ] -->
<html>
<head>
<style>
@@ -30,23 +30,21 @@
eventSender.monitorWheelEvents();
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'begin');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
await UIHelper.waitForScrollCompletion();
debug('After scroll');
- shouldBe('iframeTarget.contentWindow.pageYOffset', '500');
+ shouldBe('iframeTarget.contentWindow.pageYOffset', '400');
shouldBe('window.pageYOffset', '200');
await UIHelper.animationFrame();
debug('After wait');
- shouldBe('iframeTarget.contentWindow.pageYOffset', '500');
+ shouldBe('iframeTarget.contentWindow.pageYOffset', '400');
shouldBe('window.pageYOffset', '200');
eventSender.monitorWheelEvents({ resetLatching: false });
@@ -56,7 +54,7 @@
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
await UIHelper.waitForScrollCompletion();
- shouldBe('iframeTarget.contentWindow.pageYOffset', '480');
+ shouldBe('iframeTarget.contentWindow.pageYOffset', '380');
shouldBe('window.pageYOffset', '200');
finishJSTest();
Added: trunk/LayoutTests/fast/scrolling/mac/horizontal-overflow-trapping-small-deltas-expected.txt (0 => 266292)
--- trunk/LayoutTests/fast/scrolling/mac/horizontal-overflow-trapping-small-deltas-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/horizontal-overflow-trapping-small-deltas-expected.txt 2020-08-28 21:09:51 UTC (rev 266292)
@@ -0,0 +1,8 @@
+
+Test that events with a small X delta do not cause trapping in the horizontal overflow
+PASS overflowScrollEventCount == 0 is true
+PASS windowScrollEventCount > 0 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/scrolling/mac/horizontal-overflow-trapping-small-deltas.html (0 => 266292)
--- trunk/LayoutTests/fast/scrolling/mac/horizontal-overflow-trapping-small-deltas.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/horizontal-overflow-trapping-small-deltas.html 2020-08-28 21:09:51 UTC (rev 266292)
@@ -0,0 +1,103 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ body {
+ height: 2000px;
+ }
+
+ .container {
+ padding: 10px;
+ margin: 20px;
+ border: 1px solid gray;
+ }
+
+ .scroller {
+ margin-top: 100px;
+ height: 200px;
+ width: 300px;
+ border: 1px solid black;
+ padding: 5px;
+ overflow: scroll;
+ }
+ .content {
+ width: 500%;
+ height: 100%;
+ background-image: repeating-linear-gradient(to right, white, silver 200px);
+ }
+ </style>
+ <script src=""
+ <script src=""
+ <script>
+ var jsTestIsAsync = true;
+
+ var scroller;
+ var overflowScrollEventCount = 0;
+ var windowScrollEventCount = 0;
+
+ async function resetScrollPositions()
+ {
+ window.scrollTo(0, 100);
+ scroller.scrollLeft = 100;
+
+ // Wait for scroll events to fire.
+ await UIHelper.renderingUpdate();
+ }
+
+ async function doMouseWheelScroll()
+ {
+ eventSender.monitorWheelEvents();
+ eventSender.mouseMoveTo(100, 100);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "began", "none");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(1, -5, "changed", "none");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(2, -5, "changed", "none");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(1, -5, "changed", "none");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
+
+ return new Promise(resolve => {
+ eventSender.callAfterScrollingCompletes(() => {
+ requestAnimationFrame(resolve);
+ });
+ });
+ }
+
+ async function scrollTest()
+ {
+ debug('');
+ debug('Test that events with a small X delta do not cause trapping in the horizontal overflow');
+ await doMouseWheelScroll();
+
+ shouldBe('overflowScrollEventCount == 0', 'true');
+ shouldBe('windowScrollEventCount > 0', 'true');
+
+ finishJSTest();
+ }
+
+ window.addEventListener('load', async () => {
+ document.body.addEventListener('wheel', () => { }, false);
+
+ scroller = document.querySelector('.scroller');
+ await resetScrollPositions();
+
+ scroller.addEventListener('scroll', () => {
+ ++overflowScrollEventCount;
+ }, false);
+
+ window.addEventListener('scroll', () => {
+ ++windowScrollEventCount;
+ }, false);
+
+ setTimeout(scrollTest, 0);
+ }, false);
+ </script>
+</head>
+<body>
+ <div class="container">
+ <div class="scroller">
+ <div class="content"></div>
+ </div>
+ </div>
+ <div id="console"></div>
+ <script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt (266291 => 266292)
--- trunk/LayoutTests/platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/LayoutTests/platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt 2020-08-28 21:09:51 UTC (rev 266292)
@@ -7,12 +7,12 @@
PASS iframeTarget.contentWindow.pageYOffset is 0
PASS window.pageYOffset is 200
After scroll
-FAIL iframeTarget.contentWindow.pageYOffset should be 500. Was 305.
+FAIL iframeTarget.contentWindow.pageYOffset should be 400. Was 205.
PASS window.pageYOffset is 200
After wait
-FAIL iframeTarget.contentWindow.pageYOffset should be 500. Was 305.
+FAIL iframeTarget.contentWindow.pageYOffset should be 400. Was 205.
PASS window.pageYOffset is 200
-FAIL iframeTarget.contentWindow.pageYOffset should be 480. Was 300.
+FAIL iframeTarget.contentWindow.pageYOffset should be 380. Was 200.
PASS window.pageYOffset is 200
PASS successfullyParsed is true
Modified: trunk/Source/WebCore/ChangeLog (266291 => 266292)
--- trunk/Source/WebCore/ChangeLog 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/ChangeLog 2020-08-28 21:09:51 UTC (rev 266292)
@@ -1,3 +1,43 @@
+2020-08-27 Simon Fraser <[email protected]>
+
+ Vertical scrolling gets stuck when a horizontal scroller is under the mouse (google search results)
+ https://bugs.webkit.org/show_bug.cgi?id=215641
+ <rdar://problem/67430532>
+
+ Reviewed by Tim Horton.
+
+ There are two parts to this fix. First, findEnclosingScrollableContainer() needs
+ to use the same vertical-biasing delta fixup that we use in other places, to bias towards
+ vertical scrolling.
+
+ Second, when we've determined that the main frame should perform the scroll and dispatch
+ the wheel event to the scrolling thread, we used to hit-test from scratch on the scrolling
+ thread and and try to send the event to a scroller which we already know should not handle
+ it. So pass along a target ScrollingNodeID, and start the scrolling thread handling from
+ that node.
+
+ Test: fast/scrolling/mac/horizontal-overflow-trapping-small-deltas.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::wheelEvent):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::findEnclosingScrollableContainer):
+ * page/scrolling/ScrollingCoordinator.h:
+ (WebCore::ScrollingCoordinator::handleWheelEvent):
+ * page/scrolling/ScrollingTree.cpp:
+ (WebCore::ScrollingTree::handleWheelEvent):
+ (WebCore::ScrollingTree::handleWheelEventWithNode):
+ * page/scrolling/ScrollingTree.h:
+ * page/scrolling/ThreadedScrollingTree.cpp:
+ (WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread):
+ * page/scrolling/ThreadedScrollingTree.h:
+ * page/scrolling/mac/ScrollingCoordinatorMac.h:
+ * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+ (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
+ * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
+ (WebCore::ScrollingCoordinatorNicosia::handleWheelEvent):
+ * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
+
2020-08-28 Zalan Bujtas <[email protected]>
No need to run full can-use-for (fast inline layout codepath) check on every style change.
Modified: trunk/Source/WebCore/page/FrameView.cpp (266291 => 266292)
--- trunk/Source/WebCore/page/FrameView.cpp 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/FrameView.cpp 2020-08-28 21:09:51 UTC (rev 266292)
@@ -5122,7 +5122,7 @@
#if ENABLE(ASYNC_SCROLLING)
if (auto scrollingCoordinator = this->scrollingCoordinator()) {
if (scrollingCoordinator->coordinatesScrollingForFrameView(*this))
- return scrollingCoordinator->handleWheelEvent(*this, wheelEvent);
+ return scrollingCoordinator->handleWheelEvent(*this, wheelEvent, scrollingNodeID());
}
#endif
Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (266291 => 266292)
--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2020-08-28 21:09:51 UTC (rev 266292)
@@ -787,6 +787,8 @@
static ContainerNode* findEnclosingScrollableContainer(ContainerNode* node, const PlatformWheelEvent& wheelEvent)
{
+ auto biasedDelta = ScrollController::wheelDeltaBiasingTowardsVertical(wheelEvent);
+
// Find the first node with a valid scrollable area starting with the current
// node and traversing its parents (or shadow hosts).
for (ContainerNode* candidate = node; candidate; candidate = candidate->parentOrShadowHostNode()) {
@@ -807,11 +809,8 @@
if (wheelEvent.phase() == PlatformWheelEventPhaseMayBegin || wheelEvent.phase() == PlatformWheelEventPhaseCancelled)
return candidate;
- // FIXME: This needs to have the same axis bias that we use in other latching code.
- auto deltaX = wheelEvent.deltaX();
- auto deltaY = wheelEvent.deltaY();
- if ((deltaY > 0 && !scrollableArea->scrolledToTop()) || (deltaY < 0 && !scrollableArea->scrolledToBottom())
- || (deltaX > 0 && !scrollableArea->scrolledToLeft()) || (deltaX < 0 && !scrollableArea->scrolledToRight()))
+ if ((biasedDelta.height() > 0 && !scrollableArea->scrolledToTop()) || (biasedDelta.height() < 0 && !scrollableArea->scrolledToBottom())
+ || (biasedDelta.width() > 0 && !scrollableArea->scrolledToLeft()) || (biasedDelta.width() < 0 && !scrollableArea->scrolledToRight()))
return candidate;
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2020-08-28 21:09:51 UTC (rev 266292)
@@ -127,7 +127,7 @@
// These virtual functions are currently unique to the threaded scrolling architecture.
virtual void commitTreeStateIfNeeded() { }
virtual bool requestScrollPositionUpdate(ScrollableArea&, const IntPoint&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped) { return false; }
- virtual bool handleWheelEvent(FrameView&, const PlatformWheelEvent&) { return false; }
+ virtual bool handleWheelEvent(FrameView&, const PlatformWheelEvent&, ScrollingNodeID) { return false; }
// Create an unparented node.
virtual ScrollingNodeID createNode(ScrollingNodeType, ScrollingNodeID newNodeID) { return newNodeID; }
Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp 2020-08-28 21:09:51 UTC (rev 266292)
@@ -134,34 +134,39 @@
LOG_WITH_STREAM(Scrolling, stream << "ScrollingTree::handleWheelEvent found node " << (node ? node->scrollingNodeID() : 0) << " for point " << position);
- while (node) {
- if (is<ScrollingTreeScrollingNode>(*node)) {
- auto& scrollingNode = downcast<ScrollingTreeScrollingNode>(*node);
- auto result = scrollingNode.handleWheelEvent(wheelEvent);
+ return handleWheelEventWithNode(wheelEvent, node.get());
+ }();
- if (result.wasHandled) {
- m_latchingController.nodeDidHandleEvent(scrollingNode.scrollingNodeID(), wheelEvent, m_allowLatching);
- m_gestureState.nodeDidHandleEvent(scrollingNode.scrollingNodeID(), wheelEvent);
- return result;
- }
+ return result;
+}
- if (result.needsMainThreadProcessing())
- return result;
- }
+WheelEventHandlingResult ScrollingTree::handleWheelEventWithNode(const PlatformWheelEvent& wheelEvent, ScrollingTreeNode* node)
+{
+ while (node) {
+ if (is<ScrollingTreeScrollingNode>(*node)) {
+ auto& scrollingNode = downcast<ScrollingTreeScrollingNode>(*node);
+ auto result = scrollingNode.handleWheelEvent(wheelEvent);
- if (is<ScrollingTreeOverflowScrollProxyNode>(*node)) {
- if (auto relatedNode = nodeForID(downcast<ScrollingTreeOverflowScrollProxyNode>(*node).overflowScrollingNodeID())) {
- node = relatedNode;
- continue;
- }
+ if (result.wasHandled) {
+ m_latchingController.nodeDidHandleEvent(scrollingNode.scrollingNodeID(), wheelEvent, m_allowLatching);
+ m_gestureState.nodeDidHandleEvent(scrollingNode.scrollingNodeID(), wheelEvent);
+ return result;
}
- node = node->parent();
+ if (result.needsMainThreadProcessing())
+ return result;
}
- return WheelEventHandlingResult::unhandled();
- }();
- return result;
+ if (is<ScrollingTreeOverflowScrollProxyNode>(*node)) {
+ if (auto relatedNode = nodeForID(downcast<ScrollingTreeOverflowScrollProxyNode>(*node).overflowScrollingNodeID())) {
+ node = relatedNode;
+ continue;
+ }
+ }
+
+ node = node->parent();
+ }
+ return WheelEventHandlingResult::unhandled();
}
RefPtr<ScrollingTreeNode> ScrollingTree::scrollingNodeForPoint(FloatPoint)
Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h 2020-08-28 21:09:51 UTC (rev 266292)
@@ -212,6 +212,8 @@
WEBCORE_EXPORT void willProcessWheelEvent();
protected:
+ WheelEventHandlingResult handleWheelEventWithNode(const PlatformWheelEvent&, ScrollingTreeNode*);
+
FloatPoint mainFrameScrollPosition() const;
void setMainFrameScrollPosition(FloatPoint);
@@ -234,6 +236,7 @@
#if ENABLE(WHEEL_EVENT_REGIONS)
WEBCORE_EXPORT virtual OptionSet<EventListenerRegionType> eventListenerRegionTypesForPoint(FloatPoint) const;
#endif
+
virtual void receivedWheelEvent(const PlatformWheelEvent&) { }
RefPtr<ScrollingTreeFrameScrollingNode> m_rootNode;
Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp 2020-08-28 21:09:51 UTC (rev 266292)
@@ -61,10 +61,12 @@
return ScrollingTree::handleWheelEvent(wheelEvent);
}
-bool ThreadedScrollingTree::handleWheelEventAfterMainThread(const PlatformWheelEvent& wheelEvent)
+bool ThreadedScrollingTree::handleWheelEventAfterMainThread(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNodeID)
{
SetForScope<bool> disallowLatchingScope(m_allowLatching, false);
- auto result = handleWheelEvent(wheelEvent);
+
+ RefPtr<ScrollingTreeNode> targetNode = nodeForID(targetNodeID);
+ auto result = handleWheelEventWithNode(wheelEvent, targetNode.get());
return result.wasHandled;
}
Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h 2020-08-28 21:09:51 UTC (rev 266292)
@@ -47,7 +47,7 @@
WheelEventHandlingResult handleWheelEvent(const PlatformWheelEvent&) override;
- bool handleWheelEventAfterMainThread(const PlatformWheelEvent&);
+ bool handleWheelEventAfterMainThread(const PlatformWheelEvent&, ScrollingNodeID);
void invalidate() override;
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h 2020-08-28 21:09:51 UTC (rev 266292)
@@ -41,7 +41,7 @@
void commitTreeStateIfNeeded() final;
// Handle the wheel event on the scrolling thread. Returns whether the event was handled or not.
- bool handleWheelEvent(FrameView&, const PlatformWheelEvent&) override;
+ bool handleWheelEvent(FrameView&, const PlatformWheelEvent&, ScrollingNodeID) override;
private:
void scheduleTreeStateCommit() final;
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm 2020-08-28 21:09:51 UTC (rev 266292)
@@ -73,7 +73,7 @@
});
}
-bool ScrollingCoordinatorMac::handleWheelEvent(FrameView&, const PlatformWheelEvent& wheelEvent)
+bool ScrollingCoordinatorMac::handleWheelEvent(FrameView&, const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode)
{
ASSERT(isMainThread());
ASSERT(m_page);
@@ -87,8 +87,8 @@
// which we've already discounted on the main thread. This needs to target a specific node.
RefPtr<ThreadedScrollingTree> threadedScrollingTree = downcast<ThreadedScrollingTree>(scrollingTree());
- ScrollingThread::dispatch([threadedScrollingTree, wheelEvent] {
- threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent);
+ ScrollingThread::dispatch([threadedScrollingTree, wheelEvent, targetNode] {
+ threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent, targetNode);
});
return true;
}
Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp 2020-08-28 21:09:51 UTC (rev 266292)
@@ -69,14 +69,14 @@
m_scrollingStateTreeCommitterTimer.stop();
}
-bool ScrollingCoordinatorNicosia::handleWheelEvent(FrameView&, const PlatformWheelEvent& wheelEvent)
+bool ScrollingCoordinatorNicosia::handleWheelEvent(FrameView&, const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode)
{
ASSERT(isMainThread());
ASSERT(m_page);
ASSERT(scrollingTree());
- ScrollingThread::dispatch([threadedScrollingTree = makeRef(downcast<ThreadedScrollingTree>(*scrollingTree())), wheelEvent] {
- threadedScrollingTree->handleWheelEvent(wheelEvent);
+ ScrollingThread::dispatch([threadedScrollingTree = makeRef(downcast<ThreadedScrollingTree>(*scrollingTree())), wheelEvent, targetNode] {
+ threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent, targetNode);
});
return true;
}
Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h (266291 => 266292)
--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h 2020-08-28 20:21:39 UTC (rev 266291)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h 2020-08-28 21:09:51 UTC (rev 266292)
@@ -44,7 +44,7 @@
void commitTreeStateIfNeeded() override;
- bool handleWheelEvent(FrameView&, const PlatformWheelEvent&) override;
+ bool handleWheelEvent(FrameView&, const PlatformWheelEvent&, ScrollingNodeID) override;
private:
void scheduleTreeStateCommit() override;