<!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>[182242] trunk</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/182242">182242</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-04-01 11:30:39 -0700 (Wed, 01 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
https://bugs.webkit.org/show_bug.cgi?id=143288
rdar://problem/16049624

Reviewed by Beth Dakin.

Remove the wheel event counting that Document does, and passes into the scrolling tree.
The ScrollingTree now just uses the non-fast scrollable region to determine when to
fast scroll on pages with wheel event handlers.

If a handler includes position:fixed renderers, we just cover the whole document
with the slow-scrolling region currently. This could be improved.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::wheelEventHandlersChanged):
(WebCore::Document::didAddWheelEventHandler):
(WebCore::Document::didRemoveWheelEventHandler):
(WebCore::Document::wheelEventHandlerCount):
(WebCore::Document::touchEventHandlerCount):
(WebCore::Document::absoluteRegionForEventTargets): Changed to return a pair&lt;Region, bool&gt;
where the bool indicates whether any handler includes position:fixed content.
(WebCore::pageWheelEventHandlerCountChanged): Deleted.
(WebCore::wheelEventHandlerCountChanged): Deleted.
* dom/Document.h:
(WebCore::Document::wheelEventHandlerCount): Deleted.
* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
(WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): Deleted.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount): Deleted.
(WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged): Deleted.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): Deleted.
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::setWheelEventHandlerCount): Deleted.
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::commitNewTreeState):
* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
(WebCore::logWheelEventHandlerCountChanged): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::touchEventHandlerCount):

Source/WebKit/mac:
Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
https://bugs.webkit.org/show_bug.cgi?id=143288

Reviewed by Beth Dakin.

Remove the wheel event counting that Document does, and passes into the scrolling tree.
The ScrollingTree now just uses the non-fast scrollable region to determine when to
fast scroll on pages with wheel event handlers.

* WebCoreSupport/WebChromeClient.h:

Source/WebKit2:
Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
https://bugs.webkit.org/show_bug.cgi?id=143288
rdar://problem/16049624

Reviewed by Beth Dakin.

Remove the wheel event counting that Document does, and passes into the scrolling tree.
The ScrollingTree now just uses the non-fast scrollable region to determine when to
fast scroll on pages with wheel event handlers.

If a handler includes position:fixed renderers, we just cover the whole document
with the slow-scrolling region currently. This could be improved.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder&lt;ScrollingStateFrameScrollingNode&gt;::encode):
(ArgumentCoder&lt;ScrollingStateFrameScrollingNode&gt;::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::wheelEventHandlersChanged):
(WebKit::WebChromeClient::numWheelEventHandlersChanged): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::wheelEventHandlersChanged):
(WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
(WebKit::WebPage::numWheelEventHandlersChanged): Deleted.
* WebProcess/WebPage/WebPage.h:

LayoutTests:
Make it possible to compute a region for elements on the page that have wheel event handlers
https://bugs.webkit.org/show_bug.cgi?id=142807

Reviewed by Beth Dakin.

Update results, since any handler with position:fixed now causes the region to cover the document.

* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerfixedchildexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinsidefixedexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandleronfixedexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebCorepageDebugPageOverlayscpp">trunk/Source/WebCore/page/DebugPageOverlays.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorh">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorh">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreecpp">trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreeh">trunk/Source/WebCore/page/scrolling/ScrollingTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebChromeClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp">trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/LayoutTests/ChangeLog        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-03-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Make it possible to compute a region for elements on the page that have wheel event handlers
+        https://bugs.webkit.org/show_bug.cgi?id=142807
+
+        Reviewed by Beth Dakin.
+        
+        Update results, since any handler with position:fixed now causes the region to cover the document.
+
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:
+
</ins><span class="cx"> 2015-04-01  David Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [New Block-Inside-Inline Model] Floats need to be allowed to intrude into anonymous inline-blocks.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerfixedchildexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1 +1 @@
</span><del>-50, 50 - 150, 150
</del><ins>+0, 0 - 785, 628
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinsidefixedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1 +1 @@
</span><del>-60, 60 - 160, 160
</del><ins>+0, 0 - 800, 600
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandleronfixedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1 +1 @@
</span><del>-10, 10 - 110, 110
</del><ins>+0, 0 - 800, 600
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/ChangeLog        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2015-03-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
+        https://bugs.webkit.org/show_bug.cgi?id=143288
+        rdar://problem/16049624
+
+        Reviewed by Beth Dakin.
+
+        Remove the wheel event counting that Document does, and passes into the scrolling tree.
+        The ScrollingTree now just uses the non-fast scrollable region to determine when to
+        fast scroll on pages with wheel event handlers.
+        
+        If a handler includes position:fixed renderers, we just cover the whole document
+        with the slow-scrolling region currently. This could be improved.
+        
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::didBecomeCurrentDocumentInFrame):
+        (WebCore::Document::wheelEventHandlersChanged):
+        (WebCore::Document::didAddWheelEventHandler):
+        (WebCore::Document::didRemoveWheelEventHandler):
+        (WebCore::Document::wheelEventHandlerCount):
+        (WebCore::Document::touchEventHandlerCount):
+        (WebCore::Document::absoluteRegionForEventTargets): Changed to return a pair&lt;Region, bool&gt;
+        where the bool indicates whether any handler includes position:fixed content.
+        (WebCore::pageWheelEventHandlerCountChanged): Deleted.
+        (WebCore::wheelEventHandlerCountChanged): Deleted.
+        * dom/Document.h:
+        (WebCore::Document::wheelEventHandlerCount): Deleted.
+        * loader/EmptyClients.h:
+        * page/ChromeClient.h:
+        * page/DebugPageOverlays.cpp:
+        (WebCore::MouseWheelRegionOverlay::updateRegion):
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
+        (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): Deleted.
+        * page/scrolling/AsyncScrollingCoordinator.h:
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
+        (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
+        (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount): Deleted.
+        (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged): Deleted.
+        * page/scrolling/ScrollingCoordinator.h:
+        (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): Deleted.
+        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
+        (WebCore::ScrollingStateFrameScrollingNode::setWheelEventHandlerCount): Deleted.
+        * page/scrolling/ScrollingStateFrameScrollingNode.h:
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::ScrollingTree):
+        (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
+        (WebCore::ScrollingTree::commitNewTreeState):
+        * page/scrolling/ScrollingTree.h:
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator):
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
+        (WebCore::logWheelEventHandlerCountChanged): Deleted.
+        * testing/Internals.cpp:
+        (WebCore::Internals::touchEventHandlerCount):
+
</ins><span class="cx"> 2015-04-01  David Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [New Block-Inside-Inline Model] Floats need to be allowed to intrude into anonymous inline-blocks.
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/dom/Document.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -490,7 +490,6 @@
</span><span class="cx">     , m_writingModeSetOnDocumentElement(false)
</span><span class="cx">     , m_writeRecursionIsTooDeep(false)
</span><span class="cx">     , m_writeRecursionDepth(0)
</span><del>-    , m_wheelEventHandlerCount(0)
</del><span class="cx">     , m_lastHandledUserGestureTimestamp(0)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #if ENABLE(DEVICE_ORIENTATION)
</span><span class="lines">@@ -2098,16 +2097,6 @@
</span><span class="cx">     recalcStyle(Style::Force);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void pageWheelEventHandlerCountChanged(Page&amp; page)
-{
-    unsigned count = 0;
-    for (const Frame* frame = &amp;page.mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
-        if (Document* document = frame-&gt;document())
-            count += document-&gt;wheelEventHandlerCount();
-    }
-    page.chrome().client().numWheelEventHandlersChanged(count);
-}
-
</del><span class="cx"> void Document::didBecomeCurrentDocumentInFrame()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Are there cases where the document can be dislodged from the frame during the event handling below?
</span><span class="lines">@@ -2128,7 +2117,7 @@
</span><span class="cx">     // subframes' documents have no wheel event handlers, then the count did not change,
</span><span class="cx">     // unless the documents they are replacing had wheel event handlers.
</span><span class="cx">     if (page() &amp;&amp; m_frame-&gt;isMainFrame())
</span><del>-        pageWheelEventHandlerCountChanged(*page());
</del><ins>+        wheelEventHandlersChanged();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     // FIXME: Doing this only for the main frame is insufficient.
</span><span class="lines">@@ -5982,30 +5971,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx"> 
</span><del>-static void wheelEventHandlerCountChanged(Document* document)
</del><ins>+void Document::wheelEventHandlersChanged()
</ins><span class="cx"> {
</span><del>-    Page* page = document-&gt;page();
</del><ins>+    Page* page = this-&gt;page();
</ins><span class="cx">     if (!page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    pageWheelEventHandlerCountChanged(*page);
</del><ins>+    if (FrameView* frameView = view()) {
+        if (ScrollingCoordinator* scrollingCoordinator = page-&gt;scrollingCoordinator())
+            scrollingCoordinator-&gt;frameViewNonFastScrollableRegionChanged(*frameView);
+    }
</ins><span class="cx"> 
</span><del>-    ScrollingCoordinator* scrollingCoordinator = page-&gt;scrollingCoordinator();
-    if (!scrollingCoordinator)
-        return;
-
-    FrameView* frameView = document-&gt;view();
-    if (!frameView)
-        return;
-
-    // FIXME: Why doesn't this need to be called in didBecomeCurrentDocumentInFrame?
-    scrollingCoordinator-&gt;frameViewWheelEventHandlerCountChanged(*frameView);
</del><ins>+    bool haveHandlers = m_wheelEventTargets &amp;&amp; !m_wheelEventTargets-&gt;isEmpty();
+    page-&gt;chrome().client().wheelEventHandlersChanged(haveHandlers);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::didAddWheelEventHandler(Node&amp; node)
</span><span class="cx"> {
</span><del>-    ++m_wheelEventHandlerCount;
-
</del><span class="cx">     if (!m_wheelEventTargets)
</span><span class="cx">         m_wheelEventTargets = std::make_unique&lt;EventTargetSet&gt;();
</span><span class="cx"> 
</span><span class="lines">@@ -6016,7 +5998,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    wheelEventHandlerCountChanged(this);
</del><ins>+    wheelEventHandlersChanged();
</ins><span class="cx"> 
</span><span class="cx">     if (Frame* frame = this-&gt;frame())
</span><span class="cx">         DebugPageOverlays::didChangeEventHandlers(*frame);
</span><span class="lines">@@ -6024,9 +6006,6 @@
</span><span class="cx"> 
</span><span class="cx"> void Document::didRemoveWheelEventHandler(Node&amp; node)
</span><span class="cx"> {
</span><del>-    ASSERT(m_wheelEventHandlerCount &gt; 0);
-    --m_wheelEventHandlerCount;
-
</del><span class="cx">     if (!m_wheelEventTargets)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -6038,12 +6017,24 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    wheelEventHandlerCountChanged(this);
</del><ins>+    wheelEventHandlersChanged();
</ins><span class="cx"> 
</span><span class="cx">     if (Frame* frame = this-&gt;frame())
</span><span class="cx">         DebugPageOverlays::didChangeEventHandlers(*frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+unsigned Document::wheelEventHandlerCount() const
+{
+    if (!m_wheelEventTargets)
+        return 0;
+
+    unsigned count = 0;
+    for (auto&amp; handler : *m_wheelEventTargets)
+        count += handler.value;
+
+    return count;
+}
+
</ins><span class="cx"> void Document::didAddTouchEventHandler(Node&amp; handler)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="lines">@@ -6114,6 +6105,22 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+unsigned Document::touchEventHandlerCount() const
+{
+#if ENABLE(TOUCH_EVENTS)
+    if (!m_touchEventTargets)
+        return 0;
+
+    unsigned count = 0;
+    for (auto&amp; handler : *m_touchEventTargets)
+        count += handler.value;
+
+    return count;
+#else
+    return 0;
+#endif
+}
+
</ins><span class="cx"> LayoutRect Document::absoluteEventHandlerBounds(bool&amp; includesFixedPositionElements)
</span><span class="cx"> {
</span><span class="cx">     includesFixedPositionElements = false;
</span><span class="lines">@@ -6123,10 +6130,10 @@
</span><span class="cx">     return LayoutRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Region Document::absoluteRegionForEventTargets(const EventTargetSet* targets)
</del><ins>+Document::RegionFixedPair Document::absoluteRegionForEventTargets(const EventTargetSet* targets)
</ins><span class="cx"> {
</span><span class="cx">     if (!targets)
</span><del>-        return Region();
</del><ins>+        return RegionFixedPair(Region(), false);
</ins><span class="cx"> 
</span><span class="cx">     Region targetRegion;
</span><span class="cx">     bool insideFixedPosition = false;
</span><span class="lines">@@ -6149,7 +6156,7 @@
</span><span class="cx">             targetRegion.unite(Region(enclosingIntRect(rootRelativeBounds)));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return targetRegion;
</del><ins>+    return RegionFixedPair(targetRegion, insideFixedPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::updateLastHandledUserGestureTimestamp()
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/dom/Document.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1122,7 +1122,6 @@
</span><span class="cx"> 
</span><span class="cx">     void initDNSPrefetch();
</span><span class="cx"> 
</span><del>-    unsigned wheelEventHandlerCount() const { return m_wheelEventHandlerCount; }
</del><span class="cx">     void didAddWheelEventHandler(Node&amp;);
</span><span class="cx">     void didRemoveWheelEventHandler(Node&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -1135,6 +1134,10 @@
</span><span class="cx">     bool hasTouchEventHandlers() const { return false; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    // Used for testing. Count handlers in the main document, and one per frame which contains handlers.
+    WEBCORE_EXPORT unsigned wheelEventHandlerCount() const;
+    WEBCORE_EXPORT unsigned touchEventHandlerCount() const;
+
</ins><span class="cx">     void didAddTouchEventHandler(Node&amp;);
</span><span class="cx">     void didRemoveTouchEventHandler(Node&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -1151,7 +1154,8 @@
</span><span class="cx"> 
</span><span class="cx">     const EventTargetSet* wheelEventTargets() const { return m_wheelEventTargets.get(); }
</span><span class="cx"> 
</span><del>-    Region absoluteRegionForEventTargets(const EventTargetSet*);
</del><ins>+    typedef std::pair&lt;Region, bool&gt; RegionFixedPair;
+    RegionFixedPair absoluteRegionForEventTargets(const EventTargetSet*);
</ins><span class="cx"> 
</span><span class="cx">     LayoutRect absoluteEventHandlerBounds(bool&amp;) override final;
</span><span class="cx"> 
</span><span class="lines">@@ -1320,6 +1324,8 @@
</span><span class="cx"> 
</span><span class="cx">     void didAssociateFormControlsTimerFired();
</span><span class="cx"> 
</span><ins>+    void wheelEventHandlersChanged();
+
</ins><span class="cx">     // DOM Cookies caching.
</span><span class="cx">     const String&amp; cachedDOMCookies() const { return m_cachedDOMCookies; }
</span><span class="cx">     void setCachedDOMCookies(const String&amp;);
</span><span class="lines">@@ -1564,7 +1570,6 @@
</span><span class="cx">     bool m_writeRecursionIsTooDeep;
</span><span class="cx">     unsigned m_writeRecursionDepth;
</span><span class="cx">     
</span><del>-    unsigned m_wheelEventHandlerCount;
</del><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     std::unique_ptr&lt;EventTargetSet&gt; m_touchEventTargets;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">     virtual void needTouchEvents(bool) override { }
</span><span class="cx"> #endif
</span><span class="cx">     
</span><del>-    virtual void numWheelEventHandlersChanged(unsigned) override { }
</del><ins>+    virtual void wheelEventHandlersChanged(bool) override { }
</ins><span class="cx">     
</span><span class="cx">     virtual bool isEmptyChromeClient() const override { return true; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/ChromeClient.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -396,7 +396,7 @@
</span><span class="cx">     };
</span><span class="cx">     virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&amp;, const String&amp; dialogMessage, FrameLoader::PageDismissalType) const { UNUSED_PARAM(dialogMessage); return true; }
</span><span class="cx"> 
</span><del>-    virtual void numWheelEventHandlersChanged(unsigned) = 0;
</del><ins>+    virtual void wheelEventHandlersChanged(bool hasHandlers) = 0;
</ins><span class="cx">         
</span><span class="cx">     virtual bool isSVGImageChromeClient() const { return false; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageDebugPageOverlayscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DebugPageOverlays.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DebugPageOverlays.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/DebugPageOverlays.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool MouseWheelRegionOverlay::updateRegion()
</span><span class="cx"> {
</span><del>-    std::unique_ptr&lt;Region&gt; region = std::make_unique&lt;Region&gt;(m_frame.document()-&gt;absoluteRegionForEventTargets(m_frame.document()-&gt;wheelEventTargets()));
</del><ins>+    std::unique_ptr&lt;Region&gt; region = std::make_unique&lt;Region&gt;(m_frame.document()-&gt;absoluteRegionForEventTargets(m_frame.document()-&gt;wheelEventTargets()).first);
</ins><span class="cx"> 
</span><span class="cx">     bool regionChanged = !m_region || !(*m_region == *region);
</span><span class="cx">     m_region = WTF::move(region);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -135,6 +135,7 @@
</span><span class="cx">     if (!m_scrollingStateTree-&gt;rootStateNode())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    // FIXME: computeNonFastScrollableRegion lazily.
</ins><span class="cx">     m_scrollingStateTree-&gt;rootStateNode()-&gt;setNonFastScrollableRegion(computeNonFastScrollableRegion(m_page-&gt;mainFrame(), IntPoint()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -487,14 +488,6 @@
</span><span class="cx">         scrollLayer-&gt;setPosition(-frameView-&gt;scrollPosition());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView(FrameView&amp; frameView)
-{
-    ScrollingStateFrameScrollingNode* node = downcast&lt;ScrollingStateFrameScrollingNode&gt;(m_scrollingStateTree-&gt;stateNodeForID(frameView.scrollLayerID()));
-    if (!node)
-        return;
-    node-&gt;setWheelEventHandlerCount(computeCurrentWheelEventHandlerCount());
-}
-
</del><span class="cx"> bool AsyncScrollingCoordinator::isRubberBandInProgress() const
</span><span class="cx"> {
</span><span class="cx">     return scrollingTree()-&gt;isRubberBandInProgress();
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -96,7 +96,6 @@
</span><span class="cx">     WEBCORE_EXPORT virtual void syncChildPositions(const LayoutRect&amp; viewportRect) override;
</span><span class="cx">     WEBCORE_EXPORT virtual void scrollableAreaScrollbarLayerDidChange(ScrollableArea&amp;, ScrollbarOrientation) override;
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT virtual void recomputeWheelEventHandlerCountForFrameView(FrameView&amp;) override;
</del><span class="cx">     WEBCORE_EXPORT virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons) override;
</span><span class="cx"> 
</span><span class="cx">     virtual void scheduleTreeStateCommit() = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -154,34 +154,22 @@
</span><span class="cx">         nonFastScrollableRegion.unite(computeNonFastScrollableRegion(*subframe, offset));
</span><span class="cx"> 
</span><span class="cx">     // Include wheel event handler region for the main frame.
</span><del>-    Region wheelHandlerRegion = frame.document()-&gt;absoluteRegionForEventTargets(frame.document()-&gt;wheelEventTargets());
-    wheelHandlerRegion.translate(toIntSize(offset));
-    nonFastScrollableRegion.unite(wheelHandlerRegion);
</del><ins>+    Document::RegionFixedPair wheelHandlerRegion = frame.document()-&gt;absoluteRegionForEventTargets(frame.document()-&gt;wheelEventTargets());
+    bool wheelHandlerInFixedContent = wheelHandlerRegion.second;
+    if (wheelHandlerInFixedContent) {
+        // FIXME: if a fixed element has a wheel event handler, for now just cover the entire document
+        // with the slow-scrolling region. This could be improved.
+        // FIXME: need to handle position:sticky here too.
+        bool inFixed;
+        wheelHandlerRegion.first.unite(enclosingIntRect(frame.document()-&gt;absoluteEventHandlerBounds(inFixed)));
+    }
+    wheelHandlerRegion.first.translate(toIntSize(offset));
+    nonFastScrollableRegion.unite(wheelHandlerRegion.first);
</ins><span class="cx"> 
</span><span class="cx">     return nonFastScrollableRegion;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned ScrollingCoordinator::computeCurrentWheelEventHandlerCount()
-{
-    unsigned wheelEventHandlerCount = 0;
-
-    for (Frame* frame = &amp;m_page-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
-        if (frame-&gt;document())
-            wheelEventHandlerCount += frame-&gt;document()-&gt;wheelEventHandlerCount();
-    }
-
-    return wheelEventHandlerCount;
-}
-
-void ScrollingCoordinator::frameViewWheelEventHandlerCountChanged(FrameView&amp; frameView)
-{
-    ASSERT(isMainThread());
-    ASSERT(m_page);
-
-    recomputeWheelEventHandlerCountForFrameView(frameView);
-}
-
</del><span class="cx"> void ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange(FrameView&amp; frameView)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="lines">@@ -283,7 +271,6 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     frameViewLayoutUpdated(frameView);
</span><del>-    recomputeWheelEventHandlerCountForFrameView(frameView);
</del><span class="cx">     updateSynchronousScrollingReasons(frameView);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -120,10 +120,6 @@
</span><span class="cx">     // Should be called whenever the given frame view has been laid out.
</span><span class="cx">     virtual void frameViewLayoutUpdated(FrameView&amp;) { }
</span><span class="cx"> 
</span><del>-    // Should be called whenever a wheel event handler is added or removed in the 
-    // frame view's underlying document.
-    void frameViewWheelEventHandlerCountChanged(FrameView&amp;);
-
</del><span class="cx">     // Should be called whenever the slow repaint objects counter changes between zero and one.
</span><span class="cx">     void frameViewHasSlowRepaintObjectsDidChange(FrameView&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -210,7 +206,6 @@
</span><span class="cx"> 
</span><span class="cx">     static GraphicsLayer* scrollLayerForScrollableArea(ScrollableArea&amp;);
</span><span class="cx"> 
</span><del>-    unsigned computeCurrentWheelEventHandlerCount();
</del><span class="cx">     GraphicsLayer* scrollLayerForFrameView(FrameView&amp;);
</span><span class="cx">     GraphicsLayer* counterScrollingLayerForFrameView(FrameView&amp;);
</span><span class="cx">     GraphicsLayer* insetClipLayerForFrameView(FrameView&amp;);
</span><span class="lines">@@ -222,7 +217,6 @@
</span><span class="cx">     Page* m_page; // FIXME: ideally this would be a reference but it gets nulled on async teardown.
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual void recomputeWheelEventHandlerCountForFrameView(FrameView&amp;) { }
</del><span class="cx">     virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons) { }
</span><span class="cx"> 
</span><span class="cx">     virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(const FrameView&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx">     , m_horizontalScrollbarPainter(0)
</span><span class="cx"> #endif
</span><span class="cx">     , m_frameScaleFactor(1)
</span><del>-    , m_wheelEventHandlerCount(0)
</del><span class="cx">     , m_synchronousScrollingReasons(0)
</span><span class="cx">     , m_behaviorForFixed(StickToDocumentBounds)
</span><span class="cx">     , m_headerHeight(0)
</span><span class="lines">@@ -63,7 +62,6 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_nonFastScrollableRegion(stateNode.nonFastScrollableRegion())
</span><span class="cx">     , m_frameScaleFactor(stateNode.frameScaleFactor())
</span><del>-    , m_wheelEventHandlerCount(stateNode.wheelEventHandlerCount())
</del><span class="cx">     , m_synchronousScrollingReasons(stateNode.synchronousScrollingReasons())
</span><span class="cx">     , m_behaviorForFixed(stateNode.scrollBehaviorForFixedElements())
</span><span class="cx">     , m_headerHeight(stateNode.headerHeight())
</span><span class="lines">@@ -119,15 +117,6 @@
</span><span class="cx">     setPropertyChanged(NonFastScrollableRegion);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollingStateFrameScrollingNode::setWheelEventHandlerCount(unsigned wheelEventHandlerCount)
-{
-    if (m_wheelEventHandlerCount == wheelEventHandlerCount)
-        return;
-
-    m_wheelEventHandlerCount = wheelEventHandlerCount;
-    setPropertyChanged(WheelEventHandlerCount);
-}
-
</del><span class="cx"> void ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons(SynchronousScrollingReasons reasons)
</span><span class="cx"> {
</span><span class="cx">     if (m_synchronousScrollingReasons == reasons)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx">     enum ChangedProperty {
</span><span class="cx">         FrameScaleFactor = NumScrollingStateNodeBits,
</span><span class="cx">         NonFastScrollableRegion,
</span><del>-        WheelEventHandlerCount,
</del><span class="cx">         ReasonsForSynchronousScrolling,
</span><span class="cx">         ScrolledContentsLayer,
</span><span class="cx">         CounterScrollingLayer,
</span><span class="lines">@@ -70,9 +69,6 @@
</span><span class="cx">     const Region&amp; nonFastScrollableRegion() const { return m_nonFastScrollableRegion; }
</span><span class="cx">     WEBCORE_EXPORT void setNonFastScrollableRegion(const Region&amp;);
</span><span class="cx"> 
</span><del>-    unsigned wheelEventHandlerCount() const { return m_wheelEventHandlerCount; }
-    WEBCORE_EXPORT void setWheelEventHandlerCount(unsigned);
-
</del><span class="cx">     SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; }
</span><span class="cx">     WEBCORE_EXPORT void setSynchronousScrollingReasons(SynchronousScrollingReasons);
</span><span class="cx"> 
</span><span class="lines">@@ -139,7 +135,6 @@
</span><span class="cx"> 
</span><span class="cx">     Region m_nonFastScrollableRegion;
</span><span class="cx">     float m_frameScaleFactor;
</span><del>-    unsigned m_wheelEventHandlerCount;
</del><span class="cx">     SynchronousScrollingReasons m_synchronousScrollingReasons;
</span><span class="cx">     ScrollBehaviorForFixedElements m_behaviorForFixed;
</span><span class="cx">     int m_headerHeight;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -38,8 +38,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> ScrollingTree::ScrollingTree()
</span><del>-    : m_hasWheelEventHandlers(false)
-    , m_rubberBandsAtLeft(true)
</del><ins>+    : m_rubberBandsAtLeft(true)
</ins><span class="cx">     , m_rubberBandsAtRight(true)
</span><span class="cx">     , m_rubberBandsAtTop(true)
</span><span class="cx">     , m_rubberBandsAtBottom(true)
</span><span class="lines">@@ -65,9 +64,6 @@
</span><span class="cx">     // This method is invoked by the event handling thread
</span><span class="cx">     MutexLocker lock(m_mutex);
</span><span class="cx"> 
</span><del>-    if (m_hasWheelEventHandlers)
-        return true;
-
</del><span class="cx">     bool shouldSetLatch = wheelEvent.shouldConsiderLatching();
</span><span class="cx">     
</span><span class="cx">     if (hasLatchedNode() &amp;&amp; !shouldSetLatch)
</span><span class="lines">@@ -129,15 +125,12 @@
</span><span class="cx">     ScrollingStateScrollingNode* rootNode = scrollingStateTree-&gt;rootStateNode();
</span><span class="cx">     if (rootNode
</span><span class="cx">         &amp;&amp; (rootStateNodeChanged
</span><del>-            || rootNode-&gt;hasChangedProperty(ScrollingStateFrameScrollingNode::WheelEventHandlerCount)
</del><span class="cx">             || rootNode-&gt;hasChangedProperty(ScrollingStateFrameScrollingNode::NonFastScrollableRegion)
</span><span class="cx">             || rootNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))) {
</span><span class="cx">         MutexLocker lock(m_mutex);
</span><span class="cx"> 
</span><span class="cx">         if (rootStateNodeChanged || rootNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
</span><span class="cx">             m_mainFrameScrollPosition = FloatPoint();
</span><del>-        if (rootStateNodeChanged || rootNode-&gt;hasChangedProperty(ScrollingStateFrameScrollingNode::WheelEventHandlerCount))
-            m_hasWheelEventHandlers = scrollingStateTree-&gt;rootStateNode()-&gt;wheelEventHandlerCount();
</del><span class="cx">         if (rootStateNodeChanged || rootNode-&gt;hasChangedProperty(ScrollingStateFrameScrollingNode::NonFastScrollableRegion))
</span><span class="cx">             m_nonFastScrollableRegion = scrollingStateTree-&gt;rootStateNode()-&gt;nonFastScrollableRegion();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -156,7 +156,6 @@
</span><span class="cx">     Mutex m_mutex;
</span><span class="cx">     Region m_nonFastScrollableRegion;
</span><span class="cx">     FloatPoint m_mainFrameScrollPosition;
</span><del>-    bool m_hasWheelEventHandlers;
</del><span class="cx"> 
</span><span class="cx">     Mutex m_swipeStateMutex;
</span><span class="cx">     bool m_rubberBandsAtLeft;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -144,8 +144,6 @@
</span><span class="cx">     ScrollingModeIndication indicatorMode;
</span><span class="cx">     if (shouldUpdateScrollLayerPositionSynchronously())
</span><span class="cx">         indicatorMode = SynchronousScrollingBecauseOfStyleIndication;
</span><del>-    else if (scrollingStateTree()-&gt;rootStateNode() &amp;&amp; scrollingStateTree()-&gt;rootStateNode()-&gt;wheelEventHandlerCount())
-        indicatorMode =  SynchronousScrollingBecauseOfEventHandlersIndication;
</del><span class="cx">     else
</span><span class="cx">         indicatorMode = AsyncScrollingIndication;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -47,9 +47,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static void logThreadedScrollingMode(unsigned synchronousScrollingReasons);
</span><del>-static void logWheelEventHandlerCountChanged(unsigned);
</del><span class="cx"> 
</span><del>-
</del><span class="cx"> PassRefPtr&lt;ScrollingTreeFrameScrollingNode&gt; ScrollingTreeFrameScrollingNodeMac::create(ScrollingTree&amp; scrollingTree, ScrollingNodeID nodeID)
</span><span class="cx"> {
</span><span class="cx">     return adoptRef(new ScrollingTreeFrameScrollingNodeMac(scrollingTree, nodeID));
</span><span class="lines">@@ -133,11 +131,6 @@
</span><span class="cx">             logThreadedScrollingMode(synchronousScrollingReasons());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::WheelEventHandlerCount)) {
-        if (scrollingTree().scrollingPerformanceLoggingEnabled())
-            logWheelEventHandlerCountChanged(scrollingStateNode.wheelEventHandlerCount());
-    }
-
</del><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx">     if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::HorizontalSnapOffsets))
</span><span class="cx">         m_scrollController.updateScrollSnapPoints(ScrollEventAxis::Horizontal, convertToLayoutUnits(scrollingStateNode.horizontalSnapOffsets()));
</span><span class="lines">@@ -543,11 +536,6 @@
</span><span class="cx">         WTFLogAlways(&quot;SCROLLING: Switching to threaded scrolling mode. Time: %f\n&quot;, WTF::monotonicallyIncreasingTime());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void logWheelEventHandlerCountChanged(unsigned count)
-{
-    WTFLogAlways(&quot;SCROLLING: Wheel event handler count changed. Time: %f Count: %u\n&quot;, WTF::monotonicallyIncreasingTime(), count);
-}
-
</del><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP) &amp;&amp; PLATFORM(MAC)
</span><span class="cx"> LayoutUnit ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis(ScrollEventAxis axis) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1254,15 +1254,7 @@
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto touchHandlers = document-&gt;touchEventTargets();
-    if (!touchHandlers)
-        return 0;
-
-    unsigned count = 0;
-    for (auto&amp; handler : *touchHandlers)
-        count += handler.value;
-
-    return count;
</del><ins>+    return document-&gt;touchEventHandlerCount();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Remove the document argument. It is almost always the same as
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-03-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
+        https://bugs.webkit.org/show_bug.cgi?id=143288
+
+        Reviewed by Beth Dakin.
+
+        Remove the wheel event counting that Document does, and passes into the scrolling tree.
+        The ScrollingTree now just uses the non-fast scrollable region to determine when to
+        fast scroll on pages with wheel event handlers.
+
+        * WebCoreSupport/WebChromeClient.h:
+
</ins><span class="cx"> 2015-03-31  Timothy Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         TextIndicator for &lt;span&gt; inside an &lt;a&gt; only highlights the &lt;span&gt;, should highlight the whole &lt;a&gt;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx">     virtual PassRefPtr&lt;WebCore::PopupMenu&gt; createPopupMenu(WebCore::PopupMenuClient*) const override;
</span><span class="cx">     virtual PassRefPtr&lt;WebCore::SearchPopupMenu&gt; createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
</span><span class="cx"> 
</span><del>-    virtual void numWheelEventHandlersChanged(unsigned) override { }
</del><ins>+    virtual void wheelEventHandlersChanged(bool) override { }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx">     virtual bool wrapCryptoKey(const Vector&lt;uint8_t&gt;&amp;, Vector&lt;uint8_t&gt;&amp;) const override;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit2/ChangeLog        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-03-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
+        https://bugs.webkit.org/show_bug.cgi?id=143288
+        rdar://problem/16049624
+
+        Reviewed by Beth Dakin.
+
+        Remove the wheel event counting that Document does, and passes into the scrolling tree.
+        The ScrollingTree now just uses the non-fast scrollable region to determine when to
+        fast scroll on pages with wheel event handlers.
+        
+        If a handler includes position:fixed renderers, we just cover the whole document
+        with the slow-scrolling region currently. This could be improved.
+
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+        (ArgumentCoder&lt;ScrollingStateFrameScrollingNode&gt;::encode):
+        (ArgumentCoder&lt;ScrollingStateFrameScrollingNode&gt;::decode):
+        (WebKit::RemoteScrollingTreeTextStream::dump):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::wheelEventHandlersChanged):
+        (WebKit::WebChromeClient::numWheelEventHandlersChanged): Deleted.
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::wheelEventHandlersChanged):
+        (WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
+        (WebKit::WebPage::numWheelEventHandlersChanged): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+
</ins><span class="cx"> 2015-03-31  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;rdar://problem/20365675&gt; [iOS] Include Add to Reading List link action only where supported
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -143,7 +143,6 @@
</span><span class="cx">     
</span><span class="cx">     SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::FrameScaleFactor, frameScaleFactor)
</span><span class="cx">     SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::NonFastScrollableRegion, nonFastScrollableRegion)
</span><del>-    SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::WheelEventHandlerCount, wheelEventHandlerCount)
</del><span class="cx">     SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::ReasonsForSynchronousScrolling, synchronousScrollingReasons)
</span><span class="cx">     SCROLLING_NODE_ENCODE_ENUM(ScrollingStateFrameScrollingNode::BehaviorForFixedElements, scrollBehaviorForFixedElements)
</span><span class="cx">     SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::HeaderHeight, headerHeight)
</span><span class="lines">@@ -225,7 +224,6 @@
</span><span class="cx"> 
</span><span class="cx">     SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::FrameScaleFactor, float, setFrameScaleFactor);
</span><span class="cx">     SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::NonFastScrollableRegion, Region, setNonFastScrollableRegion);
</span><del>-    SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::WheelEventHandlerCount, int, setWheelEventHandlerCount);
</del><span class="cx">     SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::ReasonsForSynchronousScrolling, SynchronousScrollingReasons, setSynchronousScrollingReasons);
</span><span class="cx">     SCROLLING_NODE_DECODE_ENUM(ScrollingStateFrameScrollingNode::BehaviorForFixedElements, ScrollBehaviorForFixedElements, setScrollBehaviorForFixedElements);
</span><span class="cx"> 
</span><span class="lines">@@ -620,7 +618,6 @@
</span><span class="cx">         ts.decreaseIndent();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // FIXME: dump wheelEventHandlerCount
</del><span class="cx">     // FIXME: dump synchronousScrollingReasons
</span><span class="cx">     // FIXME: dump scrollableAreaParameters
</span><span class="cx">     // FIXME: dump scrollBehaviorForFixedElements
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -990,9 +990,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebChromeClient::numWheelEventHandlersChanged(unsigned count)
</del><ins>+void WebChromeClient::wheelEventHandlersChanged(bool hasHandlers)
</ins><span class="cx"> {
</span><del>-    m_page-&gt;numWheelEventHandlersChanged(count);
</del><ins>+    m_page-&gt;wheelEventHandlersChanged(hasHandlers);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String WebChromeClient::plugInStartLabelTitle(const String&amp; mimeType) const
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void pageExtendedBackgroundColorDidChange(WebCore::Color) const override;
</span><span class="cx">     
</span><del>-    virtual void numWheelEventHandlersChanged(unsigned) override;
</del><ins>+    virtual void wheelEventHandlersChanged(bool) override;
</ins><span class="cx"> 
</span><span class="cx">     virtual String plugInStartLabelTitle(const String&amp; mimeType) const override;
</span><span class="cx">     virtual String plugInStartLabelSubtitle(const String&amp; mimeType) const override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">     , m_cachedMainFrameIsPinnedToTopSide(true)
</span><span class="cx">     , m_cachedMainFrameIsPinnedToBottomSide(true)
</span><span class="cx">     , m_canShortCircuitHorizontalWheelEvents(false)
</span><del>-    , m_numWheelEventHandlers(0)
</del><ins>+    , m_hasWheelEventHandlers(false)
</ins><span class="cx">     , m_cachedPageCount(0)
</span><span class="cx">     , m_autoSizingShouldExpandToViewHeight(false)
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="lines">@@ -4055,12 +4055,12 @@
</span><span class="cx">     frame.editor().confirmComposition(compositionString);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::numWheelEventHandlersChanged(unsigned numWheelEventHandlers)
</del><ins>+void WebPage::wheelEventHandlersChanged(bool hasHandlers)
</ins><span class="cx"> {
</span><del>-    if (m_numWheelEventHandlers == numWheelEventHandlers)
</del><ins>+    if (m_hasWheelEventHandlers == hasHandlers)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_numWheelEventHandlers = numWheelEventHandlers;
</del><ins>+    m_hasWheelEventHandlers = hasHandlers;
</ins><span class="cx">     recomputeShortCircuitHorizontalWheelEventsState();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4103,7 +4103,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::recomputeShortCircuitHorizontalWheelEventsState()
</span><span class="cx"> {
</span><del>-    bool canShortCircuitHorizontalWheelEvents = !m_numWheelEventHandlers;
</del><ins>+    bool canShortCircuitHorizontalWheelEvents = !m_hasWheelEventHandlers;
</ins><span class="cx"> 
</span><span class="cx">     if (canShortCircuitHorizontalWheelEvents) {
</span><span class="cx">         // Check if we have any horizontal scroll bars on the page.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (182241 => 182242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-04-01 18:10:32 UTC (rev 182241)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-04-01 18:30:39 UTC (rev 182242)
</span><span class="lines">@@ -760,7 +760,7 @@
</span><span class="cx"> 
</span><span class="cx">     void wheelEvent(const WebWheelEvent&amp;);
</span><span class="cx"> 
</span><del>-    void numWheelEventHandlersChanged(unsigned);
</del><ins>+    void wheelEventHandlersChanged(bool);
</ins><span class="cx">     void recomputeShortCircuitHorizontalWheelEventsState();
</span><span class="cx"> 
</span><span class="cx">     void updateVisibilityState(bool isInitialState = false);
</span><span class="lines">@@ -1263,7 +1263,7 @@
</span><span class="cx">     bool m_cachedMainFrameIsPinnedToTopSide;
</span><span class="cx">     bool m_cachedMainFrameIsPinnedToBottomSide;
</span><span class="cx">     bool m_canShortCircuitHorizontalWheelEvents;
</span><del>-    unsigned m_numWheelEventHandlers;
</del><ins>+    bool m_hasWheelEventHandlers;
</ins><span class="cx"> 
</span><span class="cx">     unsigned m_cachedPageCount;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>