WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-219373-20201130145155.patch (text/plain), 27.81 KB, created by
Simon Fraser (smfr)
on 2020-11-30 14:51:56 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2020-11-30 14:51:56 PST
Size:
27.81 KB
patch
obsolete
>Subversion Revision: 270251 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 38dc43480c9f26f8cdd8966935123169ba487c74..5fe4ca21eaeb6b71b51164ad92e6da95d06ab769 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,53 @@ >+2020-11-30 Simon Fraser <simon.fraser@apple.com> >+ >+ Pass OptionSet<EventHandling> to various wheel event handler functions >+ https://bugs.webkit.org/show_bug.cgi?id=219373 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fixing webkit.org/b/218764 will require that code that dispatches wheel events >+ can tell later whether script called preventDefault() on the event, since this >+ will affect whether the rest of the wheel events in a gesture are cancelable. >+ >+ To prepare for this, pass OptionSet<EventHandling> around in event handling >+ code. >+ >+ No behavior change. >+ >+ * dom/Element.cpp: >+ (WebCore::Element::dispatchWheelEvent): >+ * page/EventHandler.cpp: >+ (WebCore::handleWheelEventInAppropriateEnclosingBox): >+ (WebCore::EventHandler::processWheelEventForScrolling): >+ (WebCore::EventHandler::handleWheelEvent): >+ (WebCore::EventHandler::handleWheelEventInternal): >+ (WebCore::EventHandler::defaultWheelEventHandler): >+ * page/EventHandler.h: >+ * page/FrameView.cpp: >+ (WebCore::FrameView::handleWheelEventForScrolling): >+ * page/FrameView.h: >+ * page/mac/EventHandlerMac.mm: >+ (WebCore::EventHandler::wheelEvent): >+ (WebCore::EventHandler::processWheelEventForScrolling): >+ * page/scrolling/ScrollingCoordinator.h: >+ (WebCore::ScrollingCoordinator::handleWheelEventForScrolling): >+ * page/scrolling/ThreadedScrollingTree.cpp: >+ (WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread): >+ * page/scrolling/ThreadedScrollingTree.h: >+ * page/scrolling/mac/ScrollingCoordinatorMac.h: >+ * page/scrolling/mac/ScrollingCoordinatorMac.mm: >+ (WebCore::ScrollingCoordinatorMac::handleWheelEventForScrolling): >+ * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: >+ (WebCore::ScrollingCoordinatorNicosia::handleWheelEventForScrolling): >+ (WebCore::ScrollingCoordinatorNicosia::wheelEventWasProcessedByMainThread): >+ * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h: >+ * platform/ScrollableArea.cpp: >+ (WebCore::ScrollableArea::handleWheelEventForScrolling): >+ * platform/ScrollableArea.h: >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::handleWheelEventForScrolling): >+ * rendering/RenderLayer.h: >+ > 2020-11-30 Simon Fraser <simon.fraser@apple.com> > > Unreviewed build fix. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index f2074705309ee6e424d1ce11385af8651f1b7d5b..ed3eaeef85613853200e0e580560ca6f6df0266b 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,13 @@ >+2020-11-30 Simon Fraser <simon.fraser@apple.com> >+ >+ Pass OptionSet<EventHandling> to various wheel event handler functions >+ https://bugs.webkit.org/show_bug.cgi?id=219373 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/Plugins/PDF/PDFPlugin.mm: >+ (WebKit::PDFPlugin::handleWheelEvent): >+ > 2020-11-30 Antti Koivisto <antti@apple.com> > > Remove throttling code from NetworkLoad >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index d61c7f695412a55b164630f7edce9ccf3b51871e..0b4c9d8dcbe9607a2fdff0d228a04bb946d7502a 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -437,7 +437,7 @@ bool Element::dispatchWheelEvent(const PlatformWheelEvent& platformEvent, Option > > dispatchEvent(event); > >- LOG_WITH_STREAM(Scrolling, stream << "Element " << *this << " dispatchWheelEvent: defaultPrevented " << event->defaultPrevented() << " defaultHandled " << event->defaultHandled()); >+ LOG_WITH_STREAM(Scrolling, stream << "Element " << *this << " dispatchWheelEvent: (cancelable " << event->cancelable() << ") defaultPrevented " << event->defaultPrevented() << " defaultHandled " << event->defaultHandled()); > > if (event->defaultPrevented()) > processing.add(EventHandling::DefaultPrevented); >diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp >index 65eb209d4d37a63adae29305d2ff47a0e25db15d..51adb00bfac5a0dee49d6d325f38f9d330c63573 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -315,7 +315,7 @@ static bool didScrollInScrollableArea(ScrollableArea& scrollableArea, const Whee > return didHandleWheelEvent; > } > >-static bool handleWheelEventInAppropriateEnclosingBox(Node* startNode, const WheelEvent& wheelEvent, const FloatSize& filteredPlatformDelta, const FloatSize& filteredVelocity) >+static bool handleWheelEventInAppropriateEnclosingBox(Node* startNode, const WheelEvent& wheelEvent, const FloatSize& filteredPlatformDelta, const FloatSize& filteredVelocity, OptionSet<EventHandling> eventHandling) > { > bool shouldHandleEvent = wheelEvent.deltaX() || wheelEvent.deltaY(); > #if ENABLE(WHEEL_EVENT_LATCHING) >@@ -346,7 +346,7 @@ static bool handleWheelEventInAppropriateEnclosingBox(Node* startNode, const Whe > bool scrollingWasHandled; > if (platformEvent) { > auto copiedEvent = platformEvent->copyWithDeltasAndVelocity(filteredPlatformDelta.width(), filteredPlatformDelta.height(), filteredVelocity); >- scrollingWasHandled = boxLayer->handleWheelEventForScrolling(copiedEvent); >+ scrollingWasHandled = boxLayer->handleWheelEventForScrolling(copiedEvent, eventHandling); > } else > scrollingWasHandled = didScrollInScrollableArea(*boxLayer, wheelEvent); > >@@ -2780,14 +2780,14 @@ void EventHandler::recordWheelEventForDeltaFilter(const PlatformWheelEvent& even > page->wheelEventDeltaFilter()->updateFromDelta(FloatSize(event.deltaX(), event.deltaY())); > } > >-bool EventHandler::processWheelEventForScrolling(const PlatformWheelEvent& event, const WeakPtr<ScrollableArea>&) >+bool EventHandler::processWheelEventForScrolling(const PlatformWheelEvent& event, const WeakPtr<ScrollableArea>&, OptionSet<EventHandling> eventHandling) > { > Ref<Frame> protectedFrame(m_frame); > > // We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed. > FrameView* view = m_frame.view(); > >- bool didHandleEvent = view ? view->handleWheelEventForScrolling(event) : false; >+ bool didHandleEvent = view ? view->handleWheelEventForScrolling(event, eventHandling) : false; > m_isHandlingWheelEvent = false; > return didHandleEvent; > } >@@ -2869,6 +2869,7 @@ bool EventHandler::handleWheelEvent(const PlatformWheelEvent& event, OptionSet<W > { > OptionSet<EventHandling> handling; > bool handled = handleWheelEventInternal(event, processingSteps, handling); >+ // wheelEventWasProcessedByMainThread() may have already been called via performDefaultWheelEventHandling(), but this ensures that it's always called if that code path doesn't run. > wheelEventWasProcessedByMainThread(event, handling); > return handled; > } >@@ -2965,7 +2966,7 @@ bool EventHandler::handleWheelEventInternal(const PlatformWheelEvent& event, Opt > #endif > if (allowScrolling) { > // FIXME: processWheelEventForScrolling() is only called for FrameView scrolling, not overflow scrolling, which is confusing. >- handledEvent = processWheelEventForScrolling(event, scrollableArea); >+ handledEvent = processWheelEventForScrolling(event, scrollableArea, handling); > processWheelEventForScrollSnap(event, scrollableArea); > } > >@@ -3007,6 +3008,10 @@ void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent& wheelEv > filteredPlatformDelta.setHeight(platformWheelEvent->deltaY()); > } > >+ OptionSet<EventHandling> eventHandling = { EventHandling::DispatchedToDOM }; >+ if (wheelEvent.defaultPrevented()) >+ eventHandling.add(EventHandling::DefaultPrevented); >+ > #if ENABLE(WHEEL_EVENT_LATCHING) > if (m_frame.page()->wheelEventDeltaFilter()->isFilteringDeltas()) { > filteredPlatformDelta = m_frame.page()->wheelEventDeltaFilter()->filteredDelta(); >@@ -3026,14 +3031,14 @@ void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent& wheelEv > auto platformEvent = wheelEvent.underlyingPlatformEvent(); > if (platformEvent) { > auto copiedEvent = platformEvent->copyWithDeltasAndVelocity(filteredPlatformDelta.width(), filteredPlatformDelta.height(), filteredVelocity); >- if (latchedScroller->handleWheelEventForScrolling(copiedEvent)) >+ if (latchedScroller->handleWheelEventForScrolling(copiedEvent, eventHandling)) > wheelEvent.setDefaultHandled(); > return; > } > } > #endif > >- if (handleWheelEventInAppropriateEnclosingBox(startNode, wheelEvent, filteredPlatformDelta, filteredVelocity)) >+ if (handleWheelEventInAppropriateEnclosingBox(startNode, wheelEvent, filteredPlatformDelta, filteredVelocity, eventHandling)) > wheelEvent.setDefaultHandled(); > } > >diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h >index 90c787b67e2f3dc29d4588eebf587fa9351de9d9..9bceb4ed390b884a25c88a9ff69622e8e945b91a 100644 >--- a/Source/WebCore/page/EventHandler.h >+++ b/Source/WebCore/page/EventHandler.h >@@ -459,7 +459,7 @@ private: > bool passWheelEventToWidget(const PlatformWheelEvent&, Widget&, OptionSet<WheelEventProcessingSteps>); > void determineWheelEventTarget(const PlatformWheelEvent&, RefPtr<Element>& eventTarget, WeakPtr<ScrollableArea>&, bool& isOverWidget); > void recordWheelEventForDeltaFilter(const PlatformWheelEvent&); >- bool processWheelEventForScrolling(const PlatformWheelEvent&, const WeakPtr<ScrollableArea>&); >+ bool processWheelEventForScrolling(const PlatformWheelEvent&, const WeakPtr<ScrollableArea>&, OptionSet<EventHandling>); > void processWheelEventForScrollSnap(const PlatformWheelEvent&, const WeakPtr<ScrollableArea>&); > bool completeWidgetWheelEvent(const PlatformWheelEvent&, const WeakPtr<Widget>&, const WeakPtr<ScrollableArea>&); > >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index 3058d91de65a9cc38d5906790ad32a7c678182fb..74f30eab70c14c355529a77c1fcdc1830a13c6a5 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -5098,7 +5098,7 @@ void FrameView::removeChild(Widget& widget) > ScrollView::removeChild(widget); > } > >-bool FrameView::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent) >+bool FrameView::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, OptionSet<EventHandling> eventHandling) > { > // Note that to allow for rubber-band over-scroll behavior, even non-scrollable views > // should handle wheel events. >@@ -5128,11 +5128,11 @@ bool FrameView::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEven > #if ENABLE(ASYNC_SCROLLING) > if (auto scrollingCoordinator = this->scrollingCoordinator()) { > if (scrollingCoordinator->coordinatesScrollingForFrameView(*this)) >- return scrollingCoordinator->handleWheelEventForScrolling(wheelEvent, scrollingNodeID()); >+ return scrollingCoordinator->handleWheelEventForScrolling(wheelEvent, scrollingNodeID(), eventHandling); > } > #endif > >- return ScrollableArea::handleWheelEventForScrolling(wheelEvent); >+ return ScrollableArea::handleWheelEventForScrolling(wheelEvent, eventHandling); > } > > bool FrameView::isVerticalDocument() const >diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h >index b22fa6cb82fbbe200a1c742ad02f53fddc5cdc00..ca008f8110166451fc1e2c0c715bc7375b6439fb 100644 >--- a/Source/WebCore/page/FrameView.h >+++ b/Source/WebCore/page/FrameView.h >@@ -565,7 +565,7 @@ public: > // This function exists for ports that need to handle wheel events manually. > // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but on most other platforms > // we need this function in order to do the scroll ourselves. >- bool handleWheelEventForScrolling(const PlatformWheelEvent&) final; >+ bool handleWheelEventForScrolling(const PlatformWheelEvent&, OptionSet<EventHandling>) final; > > WEBCORE_EXPORT void setScrollingPerformanceLoggingEnabled(bool); > >diff --git a/Source/WebCore/page/mac/EventHandlerMac.mm b/Source/WebCore/page/mac/EventHandlerMac.mm >index afd76d256ed0cf47e3eab3498e4176db697250e4..a7cab237f225a0197740bcbfc2bafe363785d2d6 100644 >--- a/Source/WebCore/page/mac/EventHandlerMac.mm >+++ b/Source/WebCore/page/mac/EventHandlerMac.mm >@@ -147,7 +147,9 @@ bool EventHandler::wheelEvent(NSEvent *event) > return false; > > CurrentEventScope scope(event, nil); >- return handleWheelEvent(PlatformEventFactory::createPlatformWheelEvent(event, page->chrome().platformPageClient()), { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForBlockingDOMEventDispatch }); >+ auto wheelEvent = PlatformEventFactory::createPlatformWheelEvent(event, page->chrome().platformPageClient()); >+ OptionSet<WheelEventProcessingSteps> processingSteps = { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForBlockingDOMEventDispatch }; >+ return handleWheelEvent(wheelEvent, processingSteps); > } > > bool EventHandler::keyEvent(NSEvent *event) >@@ -904,7 +906,7 @@ void EventHandler::recordWheelEventForDeltaFilter(const PlatformWheelEvent& whee > page->wheelEventDeltaFilter()->updateFromDelta(FloatSize(wheelEvent.deltaX(), wheelEvent.deltaY())); > } > >-bool EventHandler::processWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, const WeakPtr<ScrollableArea>& scrollableArea) >+bool EventHandler::processWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, const WeakPtr<ScrollableArea>& scrollableArea, OptionSet<EventHandling> eventHandling) > { > LOG_WITH_STREAM(ScrollLatching, stream << "EventHandler::processWheelEventForScrolling " << wheelEvent << " - scrollableArea " << ValueOrNull(scrollableArea.get()) << " use latched element " << wheelEvent.useLatchedEventElement()); > >@@ -939,7 +941,7 @@ bool EventHandler::processWheelEventForScrolling(const PlatformWheelEvent& wheel > > LOG_WITH_STREAM(ScrollLatching, stream << " sending to view " << *view); > >- bool didHandleWheelEvent = view->handleWheelEventForScrolling(wheelEvent); >+ bool didHandleWheelEvent = view->handleWheelEventForScrolling(wheelEvent, eventHandling); > // If the platform widget is handling the event, we always want to return false. > if (view->platformWidget()) > didHandleWheelEvent = false; >@@ -948,7 +950,7 @@ bool EventHandler::processWheelEventForScrolling(const PlatformWheelEvent& wheel > return didHandleWheelEvent; > } > >- bool didHandleEvent = view->handleWheelEventForScrolling(wheelEvent); >+ bool didHandleEvent = view->handleWheelEventForScrolling(wheelEvent, eventHandling); > m_isHandlingWheelEvent = false; > return didHandleEvent; > } >diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.h b/Source/WebCore/page/scrolling/ScrollingCoordinator.h >index a500e82a9bf3a6e42f1763693e042bb09210641f..e85628304b972ccfc07bb0a4d6ef21e5bca769a5 100644 >--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.h >+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.h >@@ -127,7 +127,7 @@ public: > // 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 handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID) { return false; } >+ virtual bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID, OptionSet<EventHandling>) { return false; } > virtual void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>) { } > > // Create an unparented node. >diff --git a/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp b/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp >index 29f0d24a32e9e92203cf0479c834e9a7cfc648f5..f94b2e449d88568ba549864b1f03c38eafd9f6b0 100644 >--- a/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp >+++ b/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp >@@ -64,7 +64,7 @@ WheelEventHandlingResult ThreadedScrollingTree::handleWheelEvent(const PlatformW > return ScrollingTree::handleWheelEvent(wheelEvent, processingSteps); > } > >-bool ThreadedScrollingTree::handleWheelEventAfterMainThread(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNodeID) >+bool ThreadedScrollingTree::handleWheelEventAfterMainThread(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNodeID, OptionSet<EventHandling>) > { > LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::handleWheelEventAfterMainThread " << wheelEvent << " node " << targetNodeID); > >diff --git a/Source/WebCore/page/scrolling/ThreadedScrollingTree.h b/Source/WebCore/page/scrolling/ThreadedScrollingTree.h >index 5f0a755442fb4a1b0296b4d5b5c041104c3f4eaf..5a70ca5eb6d26df2c51982d97e624335405bd9a8 100644 >--- a/Source/WebCore/page/scrolling/ThreadedScrollingTree.h >+++ b/Source/WebCore/page/scrolling/ThreadedScrollingTree.h >@@ -47,7 +47,7 @@ public: > > WheelEventHandlingResult handleWheelEvent(const PlatformWheelEvent&, OptionSet<WheelEventProcessingSteps>) override; > >- bool handleWheelEventAfterMainThread(const PlatformWheelEvent&, ScrollingNodeID); >+ bool handleWheelEventAfterMainThread(const PlatformWheelEvent&, ScrollingNodeID, OptionSet<EventHandling>); > void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>); > > void invalidate() override; >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h b/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h >index ae6f4e4e4d4e3c33052be9b92948bd71fbff53f0..21feda91bbe3e35ead30d6b45c6752cf1a1fab04 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h >+++ b/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h >@@ -41,7 +41,7 @@ public: > void commitTreeStateIfNeeded() final; > > // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not. >- bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID) final; >+ bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID, OptionSet<EventHandling>) final; > void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>) final; > > private: >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm >index 476f4e6baa8bcd67016f1e72bb8cd4f8a45e0a12..22001ed4763dfc05918506182415436fb4cbc91c 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm >@@ -73,7 +73,7 @@ void ScrollingCoordinatorMac::pageDestroyed() > }); > } > >-bool ScrollingCoordinatorMac::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNodeID) >+bool ScrollingCoordinatorMac::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNodeID, OptionSet<EventHandling> eventHandling) > { > ASSERT(isMainThread()); > ASSERT(m_page); >@@ -84,8 +84,8 @@ bool ScrollingCoordinatorMac::handleWheelEventForScrolling(const PlatformWheelEv > LOG_WITH_STREAM(Scrolling, stream << "ScrollingCoordinatorMac::handleWheelEventForScrolling - sending event to scrolling thread, node " << targetNodeID); > > RefPtr<ThreadedScrollingTree> threadedScrollingTree = downcast<ThreadedScrollingTree>(scrollingTree()); >- ScrollingThread::dispatch([threadedScrollingTree, wheelEvent, targetNodeID] { >- threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent, targetNodeID); >+ ScrollingThread::dispatch([threadedScrollingTree, wheelEvent, targetNodeID, eventHandling] { >+ threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent, targetNodeID, eventHandling); > }); > return true; > } >diff --git a/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp b/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp >index b8115e83cc78e4f7d93bb29c90426cd9f7e31e83..015dc341482763f112f2dbbbd5365c9c567ee6b8 100644 >--- a/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp >+++ b/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp >@@ -69,7 +69,7 @@ void ScrollingCoordinatorNicosia::commitTreeStateIfNeeded() > m_scrollingStateTreeCommitterTimer.stop(); > } > >-bool ScrollingCoordinatorNicosia::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode) >+bool ScrollingCoordinatorNicosia::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode, OptionSet<EventHandling>) > { > ASSERT(isMainThread()); > ASSERT(m_page); >@@ -81,10 +81,10 @@ bool ScrollingCoordinatorNicosia::handleWheelEventForScrolling(const PlatformWhe > return true; > } > >-void ScrollingCoordinatorNicosia::wheelEventWasProcessedByMainThread(const PlatformWheelEvent& wheelEvent, OptionSet<EventHandling> defaultHandling) >+void ScrollingCoordinatorNicosia::wheelEventWasProcessedByMainThread(const PlatformWheelEvent& wheelEvent, OptionSet<EventHandling> eventHandling) > { >- ScrollingThread::dispatch([threadedScrollingTree = makeRef(downcast<ThreadedScrollingTree>(*scrollingTree())), wheelEvent, defaultHandling] { >- threadedScrollingTree->wheelEventWasProcessedByMainThread(wheelEvent, defaultHandling); >+ ScrollingThread::dispatch([threadedScrollingTree = makeRef(downcast<ThreadedScrollingTree>(*scrollingTree())), wheelEvent, eventHandling] { >+ threadedScrollingTree->wheelEventWasProcessedByMainThread(wheelEvent, eventHandling); > }); > } > >diff --git a/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h b/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h >index 4fa174e55ea236ddad8a7c3b40a06fd6a1375ef6..a39a6044206d21e964e226beaf32b65d817b84e5 100644 >--- a/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h >+++ b/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h >@@ -44,7 +44,7 @@ public: > > void commitTreeStateIfNeeded() override; > >- bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID) override; >+ bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID, OptionSet<EventHandling>) override; > void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>) override; > > private: >diff --git a/Source/WebCore/platform/ScrollableArea.cpp b/Source/WebCore/platform/ScrollableArea.cpp >index ad47329ae0e54cb4cd130839a2fd82f32bd685f6..80166a5222845a734e906a3f3c9bacc96858171c 100644 >--- a/Source/WebCore/platform/ScrollableArea.cpp >+++ b/Source/WebCore/platform/ScrollableArea.cpp >@@ -203,7 +203,7 @@ void ScrollableArea::scrollPositionChanged(const ScrollPosition& position) > scrollAnimator().notifyContentAreaScrolled(scrollPosition() - oldPosition); > } > >-bool ScrollableArea::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent) >+bool ScrollableArea::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, OptionSet<EventHandling>) > { > if (!isScrollableOrRubberbandable()) > return false; >diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h >index 4383b76caf70748601da850a71478d43501011d3..5a738b886d0f230028ebe496e7e0031c94046954 100644 >--- a/Source/WebCore/platform/ScrollableArea.h >+++ b/Source/WebCore/platform/ScrollableArea.h >@@ -48,6 +48,8 @@ class ScrollAnimator; > class GraphicsLayer; > class TiledBacking; > >+enum class EventHandling : uint8_t; >+ > inline int offsetForOrientation(ScrollOffset offset, ScrollbarOrientation orientation) > { > switch (orientation) { >@@ -82,7 +84,7 @@ public: > // expect it to happen sometime in the future. > virtual bool requestScrollPositionUpdate(const ScrollPosition&, ScrollType = ScrollType::User, ScrollClamping = ScrollClamping::Clamped) { return false; } > >- WEBCORE_EXPORT virtual bool handleWheelEventForScrolling(const PlatformWheelEvent&); >+ WEBCORE_EXPORT virtual bool handleWheelEventForScrolling(const PlatformWheelEvent&, OptionSet<EventHandling>); > > bool usesScrollSnap() const; > >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 5243ea1c1b04311f2cb422ee21cec27fb3d5fde8..8ed532e87d9d681d2c4ec90b1813ec28084ac321 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -3165,7 +3165,7 @@ ScrollingNodeID RenderLayer::scrollingNodeID() const > return backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling); > } > >-bool RenderLayer::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent) >+bool RenderLayer::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, OptionSet<EventHandling> eventHandling) > { > if (!isScrollableOrRubberbandable()) > return false; >@@ -3173,11 +3173,11 @@ bool RenderLayer::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEv > #if ENABLE(ASYNC_SCROLLING) > if (usesAsyncScrolling() && scrollingNodeID()) { > if (auto* scrollingCoordinator = page().scrollingCoordinator()) >- return scrollingCoordinator->handleWheelEventForScrolling(wheelEvent, scrollingNodeID()); >+ return scrollingCoordinator->handleWheelEventForScrolling(wheelEvent, scrollingNodeID(), eventHandling); > } > #endif > >- return ScrollableArea::handleWheelEventForScrolling(wheelEvent); >+ return ScrollableArea::handleWheelEventForScrolling(wheelEvent, eventHandling); > } > > IntRect RenderLayer::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index a15d51bfff5c3dc89e4d017b59b1cfcf9f376510..aaed152e1bd127187ddfb599ac1ce8277a0e5a85 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -493,7 +493,7 @@ public: > Scrollbar* verticalScrollbar() const final { return m_vBar.get(); } > ScrollableArea* enclosingScrollableArea() const final; > >- bool handleWheelEventForScrolling(const PlatformWheelEvent&) final; >+ bool handleWheelEventForScrolling(const PlatformWheelEvent&, OptionSet<EventHandling>) final; > bool isScrollableOrRubberbandable() final; > bool hasScrollableOrRubberbandableAncestor() final; > bool useDarkAppearance() const final; >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >index 6884897b2f37e8cab633840e6b9da109b839be60..b836a17020b37803b5252f8f1e903e6424a0b8a8 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >@@ -2938,7 +2938,7 @@ bool PDFPlugin::handleWheelEvent(const WebWheelEvent& event) > PDFDisplayMode displayMode = [m_pdfLayerController displayMode]; > > if (displayMode == kPDFDisplaySinglePageContinuous || displayMode == kPDFDisplayTwoUpContinuous) >- return ScrollableArea::handleWheelEventForScrolling(platform(event)); >+ return ScrollableArea::handleWheelEventForScrolling(platform(event), { }); > > NSUInteger currentPageIndex = [m_pdfLayerController currentPageIndex]; > bool inFirstPage = !currentPageIndex; >@@ -2971,7 +2971,7 @@ bool PDFPlugin::handleWheelEvent(const WebWheelEvent& event) > return true; > } > >- return ScrollableArea::handleWheelEventForScrolling(platform(event)); >+ return ScrollableArea::handleWheelEventForScrolling(platform(event), { }); > } > > NSData *PDFPlugin::liveData() const
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:
thorton
:
review+
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 219373
:
415062
|
415067