<!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>[169692] 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/169692">169692</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-06-09 10:49:32 -0700 (Mon, 09 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix more latched scrolling test flakiness and slowness
https://bugs.webkit.org/show_bug.cgi?id=133601

Reviewed by Brent Fulgham.

Source/WebKit2:

Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.

Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.

Finally remove all the now-unnecessary timeouts from the tests.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::wheelEventSyncForTesting):

Tools:

Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.

Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.

Finally remove all the now-unnecessary timeouts from the tests.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):

LayoutTests:

Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.

Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.

Finally remove all the now-unnecessary timeouts from the tests.

* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivwithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivwithhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframewithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframewithhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframehtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframewithhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframehtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframewithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframewithhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframehtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframewithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframewithhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframehtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectwithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectwithhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselecthtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacEventSenderProxymm">trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/ChangeLog        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-06-09  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Fix more latched scrolling test flakiness and slowness
+        https://bugs.webkit.org/show_bug.cgi?id=133601
+
+        Reviewed by Brent Fulgham.
+
+        Latched scrolling tests were flakey for two reasons. First, the EventSender
+        wheel events were async from the web to the UI process, and the resulting
+        synthetic events also async from the UI to the web process. Make them sync
+        for testing.
+        
+        Secondly, the timer-based scrolling tree commit could result in the scrolling
+        tree (specifically the frame node's notion of the scrollable area and content
+        size) not being updated before the scrolling thread starts getting wheel events.
+        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
+        
+        Finally remove all the now-unnecessary timeouts from the tests.
+
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html:
+
</ins><span class="cx"> 2014-06-09  Andrzej Badowski  &lt;a.badowski@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Change expectations for four layout tests.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivwithhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> Page before: 0, div before: 586
</span><span class="cx"> Page after:  0, div after: 666
</span><span class="cx"> PASS Page did not receive wheel events.
</span><del>-Document was initial target for 4 of the wheel events.
</del><ins>+Document was initial target for 8 of the wheel events.
</ins><span class="cx"> (GraphicsLayer
</span><span class="cx">   (anchor 0.00 0.00)
</span><span class="cx">   (bounds 2008.00 2341.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivwithhandlerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -46,8 +46,8 @@
</span><span class="cx"> var divScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
-
</del><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The div should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var divScrollPositionAfter = divTarget.scrollTop;
</span><span class="lines">@@ -70,7 +70,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     divTarget = document.getElementById('target');
</span><span class="lines">@@ -84,26 +85,25 @@
</span><span class="cx">     var startPosY = Math.round(divTarget.offsetTop) + Math.round(divTarget.clientHeight) - 42; // One wheel turn before end.
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    checkForScroll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><del>-
-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> var divScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
-
</del><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The div should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var divScrollPositionAfter = divTarget.scrollTop;
</span><span class="lines">@@ -62,7 +62,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     divTarget = document.getElementById('target');
</span><span class="lines">@@ -76,26 +77,26 @@
</span><span class="cx">     var startPosY = Math.round(divTarget.offsetTop) + Math.round(divTarget.clientHeight) - 42; // One wheel turn before end.
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    checkForScroll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframewithhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> Page before: 0, div before: 0
</span><span class="cx"> Page after:  70, div after: 0
</span><span class="cx"> PASS Scrollable div did not receive wheel events.
</span><del>-Document was initial target for 4 of the wheel events.
</del><ins>+Document was initial target for 8 of the wheel events.
</ins><span class="cx"> (GraphicsLayer
</span><span class="cx">   (anchor 0.00 0.00)
</span><span class="cx">   (bounds 2008.00 2326.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframewithhandlerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> function onLoad() {
</span><span class="cx">     document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
</span><ins>+    window.addEventListener(&quot;scroll&quot;, onPageScroll);
</ins><span class="cx">     setupTopLevel();
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="lines">@@ -46,8 +47,14 @@
</span><span class="cx"> var divScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
</del><ins>+function onPageScroll()
+{
+    if (document.body.scrollTop &gt;= 70)
+        checkForScroll();
+}
</ins><span class="cx"> 
</span><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The div should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var divScrollPositionAfter = divTarget.scrollTop;
</span><span class="lines">@@ -70,7 +77,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     divTarget = document.getElementById('target');
</span><span class="lines">@@ -82,26 +90,28 @@
</span><span class="cx">     var startPosY = Math.round(divTarget.offsetTop) - 42;
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+
+    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+    setTimeout(checkForScroll, 500);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> function onLoad() {
</span><span class="cx">     setupTopLevel();
</span><ins>+    window.addEventListener(&quot;scroll&quot;, onPageScroll);
</ins><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="lines">@@ -40,8 +41,14 @@
</span><span class="cx"> var divScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
</del><ins>+function onPageScroll()
+{
+    if (document.body.scrollTop &gt;= 70)
+        checkForScroll();
+}
</ins><span class="cx"> 
</span><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The div should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var divScrollPositionAfter = divTarget.scrollTop;
</span><span class="lines">@@ -62,7 +69,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     divTarget = document.getElementById('target');
</span><span class="lines">@@ -74,26 +82,28 @@
</span><span class="cx">     var startPosY = Math.round(divTarget.offsetTop) - 42;
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+
+    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+    setTimeout(checkForScroll, 500);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframewithhandlerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -22,8 +22,8 @@
</span><span class="cx"> var iFrameScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
-
</del><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The IFrame should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
</span><span class="lines">@@ -46,8 +46,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
-    // See where our IFrame lives:
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     iframeTarget = document.getElementById('target');
</span><span class="lines">@@ -63,26 +63,26 @@
</span><span class="cx">     var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    checkForScroll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -12,9 +12,8 @@
</span><span class="cx"> var iFrameScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
-
-    // The IFrame should not have scrolled at all.
</del><ins>+function checkForScroll()
+{
</ins><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
</span><span class="cx"> 
</span><span class="lines">@@ -34,8 +33,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
-    // See where our IFrame lives:
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     iframeTarget = document.getElementById('target');
</span><span class="lines">@@ -45,32 +44,31 @@
</span><span class="cx"> 
</span><span class="cx">     iFrameScrollPositionBefore = iFrameBody.scrollTop;
</span><span class="cx"> 
</span><del>-    // Scroll the #source until we reach the #target.
</del><span class="cx">     var startPosX = iframeTarget.offsetLeft + 20;
</span><span class="cx">     debug(&quot;IFrame display height = &quot; + iframeTarget.clientHeight);
</span><del>-    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
-    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
</del><ins>+    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42;
+    eventSender.mouseMoveTo(startPosX, startPosY);
</ins><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    checkForScroll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframewithhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> Page before: 0, IFrame before: 0
</span><span class="cx"> Page after:  70, IFrame after: 0
</span><span class="cx"> PASS IFrame did not receive wheel events.
</span><del>-Document was initial target for 4 of the wheel events.
</del><ins>+Document was initial target for 8 of the wheel events.
</ins><span class="cx"> (GraphicsLayer
</span><span class="cx">   (anchor 0.00 0.00)
</span><span class="cx">   (bounds 785.00 2326.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframewithhandlerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -11,6 +11,7 @@
</span><span class="cx"> 
</span><span class="cx"> function onLoad() {
</span><span class="cx">     document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
</span><ins>+    window.addEventListener(&quot;scroll&quot;, onPageScroll);
</ins><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="lines">@@ -22,8 +23,14 @@
</span><span class="cx"> var iFrameScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
</del><ins>+function onPageScroll()
+{
+    if (document.body.scrollTop &gt;= 70)
+        checkForScroll();
+}
</ins><span class="cx"> 
</span><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The IFrame should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
</span><span class="lines">@@ -46,38 +53,39 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
-    // See where our IFrame lives:
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx">     iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     iframeTarget = document.getElementById('target');
</span><span class="cx"> 
</span><del>-    // Scroll the #source until we reach the #target.
</del><span class="cx">     var startPosX = iframeTarget.offsetLeft + 20;
</span><del>-    var startPosY = iframeTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
-    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
</del><ins>+    var startPosY = iframeTarget.offsetTop - 42;
+    eventSender.mouseMoveTo(startPosX, startPosY);
</ins><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+
+    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+    setTimeout(checkForScroll, 500);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> &lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body&gt;
</del><ins>+&lt;body onload=&quot;onLoad();&quot;&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> 
</span><span class="cx"> var iframeTarget;
</span><span class="lines">@@ -12,8 +12,19 @@
</span><span class="cx"> var iFrameScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
</del><ins>+function onLoad()
+{
+    window.addEventListener(&quot;scroll&quot;, onPageScroll);
+}
</ins><span class="cx"> 
</span><ins>+function onPageScroll()
+{
+    if (document.body.scrollTop &gt;= 70)
+        checkForScroll();
+}
+
+function checkForScroll()
+{
</ins><span class="cx">     // The IFrame should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
</span><span class="lines">@@ -34,37 +45,39 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx">     iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     iframeTarget = document.getElementById('target');
</span><del>-
-    // Scroll the #source until we reach the #target.
</del><ins>+    
</ins><span class="cx">     var startPosX = iframeTarget.offsetLeft + 20;
</span><span class="cx">     var startPosY = iframeTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+
+    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+    setTimeout(checkForScroll, 500);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span><span class="lines">@@ -77,7 +90,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
</del><ins>+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px;&quot;&gt;
</ins><span class="cx">     &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
</span><span class="cx">         Put mouse here and flick downwards
</span><span class="cx">     &lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframewithhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> Page before: 0, select before: 0
</span><span class="cx"> Page after:  70, select after: 0
</span><span class="cx"> PASS Select did not receive wheel events.
</span><del>-Document was initial target for 4 of the wheel events.
</del><ins>+Document was initial target for 8 of the wheel events.
</ins><span class="cx"> (GraphicsLayer
</span><span class="cx">   (anchor 0.00 0.00)
</span><span class="cx">   (bounds 2008.00 2326.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframewithhandlerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> function onLoad() {
</span><span class="cx">     document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
</span><ins>+    window.addEventListener(&quot;scroll&quot;, onPageScroll);
</ins><span class="cx">     setupTopLevel();
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="lines">@@ -46,8 +47,14 @@
</span><span class="cx"> var selectScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
</del><ins>+function onPageScroll()
+{
+    if (document.body.scrollTop &gt;= 70)
+        checkForScroll();
+}
</ins><span class="cx"> 
</span><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The select should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var selectScrollPositionAfter = selectTarget.scrollTop;
</span><span class="lines">@@ -70,38 +77,40 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     selectTarget = document.getElementById('target');
</span><span class="cx"> 
</span><span class="cx">     selectScrollPositionBefore = selectTarget.scrollTop;
</span><span class="cx"> 
</span><del>-    // Scroll the #source until we reach the #target.
</del><span class="cx">     var startPosX = Math.round(selectTarget.offsetLeft) + 20;
</span><span class="cx">     var startPosY = Math.round(selectTarget.offsetTop) - 42;
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+
+    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+    setTimeout(checkForScroll, 500);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> function onLoad() {
</span><ins>+    window.addEventListener(&quot;scroll&quot;, onPageScroll);
</ins><span class="cx">     setupTopLevel();
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="lines">@@ -40,8 +41,14 @@
</span><span class="cx"> var selectScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
</del><ins>+function onPageScroll()
+{
+    if (document.body.scrollTop &gt;= 70)
+        checkForScroll();
+}
</ins><span class="cx"> 
</span><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The select should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var selectScrollPositionAfter = selectTarget.scrollTop;
</span><span class="lines">@@ -62,7 +69,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     selectTarget = document.getElementById('target');
</span><span class="lines">@@ -74,26 +82,28 @@
</span><span class="cx">     var startPosY = Math.round(selectTarget.offsetTop) - 42;
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+
+    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+    setTimeout(checkForScroll, 500);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectwithhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> Page before: 0, select before: 70
</span><span class="cx"> Page after:  0, select after: 140
</span><span class="cx"> PASS Page did not receive wheel events.
</span><del>-Document was initial target for 4 of the wheel events.
</del><ins>+Document was initial target for 8 of the wheel events.
</ins><span class="cx"> (GraphicsLayer
</span><span class="cx">   (anchor 0.00 0.00)
</span><span class="cx">   (bounds 2008.00 2341.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectwithhandlerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -46,8 +46,8 @@
</span><span class="cx"> var selectScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
-
</del><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The page should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var selectScrollPositionAfter = selectTarget.scrollTop;
</span><span class="lines">@@ -70,7 +70,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     selectTarget = document.getElementById('target');
</span><span class="lines">@@ -83,26 +84,26 @@
</span><span class="cx">     var startPosY = Math.round(selectTarget.offsetTop) + Math.round(selectTarget.clientHeight) - 42;
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    checkForScroll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> var selectScrollPositionBefore;
</span><span class="cx"> var continueCount = 5;
</span><span class="cx"> 
</span><del>-function checkForScroll() {
-
</del><ins>+function checkForScroll()
+{
</ins><span class="cx">     // The page should not have scrolled at all.
</span><span class="cx">     var pageScrollPositionAfter = document.body.scrollTop;
</span><span class="cx">     var selectScrollPositionAfter = selectTarget.scrollTop;
</span><span class="lines">@@ -62,7 +62,8 @@
</span><span class="cx">     testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function scrollTest() {
</del><ins>+function scrollTest()
+{
</ins><span class="cx">     pageScrollPositionBefore = document.body.scrollTop;
</span><span class="cx"> 
</span><span class="cx">     selectTarget = document.getElementById('target');
</span><span class="lines">@@ -76,26 +77,26 @@
</span><span class="cx">     var startPosY = Math.round(selectTarget.offsetTop) + Math.round(selectTarget.clientHeight) - 42;
</span><span class="cx">     eventSender.mouseMoveTo(startPosX, startPosY);
</span><span class="cx">     debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
</span><del>-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
-    setTimeout(checkForScroll, 100);
</del><ins>+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    checkForScroll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setupTopLevel() {
-
</del><ins>+function setupTopLevel()
+{
</ins><span class="cx">     if (window.eventSender) {
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         testRunner.waitUntilDone();
</span><span class="cx"> 
</span><del>-        setTimeout(scrollTest, 1000);
</del><ins>+        setTimeout(scrollTest, 0);
</ins><span class="cx">     } else {
</span><span class="cx">         var messageLocation = document.getElementById('parent');
</span><span class="cx">         var message = document.createElement('div');
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-06-09  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Fix more latched scrolling test flakiness and slowness
+        https://bugs.webkit.org/show_bug.cgi?id=133601
+
+        Reviewed by Brent Fulgham.
+
+        Latched scrolling tests were flakey for two reasons. First, the EventSender
+        wheel events were async from the web to the UI process, and the resulting
+        synthetic events also async from the UI to the web process. Make them sync
+        for testing.
+        
+        Secondly, the timer-based scrolling tree commit could result in the scrolling
+        tree (specifically the frame node's notion of the scrollable area and content
+        size) not being updated before the scrolling thread starts getting wheel events.
+        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
+        
+        Finally remove all the now-unnecessary timeouts from the tests.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::wheelEventSyncForTesting):
+
</ins><span class="cx"> 2014-06-09  Andrzej Badowski  &lt;a.badowski@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Add parameter to MiniBrowser to disable web security
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -1879,6 +1879,9 @@
</span><span class="cx"> {
</span><span class="cx">     CurrentEvent currentEvent(wheelEvent);
</span><span class="cx"> 
</span><ins>+    if (ScrollingCoordinator* scrollingCoordinator = m_page-&gt;scrollingCoordinator())
+        scrollingCoordinator-&gt;commitTreeStateIfNeeded();
+
</ins><span class="cx">     handled = handleWheelEvent(wheelEvent, m_page.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/Tools/ChangeLog        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2014-06-09  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Fix more latched scrolling test flakiness and slowness
+        https://bugs.webkit.org/show_bug.cgi?id=133601
+
+        Reviewed by Brent Fulgham.
+        
+        Latched scrolling tests were flakey for two reasons. First, the EventSender
+        wheel events were async from the web to the UI process, and the resulting
+        synthetic events also async from the UI to the web process. Make them sync
+        for testing.
+        
+        Secondly, the timer-based scrolling tree commit could result in the scrolling
+        tree (specifically the frame node's notion of the scrollable area and content
+        size) not being updated before the scrolling thread starts getting wheel events.
+        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
+        
+        Finally remove all the now-unnecessary timeouts from the tests.
+
+        * WebKitTestRunner/mac/EventSenderProxy.mm:
+        (WTR::EventSenderProxy::mouseMoveTo):
+        (WTR::EventSenderProxy::mouseScrollBy):
+        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):
+
</ins><span class="cx"> 2014-06-09  Andrzej Badowski  &lt;a.badowski@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Add parameter to MiniBrowser to disable web security
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacEventSenderProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm (169691 => 169692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm        2014-06-09 17:01:34 UTC (rev 169691)
+++ trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm        2014-06-09 17:49:32 UTC (rev 169692)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import &quot;TestController.h&quot;
</span><span class="cx"> #import &lt;Carbon/Carbon.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKString.h&gt;
</span><ins>+#import &lt;WebKit/WKPagePrivate.h&gt;
</ins><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> @interface NSApplication (Details)
</span><span class="lines">@@ -218,7 +219,9 @@
</span><span class="cx">     NSView *targetView = [m_testController-&gt;mainWebView()-&gt;platformView() hitTest:[event locationInWindow]];
</span><span class="cx">     if (targetView) {
</span><span class="cx">         [NSApp _setCurrentEvent:event];
</span><ins>+        WKPageSetShouldSendEventsSynchronously(m_testController-&gt;mainWebView()-&gt;page(), true);
</ins><span class="cx">         [targetView mouseMoved:event];
</span><ins>+        WKPageSetShouldSendEventsSynchronously(m_testController-&gt;mainWebView()-&gt;page(), false);
</ins><span class="cx">         [NSApp _setCurrentEvent:nil];
</span><span class="cx">     } else {
</span><span class="cx">         NSPoint windowLocation = [event locationInWindow];
</span><span class="lines">@@ -455,11 +458,13 @@
</span><span class="cx">     NSEvent *event = [NSEvent eventWithCGEvent:cgScrollEvent.get()];
</span><span class="cx">     if (NSView *targetView = [m_testController-&gt;mainWebView()-&gt;platformView() hitTest:[event locationInWindow]]) {
</span><span class="cx">         [NSApp _setCurrentEvent:event];
</span><ins>+        WKPageSetShouldSendEventsSynchronously(m_testController-&gt;mainWebView()-&gt;page(), true);
</ins><span class="cx">         [targetView scrollWheel:event];
</span><ins>+        WKPageSetShouldSendEventsSynchronously(m_testController-&gt;mainWebView()-&gt;page(), false);
</ins><span class="cx">         [NSApp _setCurrentEvent:nil];
</span><span class="cx">     } else {
</span><span class="cx">         NSPoint location = [event locationInWindow];
</span><del>-        WTFLogAlways(&quot;mouseScrollByWithWheelAndMomentumPhases failed to find the target view at %f,%f\n&quot;, location.x, location.y);
</del><ins>+        WTFLogAlways(&quot;mouseScrollBy failed to find the target view at %f,%f\n&quot;, location.x, location.y);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -492,7 +497,9 @@
</span><span class="cx">     // Our event should have the correct settings:
</span><span class="cx">     if (NSView *targetView = [m_testController-&gt;mainWebView()-&gt;platformView() hitTest:[event locationInWindow]]) {
</span><span class="cx">         [NSApp _setCurrentEvent:event];
</span><ins>+        WKPageSetShouldSendEventsSynchronously(m_testController-&gt;mainWebView()-&gt;page(), true);
</ins><span class="cx">         [targetView scrollWheel:event];
</span><ins>+        WKPageSetShouldSendEventsSynchronously(m_testController-&gt;mainWebView()-&gt;page(), false);
</ins><span class="cx">         [NSApp _setCurrentEvent:nil];
</span><span class="cx">     } else {
</span><span class="cx">         NSPoint windowLocation = [event locationInWindow];
</span></span></pre>
</div>
</div>

</body>
</html>