<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[270125] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/270125">270125</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2020-11-20 11:37:33 -0800 (Fri, 20 Nov 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename some wheel-event handling functions for clarity
https://bugs.webkit.org/show_bug.cgi?id=219211

Reviewed by Tim Horton.
Source/WebCore:

There are too many functions called wheelEvent() or handleWheelEvent(), making it hard
to know which phase of handling they apply to. So rename some to handleWheelEventForScrolling(),
which applies to the "default handling" phase after DOM event dispatch.

In addition, make ScrollableArea's handleWheelEventForScrolling() virtual and have FrameView
override it (a future patch will also add an override in RenderLayer).

Rename ScrollingCoordinator::performDefaultWheelEventHandling() to use handleWheelEventForScrolling()
for clarity.

* page/EventHandler.cpp:
(WebCore::handleWheelEventInAppropriateEnclosingBox):
(WebCore::EventHandler::processWheelEventForScrolling):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::handleWheelEventForScrolling):
(WebCore::FrameView::wheelEvent): Deleted.
* page/FrameView.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::determineWheelEventTarget):
(WebCore::EventHandler::processWheelEventForScrolling):
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::handleWheelEventForScrolling):
(WebCore::ScrollingCoordinator::performDefaultWheelEventHandling): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::scrollTo):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::handleWheelEventForScrolling):
(WebCore::ScrollingCoordinatorMac::performDefaultWheelEventHandling): Deleted.
* page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
(WebCore::ScrollingCoordinatorNicosia::handleWheelEventForScrolling):
(WebCore::ScrollingCoordinatorNicosia::performDefaultWheelEventHandling): Deleted.
* page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::handleWheelEventForScrolling):
(WebCore::ScrollableArea::handleWheelEvent): Deleted.
* platform/ScrollableArea.h:

Source/WebKit:

There are too many functions called wheelEvent() or handleWheelEvent(), making it hard
to know which phase of handling they apply to. So rename some to handleWheelEventForScrolling(),
which applies to the "default handling" phase after DOM event dispatch.

In addition, make ScrollableArea's handleWheelEventForScrolling() virtual and have FrameView
override it (a future patch will also add an override in RenderLayer).

Rename ScrollingCoordinator::performDefaultWheelEventHandling() to use handleWheelEventForScrolling()
for clarity.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleWheelEvent):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorepagemacEventHandlerMacmm">trunk/Source/WebCore/page/mac/EventHandlerMac.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorh">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreeScrollingNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingCoordinatorMach">trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingCoordinatorNicosiacpp">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingCoordinatorNicosiah">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreacpp">trunk/Source/WebCore/platform/ScrollableArea.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreah">trunk/Source/WebCore/platform/ScrollableArea.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebProcessPluginsPDFPDFPluginmm">trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/ChangeLog      2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2020-11-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Rename some wheel-event handling functions for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=219211
+
+        Reviewed by Tim Horton.
+
+        There are too many functions called wheelEvent() or handleWheelEvent(), making it hard
+        to know which phase of handling they apply to. So rename some to handleWheelEventForScrolling(),
+        which applies to the "default handling" phase after DOM event dispatch.
+        
+        In addition, make ScrollableArea's handleWheelEventForScrolling() virtual and have FrameView
+        override it (a future patch will also add an override in RenderLayer).
+        
+        Rename ScrollingCoordinator::performDefaultWheelEventHandling() to use handleWheelEventForScrolling()
+        for clarity.
+
+        * page/EventHandler.cpp:
+        (WebCore::handleWheelEventInAppropriateEnclosingBox):
+        (WebCore::EventHandler::processWheelEventForScrolling):
+        (WebCore::EventHandler::defaultWheelEventHandler):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::handleWheelEventForScrolling):
+        (WebCore::FrameView::wheelEvent): Deleted.
+        * page/FrameView.h:
+        * page/mac/EventHandlerMac.mm:
+        (WebCore::EventHandler::determineWheelEventTarget):
+        (WebCore::EventHandler::processWheelEventForScrolling):
+        * page/scrolling/ScrollingCoordinator.h:
+        (WebCore::ScrollingCoordinator::handleWheelEventForScrolling):
+        (WebCore::ScrollingCoordinator::performDefaultWheelEventHandling): Deleted.
+        * page/scrolling/ScrollingTreeScrollingNode.cpp:
+        (WebCore::ScrollingTreeScrollingNode::scrollTo):
+        * page/scrolling/mac/ScrollingCoordinatorMac.h:
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::handleWheelEventForScrolling):
+        (WebCore::ScrollingCoordinatorMac::performDefaultWheelEventHandling): Deleted.
+        * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
+        (WebCore::ScrollingCoordinatorNicosia::handleWheelEventForScrolling):
+        (WebCore::ScrollingCoordinatorNicosia::performDefaultWheelEventHandling): Deleted.
+        * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::handleWheelEventForScrolling):
+        (WebCore::ScrollableArea::handleWheelEvent): Deleted.
+        * platform/ScrollableArea.h:
+
</ins><span class="cx"> 2020-11-20  Zalan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [LFC][Integration] Enable inline-block
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp       2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/EventHandler.cpp  2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">             bool scrollingWasHandled;
</span><span class="cx">             if (platformEvent) {
</span><span class="cx">                 auto copiedEvent = platformEvent->copyWithDeltasAndVelocity(filteredPlatformDelta.width(), filteredPlatformDelta.height(), filteredVelocity);
</span><del>-                scrollingWasHandled = boxLayer->handleWheelEvent(copiedEvent);
</del><ins>+                scrollingWasHandled = boxLayer->handleWheelEventForScrolling(copiedEvent);
</ins><span class="cx">             } else
</span><span class="cx">                 scrollingWasHandled = didScrollInScrollableArea(*boxLayer, wheelEvent);
</span><span class="cx"> 
</span><span class="lines">@@ -2787,7 +2787,7 @@
</span><span class="cx">     // We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed.
</span><span class="cx">     FrameView* view = m_frame.view();
</span><span class="cx">     
</span><del>-    bool didHandleEvent = view ? view->wheelEvent(event) : false;
</del><ins>+    bool didHandleEvent = view ? view->handleWheelEventForScrolling(event) : false;
</ins><span class="cx">     m_isHandlingWheelEvent = false;
</span><span class="cx">     return didHandleEvent;
</span><span class="cx"> }
</span><span class="lines">@@ -3025,7 +3025,7 @@
</span><span class="cx">         auto platformEvent = wheelEvent.underlyingPlatformEvent();
</span><span class="cx">         if (platformEvent) {
</span><span class="cx">             auto copiedEvent = platformEvent->copyWithDeltasAndVelocity(filteredPlatformDelta.width(), filteredPlatformDelta.height(), filteredVelocity);
</span><del>-            if (latchedScroller->handleWheelEvent(copiedEvent))
</del><ins>+            if (latchedScroller->handleWheelEventForScrolling(copiedEvent))
</ins><span class="cx">                 wheelEvent.setDefaultHandled();
</span><span class="cx">             return;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp  2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/FrameView.cpp     2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -5098,7 +5098,7 @@
</span><span class="cx">     ScrollView::removeChild(widget);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent)
</del><ins>+bool FrameView::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent)
</ins><span class="cx"> {
</span><span class="cx">     // Note that to allow for rubber-band over-scroll behavior, even non-scrollable views
</span><span class="cx">     // should handle wheel events.
</span><span class="lines">@@ -5128,11 +5128,11 @@
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">     if (auto scrollingCoordinator = this->scrollingCoordinator()) {
</span><span class="cx">         if (scrollingCoordinator->coordinatesScrollingForFrameView(*this))
</span><del>-            return scrollingCoordinator->performDefaultWheelEventHandling(wheelEvent, scrollingNodeID());
</del><ins>+            return scrollingCoordinator->handleWheelEventForScrolling(wheelEvent, scrollingNodeID());
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return ScrollableArea::handleWheelEvent(wheelEvent);
</del><ins>+    return ScrollableArea::handleWheelEventForScrolling(wheelEvent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool FrameView::isVerticalDocument() const
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h    2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/FrameView.h       2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -565,7 +565,7 @@
</span><span class="cx">     // This function exists for ports that need to handle wheel events manually.
</span><span class="cx">     // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but on most other platforms
</span><span class="cx">     // we need this function in order to do the scroll ourselves.
</span><del>-    bool wheelEvent(const PlatformWheelEvent&);
</del><ins>+    bool handleWheelEventForScrolling(const PlatformWheelEvent&) final;
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void setScrollingPerformanceLoggingEnabled(bool);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacEventHandlerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm    2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -871,7 +871,7 @@
</span><span class="cx">             scrollableArea = makeWeakPtr(static_cast<ScrollableArea&>(*view));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LOG_WITH_STREAM(ScrollLatching, stream << "EventHandler::determineWheelEventTarget() - event" << wheelEvent << " found scrollableArea " << ValueOrNull(scrollableArea.get()) << ", latching state is " << page->scrollLatchingController());
</del><ins>+    LOG_WITH_STREAM(ScrollLatching, stream << "EventHandler::determineWheelEventTarget() - event " << wheelEvent << " found scrollableArea " << ValueOrNull(scrollableArea.get()) << ", latching state is " << page->scrollLatchingController());
</ins><span class="cx"> 
</span><span class="cx">     if (scrollableArea && page->isMonitoringWheelEvents())
</span><span class="cx">         scrollableArea->scrollAnimator().setWheelEventTestMonitor(page->wheelEventTestMonitor());
</span><span class="lines">@@ -939,7 +939,7 @@
</span><span class="cx"> 
</span><span class="cx">         LOG_WITH_STREAM(ScrollLatching, stream << " sending to view " << *view);
</span><span class="cx"> 
</span><del>-        bool didHandleWheelEvent = view->wheelEvent(wheelEvent);
</del><ins>+        bool didHandleWheelEvent = view->handleWheelEventForScrolling(wheelEvent);
</ins><span class="cx">         // If the platform widget is handling the event, we always want to return false.
</span><span class="cx">         if (view->platformWidget())
</span><span class="cx">             didHandleWheelEvent = false;
</span><span class="lines">@@ -948,7 +948,7 @@
</span><span class="cx">         return didHandleWheelEvent;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    bool didHandleEvent = view->wheelEvent(wheelEvent);
</del><ins>+    bool didHandleEvent = view->handleWheelEventForScrolling(wheelEvent);
</ins><span class="cx">     m_isHandlingWheelEvent = false;
</span><span class="cx">     return didHandleEvent;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h       2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h  2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx">     // These virtual functions are currently unique to the threaded scrolling architecture. 
</span><span class="cx">     virtual void commitTreeStateIfNeeded() { }
</span><span class="cx">     virtual bool requestScrollPositionUpdate(ScrollableArea&, const IntPoint&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped) { return false; }
</span><del>-    virtual bool performDefaultWheelEventHandling(const PlatformWheelEvent&, ScrollingNodeID) { return false; }
</del><ins>+    virtual bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID) { return false; }
</ins><span class="cx">     virtual void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>) { }
</span><span class="cx"> 
</span><span class="cx">     // Create an unparented node.
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreeScrollingNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp       2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp  2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx">     m_currentScrollPosition = adjustedScrollPosition(position, clamp);
</span><span class="cx">     
</span><span class="cx">     LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeScrollingNode " << scrollingNodeID() << " scrollTo " << position << " adjusted to "
</span><del>-        << m_currentScrollPosition << " (" << scrollType << ") (delta from last committed position " << (m_lastCommittedScrollPosition - m_currentScrollPosition) << ")"
</del><ins>+        << m_currentScrollPosition << " (" << scrollType << ", " << clamp << ") (delta from last committed position " << (m_lastCommittedScrollPosition - m_currentScrollPosition) << ")"
</ins><span class="cx">         << " rubberbanding " << scrollingTree().isRubberBandInProgressForNode(scrollingNodeID()));
</span><span class="cx"> 
</span><span class="cx">     updateViewportForCurrentScrollPosition();
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingCoordinatorMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h        2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h   2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     void commitTreeStateIfNeeded() final;
</span><span class="cx"> 
</span><span class="cx">     // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not.
</span><del>-    bool performDefaultWheelEventHandling(const PlatformWheelEvent&, ScrollingNodeID) final;
</del><ins>+    bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID) final;
</ins><span class="cx">     void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>) final;
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm       2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm  2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ScrollingCoordinatorMac::performDefaultWheelEventHandling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode)
</del><ins>+bool ScrollingCoordinatorMac::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNodeID)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     ASSERT(m_page);
</span><span class="lines">@@ -81,11 +81,11 @@
</span><span class="cx">     if (scrollingTree()->willWheelEventStartSwipeGesture(wheelEvent))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    LOG_WITH_STREAM(Scrolling, stream << "ScrollingCoordinatorMac::handleWheelEvent - sending event to scrolling thread");
</del><ins>+    LOG_WITH_STREAM(Scrolling, stream << "ScrollingCoordinatorMac::handleWheelEventForScrolling - sending event to scrolling thread, node " << targetNodeID);
</ins><span class="cx">     
</span><span class="cx">     RefPtr<ThreadedScrollingTree> threadedScrollingTree = downcast<ThreadedScrollingTree>(scrollingTree());
</span><del>-    ScrollingThread::dispatch([threadedScrollingTree, wheelEvent, targetNode] {
-        threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent, targetNode);
</del><ins>+    ScrollingThread::dispatch([threadedScrollingTree, wheelEvent, targetNodeID] {
+        threadedScrollingTree->handleWheelEventAfterMainThread(wheelEvent, targetNodeID);
</ins><span class="cx">     });
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingCoordinatorNicosiacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp      2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp 2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">     m_scrollingStateTreeCommitterTimer.stop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ScrollingCoordinatorNicosia::performDefaultWheelEventHandling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode)
</del><ins>+bool ScrollingCoordinatorNicosia::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent, ScrollingNodeID targetNode)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     ASSERT(m_page);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingCoordinatorNicosiah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h        2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h   2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx">     void commitTreeStateIfNeeded() override;
</span><span class="cx"> 
</span><del>-    bool performDefaultWheelEventHandling(const PlatformWheelEvent&, ScrollingNodeID) override;
</del><ins>+    bool handleWheelEventForScrolling(const PlatformWheelEvent&, ScrollingNodeID) override;
</ins><span class="cx">     void wheelEventWasProcessedByMainThread(const PlatformWheelEvent&, OptionSet<EventHandling>) override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.cpp 2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp    2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">         scrollAnimator().notifyContentAreaScrolled(scrollPosition() - oldPosition);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
</del><ins>+bool ScrollableArea::handleWheelEventForScrolling(const PlatformWheelEvent& wheelEvent)
</ins><span class="cx"> {
</span><span class="cx">     if (!isScrollableOrRubberbandable())
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h   2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebCore/platform/ScrollableArea.h      2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">     // expect it to happen sometime in the future.
</span><span class="cx">     virtual bool requestScrollPositionUpdate(const ScrollPosition&, ScrollType = ScrollType::User, ScrollClamping = ScrollClamping::Clamped) { return false; }
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT bool handleWheelEvent(const PlatformWheelEvent&);
</del><ins>+    WEBCORE_EXPORT virtual bool handleWheelEventForScrolling(const PlatformWheelEvent&);
</ins><span class="cx"> 
</span><span class="cx">     bool usesScrollSnap() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebKit/ChangeLog       2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2020-11-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Rename some wheel-event handling functions for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=219211
+
+        Reviewed by Tim Horton.
+        
+        There are too many functions called wheelEvent() or handleWheelEvent(), making it hard
+        to know which phase of handling they apply to. So rename some to handleWheelEventForScrolling(),
+        which applies to the "default handling" phase after DOM event dispatch.
+        
+        In addition, make ScrollableArea's handleWheelEventForScrolling() virtual and have FrameView
+        override it (a future patch will also add an override in RenderLayer).
+        
+        Rename ScrollingCoordinator::performDefaultWheelEventHandling() to use handleWheelEventForScrolling()
+        for clarity.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::handleWheelEvent):
+
</ins><span class="cx"> 2020-11-20  Ryan Haddad  <ryanhaddad@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed fix for my build fix.
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessPluginsPDFPDFPluginmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (270124 => 270125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm  2020-11-20 19:12:53 UTC (rev 270124)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm     2020-11-20 19:37:33 UTC (rev 270125)
</span><span class="lines">@@ -2938,7 +2938,7 @@
</span><span class="cx">     PDFDisplayMode displayMode = [m_pdfLayerController displayMode];
</span><span class="cx"> 
</span><span class="cx">     if (displayMode == kPDFDisplaySinglePageContinuous || displayMode == kPDFDisplayTwoUpContinuous)
</span><del>-        return ScrollableArea::handleWheelEvent(platform(event));
</del><ins>+        return ScrollableArea::handleWheelEventForScrolling(platform(event));
</ins><span class="cx"> 
</span><span class="cx">     NSUInteger currentPageIndex = [m_pdfLayerController currentPageIndex];
</span><span class="cx">     bool inFirstPage = !currentPageIndex;
</span><span class="lines">@@ -2971,7 +2971,7 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return ScrollableArea::handleWheelEvent(platform(event));
</del><ins>+    return ScrollableArea::handleWheelEventForScrolling(platform(event));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> NSData *PDFPlugin::liveData() const
</span></span></pre>
</div>
</div>

</body>
</html>