<!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>[164073] 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/164073">164073</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-02-13 16:22:36 -0800 (Thu, 13 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Create some latched scrolling tests.
https://bugs.webkit.org/show_bug.cgi?id=127606
&lt;rdar://problem/15911348&gt;

Reviewed by Simon Fraser.

Tools: 

* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController isSelectorExcludedFromWebScript:]): Update to recognize
the new &quot;mouseScrollByX:andY:withWheel:andMomentumPhases:&quot; selector.
(+[EventSendingController webScriptNameForSelector:]): Ditto.
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]): Implement
the new wheel event sender.
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: Add declaration
of new mouseScrollByWithWheelAndMomentumPhases method.
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Added
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm:
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Add stub for iOS.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveMessageFromInjectedBundle): Handle the new
mouseScrollByWithWheelAndMomentumPhases message.
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Handle the
new mouseScrollByWithWheelAndMomentumPhases.
* WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Provide stub that
relays to the standard mouse wheel handler.
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto.
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Provide implementation
of mouse wheel gesture method.

LayoutTests: 

Add a series of tests to cover desired behavior with wheel events (including momentum).
This behavior is specific to the Mac platform, so is limited to the platform/mac and
platform/mac-wk2 directories.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacEventSendingControllermm">trunk/Tools/DumpRenderTree/mac/EventSendingController.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerEventSenderProxyh">trunk/Tools/WebKitTestRunner/EventSenderProxy.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsEventSendingControlleridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleEventSendingControllercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleEventSendingControllerh">trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleiosEventSenderProxyIOSmm">trunk/Tools/WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnereflEventSenderProxyEflcpp">trunk/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnergtkEventSenderProxyGtkcpp">trunk/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacEventSenderProxymm">trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/mac/fast/scrolling/</li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolldivlatcheddivexpectedtxt">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolldivlatcheddivhtml">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolldivlatchedmainframeexpectedtxt">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolldivlatchedmainframehtml">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolliframelatchediframeexpectedtxt">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolliframelatchediframehtml">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolliframelatchedmainframeexpectedtxt">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrolliframelatchedmainframehtml">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedmainframeexpectedtxt">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedmainframehtml">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedselectexpectedtxt">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedselecthtml">trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-expected.txt</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="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframeexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-expected.txt</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="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframeexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframewithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler-expected.txt</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="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframeexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-expected.txt</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="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframeexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-expected.txt</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="#trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-expected.txt</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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/LayoutTests/ChangeLog        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2014-02-13  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Create some latched scrolling tests.
+        https://bugs.webkit.org/show_bug.cgi?id=127606
+        &lt;rdar://problem/15911348&gt;
+
+        Reviewed by Simon Fraser.
+
+        Add a series of tests to cover desired behavior with wheel events (including momentum).
+        This behavior is specific to the Mac platform, so is limited to the platform/mac and
+        platform/mac-wk2 directories.
+
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html: Added.
+        * platform/mac/fast/scrolling: Added.
+        * platform/mac/fast/scrolling/scroll-div-latched-div-expected.txt: Added.
+        * platform/mac/fast/scrolling/scroll-div-latched-div.html: Added.
+        * platform/mac/fast/scrolling/scroll-div-latched-mainframe-expected.txt: Added.
+        * platform/mac/fast/scrolling/scroll-div-latched-mainframe.html: Added.
+        * platform/mac/fast/scrolling/scroll-iframe-latched-iframe-expected.txt: Added.
+        * platform/mac/fast/scrolling/scroll-iframe-latched-iframe.html: Added.
+        * platform/mac/fast/scrolling/scroll-iframe-latched-mainframe-expected.txt: Added.
+        * platform/mac/fast/scrolling/scroll-iframe-latched-mainframe.html: Added.
+        * platform/mac/fast/scrolling/scroll-select-latched-mainframe-expected.txt: Added.
+        * platform/mac/fast/scrolling/scroll-select-latched-mainframe.html: Added.
+        * platform/mac/fast/scrolling/scroll-select-latched-select-expected.txt: Added.
+        * platform/mac/fast/scrolling/scroll-select-latched-select.html: Added.
+
</ins><span class="cx"> 2014-02-13  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolldivlatcheddivexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Region
+
+Count        DATA        Rev Count
+TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP
+1        0.1100        40
+2        0.1155        39
+3        0.2200        38
+4        0.2255        37
+5        0.3300        36
+6        0.3355        35
+7        0.4400        34
+8        0.4455        33
+9        0.5500        32
+10        0.5555        31
+11        0.6600        30
+12        0.6655        29
+13        0.7700        28
+14        0.7755        27
+15        0.8800        26
+16        0.8855        25
+17        0.9900        24
+18        0.9955        23
+19        0.9999        22
+20        1.0000        21
+21        1.0000        20
+22        0.9999        19
+23        0.9955        18
+24        0.9900        17
+25        0.8855        16
+26        0.8800        15
+27        0.7755        14
+28        0.7700        13
+29        0.6655        12
+30        0.6600        11
+31        0.5555        10
+32        0.5500        9
+33        0.4455        8
+34        0.4400        7
+35        0.3355        6
+36        0.3300        5
+37        0.2255        4
+38        0.2200        3
+39        0.1155        2
+40        0.1100        1
+END END END END END        END END END END END        END END END END END
+Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+div display height = 485
+Mouse moved to (28, 610)
+Page before: 0, div before: 451
+Page after:  0, div after: 451
+PASS Page did not receive wheel events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolldivlatcheddivhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-div.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,168 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var divTarget;
+var pageScrollPositionBefore;
+var divScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The div should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var divScrollPositionAfter = divTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, div before: &quot; + divScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, div after: &quot; + divScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    divTarget = document.getElementById('target');
+    divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
+
+    divScrollPositionBefore = divTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = divTarget.offsetLeft + 20;
+    debug(&quot;div display height = &quot; + divTarget.clientHeight);
+    var startPosY = divTarget.offsetTop + divTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the div.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;div class=&quot;scrollable_region&quot;&gt;
+        &lt;h3&gt;Scrollable Region&lt;/h3&gt;
+        &lt;div id=&quot;target&quot; style='overflow-y: auto; overflow-x: hidden; max-height: 485px;'&gt;
+            &lt;table class=&quot;table&quot; style='width: 99%'&gt;
+                &lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;DATA&lt;/th&gt;&lt;th&gt;Rev Count&lt;/th&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolldivlatchedmainframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Region
+
+Count        DATA        Rev Count
+TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP
+1        0.1100        40
+2        0.1155        39
+3        0.2200        38
+4        0.2255        37
+5        0.3300        36
+6        0.3355        35
+7        0.4400        34
+8        0.4455        33
+9        0.5500        32
+10        0.5555        31
+11        0.6600        30
+12        0.6655        29
+13        0.7700        28
+14        0.7755        27
+15        0.8800        26
+16        0.8855        25
+17        0.9900        24
+18        0.9955        23
+19        0.9999        22
+20        1.0000        21
+21        1.0000        20
+22        0.9999        19
+23        0.9955        18
+24        0.9900        17
+25        0.8855        16
+26        0.8800        15
+27        0.7755        14
+28        0.7700        13
+29        0.6655        12
+30        0.6600        11
+31        0.5555        10
+32        0.5500        9
+33        0.4455        8
+34        0.4400        7
+35        0.3355        6
+36        0.3300        5
+37        0.2255        4
+38        0.2200        3
+39        0.1155        2
+40        0.1100        1
+END END END END END        END END END END END        END END END END END
+Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (28, 125)
+Page before: 0, div before: 0
+Page after:  320, div after: 0
+PASS Scrollable div did not receive wheel events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolldivlatchedmainframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-div-latched-mainframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,166 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var divTarget;
+var pageScrollPositionBefore;
+var divScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The div should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var divScrollPositionAfter = divTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, div before: &quot; + divScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, div after: &quot; + divScrollPositionAfter);
+
+    if (divScrollPositionBefore != divScrollPositionAfter)
+        testFailed(&quot;Scrollable div consumed wheel events.&quot;);
+    else
+        testPassed(&quot;Scrollable div did not receive wheel events.&quot;);
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    divTarget = document.getElementById('target');
+
+    divScrollPositionBefore = divTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = divTarget.offsetLeft + 20;
+    var startPosY = divTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the div.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;div class=&quot;scrollable_region&quot;&gt;
+        &lt;h3&gt;Scrollable Region&lt;/h3&gt;
+        &lt;div id=&quot;target&quot; style='overflow-y: auto; overflow-x: hidden; max-height: 485px;'&gt;
+            &lt;table class=&quot;table&quot; style='width: 99%'&gt;
+                &lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;DATA&lt;/th&gt;&lt;th&gt;Rev Count&lt;/th&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolliframelatchediframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Put mouse here and flick downwards
+
+Tests that iframe doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+IFrame display height = 500
+Mouse moved to (28, 566)
+Page before: 0, IFrame before: 416
+Page after:  0, IFrame after: 416
+PASS Page did not receive wheel events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolliframelatchediframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-iframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,108 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
+&lt;script src=&quot;../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+var iframeTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, IFrame before: &quot; + iFrameScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, IFrame after: &quot; + iFrameScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    var iFrameBody = window.frames['target'].document.body;
+    iFrameBody.scrollTop = iFrameBody.scrollHeight - iframeTarget.clientHeight - 100;
+
+    iFrameScrollPositionBefore = iFrameBody.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = iframeTarget.offsetLeft + 20;
+    debug(&quot;IFrame display height = &quot; + iframeTarget.clientHeight);
+    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;inside the IFrame, then use the mouse wheel or a two-finger swipe to scroll the IFrame to the bottom (and beyond).&lt;br/&gt;&quot;
+            + &quot;&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;iframe id=&quot;target&quot; name=&quot;target&quot; style=&quot;border:solid 1px green; height: 500px; width: 500px;&quot; 
+     src= &quot;data:text/html,
+     &lt;div id='notToBeScrolled' style='height: 1000px; width: 1000px;'&gt;
+     TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP&lt;br/&gt;&lt;br/&gt;
+     This should still be visible inside the frame after you scroll down
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     This should NOT be visible inside the frame after you scroll down&lt;br/&gt;
+     &lt;br/&gt;
+     END END END END END END END END END END END END END
+     &lt;/div&gt;
+     &quot;
+     onload=&quot;setupTopLevel();&quot;
+     &gt;
+    &lt;/iframe&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that iframe doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolliframelatchedmainframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Put mouse here and flick downwards
+
+Tests that iframe doesn't consume wheel events when scroll
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (28, 66)
+Page before: 0, IFrame before: 0
+Page after:  320, IFrame after: 0
+PASS IFrame did not receive wheel events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrolliframelatchedmainframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-iframe-latched-mainframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
+&lt;script src=&quot;../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+var iframeTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, IFrame before: &quot; + iFrameScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, IFrame after: &quot; + iFrameScrollPositionAfter);
+
+    if (iFrameScrollPositionBefore != iFrameScrollPositionAfter)
+        testFailed(&quot;IFrame consumed wheel events.&quot;);
+    else
+        testPassed(&quot;IFrame did not receive wheel events.&quot;);
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+    iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = iframeTarget.offsetLeft + 20;
+    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
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the IFrame.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;iframe id=&quot;target&quot; name=&quot;target&quot; style=&quot;border:solid 1px green; height: 500px; width: 500px;&quot; 
+     src= &quot;data:text/html,
+     &lt;div id='notToBeScrolled' style='height: 1000px; width: 1000px;'&gt;
+     TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP&lt;br/&gt;&lt;br/&gt;
+     This should still be visible inside the frame after you scroll down
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     This should NOT be visible inside the frame after you scroll down&lt;br/&gt;
+     &lt;br/&gt;
+     END END END END END END END END END END END END END
+     &lt;/div&gt;
+     &quot;
+     onload=&quot;setupTopLevel();&quot;
+     &gt;
+    &lt;/iframe&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that iframe doesn't consume wheel events when scroll &quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedmainframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Select
+
+
+Tests that a select doesn't consume wheel events when scroll is latched to main frame.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (30, 127)
+Page before: 0, select before: 0
+Page after:  320, select after: 0
+PASS Select did not receive wheel events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedmainframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-mainframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,143 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var selectTarget;
+var pageScrollPositionBefore;
+var selectScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The select should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var selectScrollPositionAfter = selectTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, select before: &quot; + selectScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, select after: &quot; + selectScrollPositionAfter);
+
+    if (selectScrollPositionBefore != selectScrollPositionAfter)
+        testFailed(&quot;Select consumed wheel events.&quot;);
+    else
+        testPassed(&quot;Select did not receive wheel events.&quot;);
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    selectTarget = document.getElementById('target');
+
+    selectScrollPositionBefore = selectTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = selectTarget.offsetLeft + 20;
+    var startPosY = selectTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down&lt;br/&gt;&quot;
+            + &quot;past the selectTarget.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the 'content21' label if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+        &lt;div class=&quot;scrollable_region&quot;&gt;
+            &lt;h3&gt;Scrollable Select&lt;/h3&gt;
+            &lt;select id=&quot;target&quot; class=&quot;scrollable_select&quot; size=&quot;8&quot;&gt;
+                &lt;option&gt;content1&lt;/option&gt;
+                &lt;option&gt;content2&lt;/option&gt;
+                &lt;option&gt;content3&lt;/option&gt;
+                &lt;option&gt;content4&lt;/option&gt;
+                &lt;option&gt;content5&lt;/option&gt;
+                &lt;option&gt;content6&lt;/option&gt;
+                &lt;option&gt;content7&lt;/option&gt;
+                &lt;option&gt;content8&lt;/option&gt;
+                &lt;option&gt;content9&lt;/option&gt;
+                &lt;option&gt;content10&lt;/option&gt;
+                &lt;option&gt;content11&lt;/option&gt;
+                &lt;option&gt;content12&lt;/option&gt;
+                &lt;option&gt;content13&lt;/option&gt;
+                &lt;option&gt;content14&lt;/option&gt;
+                &lt;option&gt;content15&lt;/option&gt;
+                &lt;option&gt;content16&lt;/option&gt;
+                &lt;option&gt;content17&lt;/option&gt;
+                &lt;option&gt;content18&lt;/option&gt;
+                &lt;option&gt;content19&lt;/option&gt;
+                &lt;option&gt;content20&lt;/option&gt;
+                &lt;option&gt;content21&lt;/option&gt;
+            &lt;/select&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a select doesn't consume wheel events when scroll is latched to main frame.&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedselectexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Select
+
+
+Tests that a select doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+div display height = 111
+Mouse moved to (30, 238)
+Page before: 0, select before: 70
+Page after:  0, select after: 182
+PASS Page did not receive wheel events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingscrollselectlatchedselecthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/scroll-select-latched-select.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,145 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var selectTarget;
+var pageScrollPositionBefore;
+var selectScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The page should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var selectScrollPositionAfter = selectTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, select before: &quot; + selectScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, select after: &quot; + selectScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    selectTarget = document.getElementById('target');
+    selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100;
+
+    selectScrollPositionBefore = selectTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = selectTarget.offsetLeft + 20;
+    debug(&quot;div display height = &quot; + selectTarget.clientHeight);
+    var startPosY = selectTarget.offsetTop + selectTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;inside the select box, and scroll near (but not AT) the bottom of the range. Use the mouse wheel or a two-finger&lt;br/&gt;&quot;
+            + &quot;swipe to scroll through the rest of the select options.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the page position change if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+        &lt;div class=&quot;scrollable_region&quot;&gt;
+            &lt;h3&gt;Scrollable Select&lt;/h3&gt;
+            &lt;select id=&quot;target&quot; class=&quot;scrollable_select&quot; size=&quot;8&quot;&gt;
+                &lt;option&gt;content1&lt;/option&gt;
+                &lt;option&gt;content2&lt;/option&gt;
+                &lt;option&gt;content3&lt;/option&gt;
+                &lt;option&gt;content4&lt;/option&gt;
+                &lt;option&gt;content5&lt;/option&gt;
+                &lt;option&gt;content6&lt;/option&gt;
+                &lt;option&gt;content7&lt;/option&gt;
+                &lt;option&gt;content8&lt;/option&gt;
+                &lt;option&gt;content9&lt;/option&gt;
+                &lt;option&gt;content10&lt;/option&gt;
+                &lt;option&gt;content11&lt;/option&gt;
+                &lt;option&gt;content12&lt;/option&gt;
+                &lt;option&gt;content13&lt;/option&gt;
+                &lt;option&gt;content14&lt;/option&gt;
+                &lt;option&gt;content15&lt;/option&gt;
+                &lt;option&gt;content16&lt;/option&gt;
+                &lt;option&gt;content17&lt;/option&gt;
+                &lt;option&gt;content18&lt;/option&gt;
+                &lt;option&gt;content19&lt;/option&gt;
+                &lt;option&gt;content20&lt;/option&gt;
+                &lt;option&gt;content21&lt;/option&gt;
+            &lt;/select&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a select doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Region
+
+Count        DATA        Rev Count
+TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP
+1        0.1100        40
+2        0.1155        39
+3        0.2200        38
+4        0.2255        37
+5        0.3300        36
+6        0.3355        35
+7        0.4400        34
+8        0.4455        33
+9        0.5500        32
+10        0.5555        31
+11        0.6600        30
+12        0.6655        29
+13        0.7700        28
+14        0.7755        27
+15        0.8800        26
+16        0.8855        25
+17        0.9900        24
+18        0.9955        23
+19        0.9999        22
+20        1.0000        21
+21        1.0000        20
+22        0.9999        19
+23        0.9955        18
+24        0.9900        17
+25        0.8855        16
+26        0.8800        15
+27        0.7755        14
+28        0.7700        13
+29        0.6655        12
+30        0.6600        11
+31        0.5555        10
+32        0.5500        9
+33        0.4455        8
+34        0.4400        7
+35        0.3355        6
+36        0.3300        5
+37        0.2255        4
+38        0.2200        3
+39        0.1155        2
+40        0.1100        1
+END END END END END        END END END END END        END END END END END
+Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+div display height = 485
+Mouse moved to (28, 610)
+Page before: 0, div before: 451
+Page after:  0, div after: 451
+PASS Page did not receive wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2326.00)
+  (visible rect 0.00, 0.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2326.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivwithhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Region
+
+Count        DATA        Rev Count
+TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP
+1        0.1100        40
+2        0.1155        39
+3        0.2200        38
+4        0.2255        37
+5        0.3300        36
+6        0.3355        35
+7        0.4400        34
+8        0.4455        33
+9        0.5500        32
+10        0.5555        31
+11        0.6600        30
+12        0.6655        29
+13        0.7700        28
+14        0.7755        27
+15        0.8800        26
+16        0.8855        25
+17        0.9900        24
+18        0.9955        23
+19        0.9999        22
+20        1.0000        21
+21        1.0000        20
+22        0.9999        19
+23        0.9955        18
+24        0.9900        17
+25        0.8855        16
+26        0.8800        15
+27        0.7755        14
+28        0.7700        13
+29        0.6655        12
+30        0.6600        11
+31        0.5555        10
+32        0.5500        9
+33        0.4455        8
+34        0.4400        7
+35        0.3355        6
+36        0.3300        5
+37        0.2255        4
+38        0.2200        3
+39        0.1155        2
+40        0.1100        1
+END END END END END        END END END END END        END END END END END
+Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+div display height = 485
+Mouse moved to (28, 610)
+Page before: 0, div before: 451
+Page after:  0, div after: 451
+PASS Page did not receive wheel events.
+Document was initial target for 0 of the wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2341.00)
+  (visible rect 0.00, 0.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2341.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivwithhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,182 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var wheelCount = 0;
+function onScrollWheel(evt) {
+    wheelCount = wheelCount + 1;
+}
+
+function onLoad() {
+    document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var divTarget;
+var pageScrollPositionBefore;
+var divScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The div should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var divScrollPositionAfter = divTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, div before: &quot; + divScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, div after: &quot; + divScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    debug(&quot;Document was initial target for &quot; + wheelCount + &quot; of the wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    divTarget = document.getElementById('target');
+    divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
+
+    divScrollPositionBefore = divTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = divTarget.offsetLeft + 20;
+    debug(&quot;div display height = &quot; + divTarget.clientHeight);
+    var startPosY = divTarget.offsetTop + divTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the div.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;div class=&quot;scrollable_region&quot;&gt;
+        &lt;h3&gt;Scrollable Region&lt;/h3&gt;
+        &lt;div id=&quot;target&quot; style='overflow-y: auto; overflow-x: hidden; max-height: 485px;'&gt;
+            &lt;table class=&quot;table&quot; style='width: 99%'&gt;
+                &lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;DATA&lt;/th&gt;&lt;th&gt;Rev Count&lt;/th&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatcheddivhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,174 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var divTarget;
+var pageScrollPositionBefore;
+var divScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The div should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var divScrollPositionAfter = divTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, div before: &quot; + divScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, div after: &quot; + divScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    divTarget = document.getElementById('target');
+    divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
+
+    divScrollPositionBefore = divTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = divTarget.offsetLeft + 20;
+    debug(&quot;div display height = &quot; + divTarget.clientHeight);
+    var startPosY = divTarget.offsetTop + divTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the div.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;div class=&quot;scrollable_region&quot;&gt;
+        &lt;h3&gt;Scrollable Region&lt;/h3&gt;
+        &lt;div id=&quot;target&quot; style='overflow-y: auto; overflow-x: hidden; max-height: 485px;'&gt;
+            &lt;table class=&quot;table&quot; style='width: 99%'&gt;
+                &lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;DATA&lt;/th&gt;&lt;th&gt;Rev Count&lt;/th&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Region
+
+Count        DATA        Rev Count
+TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP
+1        0.1100        40
+2        0.1155        39
+3        0.2200        38
+4        0.2255        37
+5        0.3300        36
+6        0.3355        35
+7        0.4400        34
+8        0.4455        33
+9        0.5500        32
+10        0.5555        31
+11        0.6600        30
+12        0.6655        29
+13        0.7700        28
+14        0.7755        27
+15        0.8800        26
+16        0.8855        25
+17        0.9900        24
+18        0.9955        23
+19        0.9999        22
+20        1.0000        21
+21        1.0000        20
+22        0.9999        19
+23        0.9955        18
+24        0.9900        17
+25        0.8855        16
+26        0.8800        15
+27        0.7755        14
+28        0.7700        13
+29        0.6655        12
+30        0.6600        11
+31        0.5555        10
+32        0.5500        9
+33        0.4455        8
+34        0.4400        7
+35        0.3355        6
+36        0.3300        5
+37        0.2255        4
+38        0.2200        3
+39        0.1155        2
+40        0.1100        1
+END END END END END        END END END END END        END END END END END
+Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (28, 125)
+Page before: 0, div before: 0
+Page after:  280, div after: 0
+PASS Scrollable div did not receive wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2311.00)
+  (visible rect 0.00, 280.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2311.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 280.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframewithhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Region
+
+Count        DATA        Rev Count
+TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP        TOP TOP TOP TOP TOP
+1        0.1100        40
+2        0.1155        39
+3        0.2200        38
+4        0.2255        37
+5        0.3300        36
+6        0.3355        35
+7        0.4400        34
+8        0.4455        33
+9        0.5500        32
+10        0.5555        31
+11        0.6600        30
+12        0.6655        29
+13        0.7700        28
+14        0.7755        27
+15        0.8800        26
+16        0.8855        25
+17        0.9900        24
+18        0.9955        23
+19        0.9999        22
+20        1.0000        21
+21        1.0000        20
+22        0.9999        19
+23        0.9955        18
+24        0.9900        17
+25        0.8855        16
+26        0.8800        15
+27        0.7755        14
+28        0.7700        13
+29        0.6655        12
+30        0.6600        11
+31        0.5555        10
+32        0.5500        9
+33        0.4455        8
+34        0.4400        7
+35        0.3355        6
+36        0.3300        5
+37        0.2255        4
+38        0.2200        3
+39        0.1155        2
+40        0.1100        1
+END END END END END        END END END END END        END END END END END
+Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (28, 125)
+Page before: 0, div before: 0
+Page after:  280, div after: 0
+PASS Scrollable div did not receive wheel events.
+Document was initial target for 4 of the wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2326.00)
+  (visible rect 0.00, 280.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2326.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 280.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframewithhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,180 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var wheelCount = 0;
+function onScrollWheel(evt) {
+    wheelCount = wheelCount + 1;
+}
+
+function onLoad() {
+    document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var divTarget;
+var pageScrollPositionBefore;
+var divScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The div should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var divScrollPositionAfter = divTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, div before: &quot; + divScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, div after: &quot; + divScrollPositionAfter);
+
+    if (divScrollPositionBefore != divScrollPositionAfter)
+        testFailed(&quot;Scrollable div consumed wheel events.&quot;);
+    else
+        testPassed(&quot;Scrollable div did not receive wheel events.&quot;);
+
+    debug(&quot;Document was initial target for &quot; + wheelCount + &quot; of the wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    divTarget = document.getElementById('target');
+
+    divScrollPositionBefore = divTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = divTarget.offsetLeft + 20;
+    var startPosY = divTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the div.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;div class=&quot;scrollable_region&quot;&gt;
+        &lt;h3&gt;Scrollable Region&lt;/h3&gt;
+        &lt;div id=&quot;target&quot; style='overflow-y: auto; overflow-x: hidden; max-height: 485px;'&gt;
+            &lt;table class=&quot;table&quot; style='width: 99%'&gt;
+                &lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;DATA&lt;/th&gt;&lt;th&gt;Rev Count&lt;/th&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolldivlatchedmainframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,172 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var divTarget;
+var pageScrollPositionBefore;
+var divScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The div should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var divScrollPositionAfter = divTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, div before: &quot; + divScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, div after: &quot; + divScrollPositionAfter);
+
+    if (divScrollPositionBefore != divScrollPositionAfter)
+        testFailed(&quot;Scrollable div consumed wheel events.&quot;);
+    else
+        testPassed(&quot;Scrollable div did not receive wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    divTarget = document.getElementById('target');
+
+    divScrollPositionBefore = divTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = divTarget.offsetLeft + 20;
+    var startPosY = divTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the div.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;div class=&quot;scrollable_region&quot;&gt;
+        &lt;h3&gt;Scrollable Region&lt;/h3&gt;
+        &lt;div id=&quot;target&quot; style='overflow-y: auto; overflow-x: hidden; max-height: 485px;'&gt;
+            &lt;table class=&quot;table&quot; style='width: 99%'&gt;
+                &lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;DATA&lt;/th&gt;&lt;th&gt;Rev Count&lt;/th&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;td&gt;TOP TOP TOP TOP TOP&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;1.0000&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;0.9999&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;0.9955&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;0.9900&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;0.8855&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;0.8800&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;0.7755&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;0.7700&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;0.6655&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;0.6600&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;0.5555&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;0.5500&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;0.4455&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;0.4400&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;0.3355&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;0.3300&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;0.2255&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;0.2200&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;0.1155&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.1100&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
+                &lt;tr&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;td&gt;END END END END END&lt;/td&gt;&lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+Put mouse here and flick downwards
+
+Tests that iframe doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+IFrame display height = 500
+Mouse moved to (28, 566)
+Page before: 0, IFrame before: 416
+Page after:  0, IFrame after: 531
+PASS Page did not receive wheel events.
+(GraphicsLayer
+  (bounds 785.00 2326.00)
+  (visible rect 0.00, 0.00 785.00 x 600.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 2326.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 600.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 785 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframewithhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+Put mouse here and flick downwards
+
+Tests that iframe doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+IFrame display height = 500
+Mouse moved to (28, 566)
+Page before: 0, IFrame before: 416
+Page after:  0, IFrame after: 531
+PASS Page did not receive wheel events.
+Document was initial target for 0 of the wheel events.
+(GraphicsLayer
+  (bounds 785.00 2341.00)
+  (visible rect 0.00, 0.00 785.00 x 600.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 2341.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 600.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 785 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframewithhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,126 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var wheelCount = 0;
+function onScrollWheel(evt) {
+    wheelCount = wheelCount + 1;
+}
+
+function onLoad() {
+    document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var iframeTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, IFrame before: &quot; + iFrameScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, IFrame after: &quot; + iFrameScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    debug(&quot;Document was initial target for &quot; + wheelCount + &quot; of the wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    var iFrameBody = window.frames['target'].document.body;
+    iFrameBody.scrollTop = iFrameBody.scrollHeight - iframeTarget.clientHeight - 100;
+
+    iFrameScrollPositionBefore = iFrameBody.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = iframeTarget.offsetLeft + 20;
+    debug(&quot;IFrame display height = &quot; + iframeTarget.clientHeight);
+    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;inside the IFrame, then use the mouse wheel or a two-finger swipe to scroll the IFrame to the bottom (and beyond).&lt;br/&gt;&quot;
+            + &quot;&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;iframe id=&quot;target&quot; name=&quot;target&quot; style=&quot;border:solid 1px green; height: 500px; width: 500px;&quot; 
+     src= &quot;data:text/html,
+     &lt;div id='notToBeScrolled' style='height: 1000px; width: 1000px;'&gt;
+     TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP&lt;br/&gt;&lt;br/&gt;
+     This should still be visible inside the frame after you scroll down
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     This should NOT be visible inside the frame after you scroll down&lt;br/&gt;
+     &lt;br/&gt;
+     END END END END END END END END END END END END END
+     &lt;/div&gt;
+     &quot;
+     onload=&quot;setupTopLevel();&quot;
+     &gt;
+    &lt;/iframe&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that iframe doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchediframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+var iframeTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, IFrame before: &quot; + iFrameScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, IFrame after: &quot; + iFrameScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    var iFrameBody = window.frames['target'].document.body;
+    iFrameBody.scrollTop = iFrameBody.scrollHeight - iframeTarget.clientHeight - 100;
+
+    iFrameScrollPositionBefore = iFrameBody.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = iframeTarget.offsetLeft + 20;
+    debug(&quot;IFrame display height = &quot; + iframeTarget.clientHeight);
+    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;inside the IFrame, then use the mouse wheel or a two-finger swipe to scroll the IFrame to the bottom (and beyond).&lt;br/&gt;&quot;
+            + &quot;&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;iframe id=&quot;target&quot; name=&quot;target&quot; style=&quot;border:solid 1px green; height: 500px; width: 500px;&quot; 
+     src= &quot;data:text/html,
+     &lt;div id='notToBeScrolled' style='height: 1000px; width: 1000px;'&gt;
+     TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP&lt;br/&gt;&lt;br/&gt;
+     This should still be visible inside the frame after you scroll down
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     This should NOT be visible inside the frame after you scroll down&lt;br/&gt;
+     &lt;br/&gt;
+     END END END END END END END END END END END END END
+     &lt;/div&gt;
+     &quot;
+     onload=&quot;setupTopLevel();&quot;
+     &gt;
+    &lt;/iframe&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that iframe doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+Put mouse here and flick downwards
+
+Tests that iframe doesn't consume wheel events when scroll
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (28, 66)
+Page before: 0, IFrame before: 0
+Page after:  280, IFrame after: 0
+PASS IFrame did not receive wheel events.
+(GraphicsLayer
+  (bounds 785.00 2311.00)
+  (visible rect 0.00, 280.00 785.00 x 600.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 2311.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 280.00 785.00 x 600.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 785 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframewithhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+Put mouse here and flick downwards
+
+Tests that iframe doesn't consume wheel events when scroll
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (28, 66)
+Page before: 0, IFrame before: 0
+Page after:  280, IFrame after: 0
+PASS IFrame did not receive wheel events.
+Document was initial target for 4 of the wheel events.
+(GraphicsLayer
+  (bounds 785.00 2326.00)
+  (visible rect 0.00, 280.00 785.00 x 600.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 2326.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 280.00 785.00 x 600.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 785 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframewithhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,121 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var wheelCount = 0;
+function onScrollWheel(evt) {
+    wheelCount = wheelCount + 1;
+}
+
+function onLoad() {
+    document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var iframeTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, IFrame before: &quot; + iFrameScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, IFrame after: &quot; + iFrameScrollPositionAfter);
+
+    if (iFrameScrollPositionBefore != iFrameScrollPositionAfter)
+        testFailed(&quot;IFrame consumed wheel events.&quot;);
+    else
+        testPassed(&quot;IFrame did not receive wheel events.&quot;);
+
+    debug(&quot;Document was initial target for &quot; + wheelCount + &quot; of the wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+    iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = iframeTarget.offsetLeft + 20;
+    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
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the IFrame.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;iframe id=&quot;target&quot; name=&quot;target&quot; style=&quot;border:solid 1px green; height: 500px; width: 500px;&quot; 
+     src= &quot;data:text/html,
+     &lt;div id='notToBeScrolled' style='height: 1000px; width: 1000px;'&gt;
+     TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP&lt;br/&gt;&lt;br/&gt;
+     This should still be visible inside the frame after you scroll down
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     This should NOT be visible inside the frame after you scroll down&lt;br/&gt;
+     &lt;br/&gt;
+     END END END END END END END END END END END END END
+     &lt;/div&gt;
+     &quot;
+     onload=&quot;setupTopLevel();&quot;
+     &gt;
+    &lt;/iframe&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that iframe doesn't consume wheel events when scroll &quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrolliframelatchedmainframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+var iframeTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, IFrame before: &quot; + iFrameScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, IFrame after: &quot; + iFrameScrollPositionAfter);
+
+    if (iFrameScrollPositionBefore != iFrameScrollPositionAfter)
+        testFailed(&quot;IFrame consumed wheel events.&quot;);
+    else
+        testPassed(&quot;IFrame did not receive wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+    iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = iframeTarget.offsetLeft + 20;
+    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
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the&lt;br/&gt;&quot;
+            + &quot;down past the IFrame.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the row of END labels if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+    &lt;iframe id=&quot;target&quot; name=&quot;target&quot; style=&quot;border:solid 1px green; height: 500px; width: 500px;&quot; 
+     src= &quot;data:text/html,
+     &lt;div id='notToBeScrolled' style='height: 1000px; width: 1000px;'&gt;
+     TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP&lt;br/&gt;&lt;br/&gt;
+     This should still be visible inside the frame after you scroll down
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
+     This should NOT be visible inside the frame after you scroll down&lt;br/&gt;
+     &lt;br/&gt;
+     END END END END END END END END END END END END END
+     &lt;/div&gt;
+     &quot;
+     onload=&quot;setupTopLevel();&quot;
+     &gt;
+    &lt;/iframe&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that iframe doesn't consume wheel events when scroll &quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Select
+
+
+Tests that a select doesn't consume wheel events when scroll is latched to main frame.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (30, 127)
+Page before: 0, select before: 0
+Page after:  280, select after: 0
+PASS Select did not receive wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2311.00)
+  (visible rect 0.00, 280.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2311.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 280.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframewithhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Select
+
+
+Tests that a select doesn't consume wheel events when scroll is latched to main frame.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Mouse moved to (30, 127)
+Page before: 0, select before: 0
+Page after:  280, select after: 0
+PASS Select did not receive wheel events.
+Document was initial target for 4 of the wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2326.00)
+  (visible rect 0.00, 280.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2326.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 280.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframewithhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,157 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var wheelCount = 0;
+function onScrollWheel(evt) {
+    wheelCount = wheelCount + 1;
+}
+
+function onLoad() {
+    document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var selectTarget;
+var pageScrollPositionBefore;
+var selectScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The select should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var selectScrollPositionAfter = selectTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, select before: &quot; + selectScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, select after: &quot; + selectScrollPositionAfter);
+
+    if (selectScrollPositionBefore != selectScrollPositionAfter)
+        testFailed(&quot;Select consumed wheel events.&quot;);
+    else
+        testPassed(&quot;Select did not receive wheel events.&quot;);
+
+    debug(&quot;Document was initial target for &quot; + wheelCount + &quot; of the wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    selectTarget = document.getElementById('target');
+
+    selectScrollPositionBefore = selectTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = selectTarget.offsetLeft + 20;
+    var startPosY = selectTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down&lt;br/&gt;&quot;
+            + &quot;past the selectTarget.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the 'content21' label if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+        &lt;div class=&quot;scrollable_region&quot;&gt;
+            &lt;h3&gt;Scrollable Select&lt;/h3&gt;
+            &lt;select id=&quot;target&quot; class=&quot;scrollable_select&quot; size=&quot;8&quot;&gt;
+                &lt;option&gt;content1&lt;/option&gt;
+                &lt;option&gt;content2&lt;/option&gt;
+                &lt;option&gt;content3&lt;/option&gt;
+                &lt;option&gt;content4&lt;/option&gt;
+                &lt;option&gt;content5&lt;/option&gt;
+                &lt;option&gt;content6&lt;/option&gt;
+                &lt;option&gt;content7&lt;/option&gt;
+                &lt;option&gt;content8&lt;/option&gt;
+                &lt;option&gt;content9&lt;/option&gt;
+                &lt;option&gt;content10&lt;/option&gt;
+                &lt;option&gt;content11&lt;/option&gt;
+                &lt;option&gt;content12&lt;/option&gt;
+                &lt;option&gt;content13&lt;/option&gt;
+                &lt;option&gt;content14&lt;/option&gt;
+                &lt;option&gt;content15&lt;/option&gt;
+                &lt;option&gt;content16&lt;/option&gt;
+                &lt;option&gt;content17&lt;/option&gt;
+                &lt;option&gt;content18&lt;/option&gt;
+                &lt;option&gt;content19&lt;/option&gt;
+                &lt;option&gt;content20&lt;/option&gt;
+                &lt;option&gt;content21&lt;/option&gt;
+            &lt;/select&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a select doesn't consume wheel events when scroll is latched to main frame.&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedmainframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var selectTarget;
+var pageScrollPositionBefore;
+var selectScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The select should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var selectScrollPositionAfter = selectTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, select before: &quot; + selectScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, select after: &quot; + selectScrollPositionAfter);
+
+    if (selectScrollPositionBefore != selectScrollPositionAfter)
+        testFailed(&quot;Select consumed wheel events.&quot;);
+    else
+        testPassed(&quot;Select did not receive wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    selectTarget = document.getElementById('target');
+
+    selectScrollPositionBefore = selectTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = selectTarget.offsetLeft + 20;
+    var startPosY = selectTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down&lt;br/&gt;&quot;
+            + &quot;past the selectTarget.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the 'content21' label if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+        &lt;div class=&quot;scrollable_region&quot;&gt;
+            &lt;h3&gt;Scrollable Select&lt;/h3&gt;
+            &lt;select id=&quot;target&quot; class=&quot;scrollable_select&quot; size=&quot;8&quot;&gt;
+                &lt;option&gt;content1&lt;/option&gt;
+                &lt;option&gt;content2&lt;/option&gt;
+                &lt;option&gt;content3&lt;/option&gt;
+                &lt;option&gt;content4&lt;/option&gt;
+                &lt;option&gt;content5&lt;/option&gt;
+                &lt;option&gt;content6&lt;/option&gt;
+                &lt;option&gt;content7&lt;/option&gt;
+                &lt;option&gt;content8&lt;/option&gt;
+                &lt;option&gt;content9&lt;/option&gt;
+                &lt;option&gt;content10&lt;/option&gt;
+                &lt;option&gt;content11&lt;/option&gt;
+                &lt;option&gt;content12&lt;/option&gt;
+                &lt;option&gt;content13&lt;/option&gt;
+                &lt;option&gt;content14&lt;/option&gt;
+                &lt;option&gt;content15&lt;/option&gt;
+                &lt;option&gt;content16&lt;/option&gt;
+                &lt;option&gt;content17&lt;/option&gt;
+                &lt;option&gt;content18&lt;/option&gt;
+                &lt;option&gt;content19&lt;/option&gt;
+                &lt;option&gt;content20&lt;/option&gt;
+                &lt;option&gt;content21&lt;/option&gt;
+            &lt;/select&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a select doesn't consume wheel events when scroll is latched to main frame.&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Select
+
+
+Tests that a select doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+div display height = 111
+Mouse moved to (30, 238)
+Page before: 0, select before: 70
+Page after:  0, select after: 182
+PASS Page did not receive wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2326.00)
+  (visible rect 0.00, 0.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2326.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectwithhandlerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+Put mouse here and flick downwards
+Scrollable Select
+
+
+Tests that a select doesn't pass wheel events to main frame when scrolling at bottom
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+div display height = 111
+Mouse moved to (30, 238)
+Page before: 0, select before: 70
+Page after:  0, select after: 182
+PASS Page did not receive wheel events.
+Document was initial target for 4 of the wheel events.
+(GraphicsLayer
+  (bounds 2008.00 2341.00)
+  (visible rect 0.00, 0.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 2008.00 2341.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 585.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 2008 x 2048)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 4 x 4)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselectwithhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var wheelCount = 0;
+function onScrollWheel(evt) {
+    wheelCount = wheelCount + 1;
+}
+
+function onLoad() {
+    document.addEventListener(&quot;mousewheel&quot;, onScrollWheel);
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var selectTarget;
+var pageScrollPositionBefore;
+var selectScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The page should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var selectScrollPositionAfter = selectTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, select before: &quot; + selectScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, select after: &quot; + selectScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    debug(&quot;Document was initial target for &quot; + wheelCount + &quot; of the wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    selectTarget = document.getElementById('target');
+    selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100;
+
+    selectScrollPositionBefore = selectTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = selectTarget.offsetLeft + 20;
+    debug(&quot;div display height = &quot; + selectTarget.clientHeight);
+    var startPosY = selectTarget.offsetTop + selectTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;inside the select box, and scroll near (but not AT) the bottom of the range. Use the mouse wheel or a two-finger&lt;br/&gt;&quot;
+            + &quot;swipe to scroll through the rest of the select options.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the page position change if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+        &lt;div class=&quot;scrollable_region&quot;&gt;
+            &lt;h3&gt;Scrollable Select&lt;/h3&gt;
+            &lt;select id=&quot;target&quot; class=&quot;scrollable_select&quot; size=&quot;8&quot;&gt;
+                &lt;option&gt;content1&lt;/option&gt;
+                &lt;option&gt;content2&lt;/option&gt;
+                &lt;option&gt;content3&lt;/option&gt;
+                &lt;option&gt;content4&lt;/option&gt;
+                &lt;option&gt;content5&lt;/option&gt;
+                &lt;option&gt;content6&lt;/option&gt;
+                &lt;option&gt;content7&lt;/option&gt;
+                &lt;option&gt;content8&lt;/option&gt;
+                &lt;option&gt;content9&lt;/option&gt;
+                &lt;option&gt;content10&lt;/option&gt;
+                &lt;option&gt;content11&lt;/option&gt;
+                &lt;option&gt;content12&lt;/option&gt;
+                &lt;option&gt;content13&lt;/option&gt;
+                &lt;option&gt;content14&lt;/option&gt;
+                &lt;option&gt;content15&lt;/option&gt;
+                &lt;option&gt;content16&lt;/option&gt;
+                &lt;option&gt;content17&lt;/option&gt;
+                &lt;option&gt;content18&lt;/option&gt;
+                &lt;option&gt;content19&lt;/option&gt;
+                &lt;option&gt;content20&lt;/option&gt;
+                &lt;option&gt;content21&lt;/option&gt;
+            &lt;/select&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a select doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfastscrollselectlatchedselecthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html (0 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -0,0 +1,151 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+.scrollable_region {
+    width: 680px;
+}
+
+.table td, .table th {
+    padding: 2px;
+}
+
+.table th {
+    height: 20px;
+    text-align: left;
+    font-weight: strong;
+}
+
+.table tr:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+.scrollable_select option:nth-child(odd) {
+    background: #f3f3f3;
+}
+
+&lt;/style&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function onLoad() {
+    setupTopLevel();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;onLoad();&quot;&gt;
+&lt;script&gt;
+
+var selectTarget;
+var pageScrollPositionBefore;
+var selectScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll() {
+
+    // The page should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var selectScrollPositionAfter = selectTarget.scrollTop;
+
+    debug(&quot;Page before: &quot; + pageScrollPositionBefore + &quot;, select before: &quot; + selectScrollPositionBefore);
+    debug(&quot;Page after:  &quot; + pageScrollPositionAfter + &quot;, select after: &quot; + selectScrollPositionAfter);
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed(&quot;Page received wheel events.&quot;);
+    else
+        testPassed(&quot;Page did not receive wheel events.&quot;);
+
+    if (window.internals) {
+        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    }
+
+    testRunner.notifyDone();
+}
+
+function scrollTest() {
+    // See where our IFrame lives:
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    selectTarget = document.getElementById('target');
+    selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100;
+
+    selectScrollPositionBefore = selectTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = selectTarget.offsetLeft + 20;
+    debug(&quot;div display height = &quot; + selectTarget.clientHeight);
+    var startPosY = selectTarget.offsetTop + selectTarget.clientHeight - 42; // One wheel turn before end.
+    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+    debug(&quot;Mouse moved to (&quot; + startPosX + &quot;, &quot; + startPosY + &quot;)&quot;);
+    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);
+}
+
+function setupTopLevel() {
+
+    if (window.eventSender) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+
+        setTimeout(scrollTest, 1000);
+    } else {
+        var messageLocation = document.getElementById('parent');
+        var message = document.createElement('div');
+        message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+            + &quot;inside the select box, and scroll near (but not AT) the bottom of the range. Use the mouse wheel or a two-finger&lt;br/&gt;&quot;
+            + &quot;swipe to scroll through the rest of the select options.&lt;br/&gt;&lt;br/&gt;&quot;
+            + &quot;You should not see the page position change if this test is successful.&lt;/p&gt;&quot;;
+        messageLocation.appendChild(message);
+    }
+}
+
+&lt;/script&gt;
+&lt;div id=&quot;parent&quot; style=&quot;height: 2000px; width: 2000px;&quot;&gt;
+    &lt;div id=&quot;source&quot; style=&quot;height: 100px; width: 500px;&quot;&gt;
+        Put mouse here and flick downwards
+    &lt;/div&gt;
+        &lt;div class=&quot;scrollable_region&quot;&gt;
+            &lt;h3&gt;Scrollable Select&lt;/h3&gt;
+            &lt;select id=&quot;target&quot; class=&quot;scrollable_select&quot; size=&quot;8&quot;&gt;
+                &lt;option&gt;content1&lt;/option&gt;
+                &lt;option&gt;content2&lt;/option&gt;
+                &lt;option&gt;content3&lt;/option&gt;
+                &lt;option&gt;content4&lt;/option&gt;
+                &lt;option&gt;content5&lt;/option&gt;
+                &lt;option&gt;content6&lt;/option&gt;
+                &lt;option&gt;content7&lt;/option&gt;
+                &lt;option&gt;content8&lt;/option&gt;
+                &lt;option&gt;content9&lt;/option&gt;
+                &lt;option&gt;content10&lt;/option&gt;
+                &lt;option&gt;content11&lt;/option&gt;
+                &lt;option&gt;content12&lt;/option&gt;
+                &lt;option&gt;content13&lt;/option&gt;
+                &lt;option&gt;content14&lt;/option&gt;
+                &lt;option&gt;content15&lt;/option&gt;
+                &lt;option&gt;content16&lt;/option&gt;
+                &lt;option&gt;content17&lt;/option&gt;
+                &lt;option&gt;content18&lt;/option&gt;
+                &lt;option&gt;content19&lt;/option&gt;
+                &lt;option&gt;content20&lt;/option&gt;
+                &lt;option&gt;content21&lt;/option&gt;
+            &lt;/select&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that a select doesn't pass wheel events to main frame when scrolling at bottom&quot;);
+&lt;/script&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here&lt;/p&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/ChangeLog        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-02-13  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Create some latched scrolling tests.
+        https://bugs.webkit.org/show_bug.cgi?id=127606
+        &lt;rdar://problem/15911348&gt;
+
+        Reviewed by Simon Fraser.
+
+        * DumpRenderTree/mac/EventSendingController.mm:
+        (+[EventSendingController isSelectorExcludedFromWebScript:]): Update to recognize
+        the new &quot;mouseScrollByX:andY:withWheel:andMomentumPhases:&quot; selector.
+        (+[EventSendingController webScriptNameForSelector:]): Ditto.
+        (-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]): Implement
+        the new wheel event sender.
+        * WebKitTestRunner/EventSenderProxy.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: Add declaration
+        of new mouseScrollByWithWheelAndMomentumPhases method.
+        * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
+        (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Added
+        * WebKitTestRunner/InjectedBundle/EventSendingController.h:
+        * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm:
+        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Add stub for iOS.
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::didReceiveMessageFromInjectedBundle): Handle the new
+        mouseScrollByWithWheelAndMomentumPhases message.
+        (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Handle the
+        new mouseScrollByWithWheelAndMomentumPhases.
+        * WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
+        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Provide stub that
+        relays to the standard mouse wheel handler.
+        * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
+        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto.
+        * WebKitTestRunner/mac/EventSenderProxy.mm:
+        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Provide implementation
+        of mouse wheel gesture method.
+
</ins><span class="cx"> 2014-02-13  Antoine Quint  &lt;graouts@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. changing my email address.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacEventSendingControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/EventSendingController.mm (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/EventSendingController.mm        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/DumpRenderTree/mac/EventSendingController.mm        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007, 2008, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2006 Jonas Witt &lt;jonas.witt@gmail.com&gt;
</span><span class="cx">  * Copyright (C) 2006 Samuel Weinig &lt;sam.weinig@gmail.com&gt;
</span><span class="cx">  * Copyright (C) 2006 Alexey Proskuryakov &lt;ap@nypop.com&gt;
</span><span class="lines">@@ -74,6 +74,7 @@
</span><span class="cx">     NoMouseButton = -1
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> struct KeyMappingEntry {
</span><span class="cx">     int macKeyCode;
</span><span class="cx">     int macNumpadKeyCode;
</span><span class="lines">@@ -202,6 +203,7 @@
</span><span class="cx">             || aSelector == @selector(zoomPageOut)
</span><span class="cx">             || aSelector == @selector(scalePageBy:atX:andY:)
</span><span class="cx">             || aSelector == @selector(mouseScrollByX:andY:)
</span><ins>+            || aSelector == @selector(mouseScrollByX:andY:withWheel:andMomentumPhases:)
</ins><span class="cx">             || aSelector == @selector(continuousMouseScrollByX:andY:)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">             || aSelector == @selector(addTouchAtX:y:)
</span><span class="lines">@@ -254,6 +256,8 @@
</span><span class="cx">         return @&quot;setDragMode&quot;;
</span><span class="cx">     if (aSelector == @selector(mouseScrollByX:andY:))
</span><span class="cx">         return @&quot;mouseScrollBy&quot;;
</span><ins>+    if (aSelector == @selector(mouseScrollByX:andY:withWheel:andMomentumPhases:))
+        return @&quot;mouseScrollByWithWheelAndMomentumPhases&quot;;
</ins><span class="cx">     if (aSelector == @selector(continuousMouseScrollByX:andY:))
</span><span class="cx">         return @&quot;continuousMouseScrollBy&quot;;
</span><span class="cx">     if (aSelector == @selector(scalePageBy:atX:andY:))
</span><span class="lines">@@ -699,6 +703,52 @@
</span><span class="cx">     [self mouseScrollByX:x andY:y continuously:NO];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)mouseScrollByX:(int)x andY:(int)y withWheel:(NSString*)phaseName andMomentumPhases:(NSString*)momentumName
+{
+#if !PLATFORM(IOS)
+    uint32_t phase = 0;
+    if ([phaseName isEqualToString: @&quot;none&quot;])
+        phase = 0;
+    else if ([phaseName isEqualToString: @&quot;began&quot;])
+        phase = 1; // kCGScrollPhaseBegan
+    else if ([phaseName isEqualToString: @&quot;changed&quot;])
+        phase = 2; // kCGScrollPhaseChanged;
+    else if ([phaseName isEqualToString: @&quot;ended&quot;])
+        phase = 4; // kCGScrollPhaseEnded;
+    else if ([phaseName isEqualToString: @&quot;cancelled&quot;])
+        phase = 8; // kCGScrollPhaseCancelled;
+    else if ([phaseName isEqualToString: @&quot;maybegin&quot;])
+        phase = 128; // kCGScrollPhaseMayBegin;
+
+    uint32_t momentum = 0;
+    if ([momentumName isEqualToString: @&quot;none&quot;])
+        momentum = 0; // kCGMomentumScrollPhaseNone;
+    else if ([momentumName isEqualToString:@&quot;begin&quot;])
+        momentum = 1; // kCGMomentumScrollPhaseBegin;
+    else if ([momentumName isEqualToString:@&quot;continue&quot;])
+        momentum = 2; // kCGMomentumScrollPhaseContinue;
+    else if ([momentumName isEqualToString:@&quot;end&quot;])
+        momentum = 3; // kCGMomentumScrollPhaseEnd;
+
+    CGEventRef cgScrollEvent = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitLine, 2, y, x);
+
+    // CGEvent locations are in global display coordinates.
+    CGPoint lastGlobalMousePosition = CGPointMake(lastMousePosition.x, [[NSScreen mainScreen] frame].size.height - lastMousePosition.y);
+    CGEventSetLocation(cgScrollEvent, lastGlobalMousePosition);
+    CGEventSetIntegerValueField(cgScrollEvent, kCGScrollWheelEventScrollPhase, phase);
+    CGEventSetIntegerValueField(cgScrollEvent, kCGScrollWheelEventMomentumPhase, momentum);
+    
+    NSEvent* scrollEvent = [NSEvent eventWithCGEvent:cgScrollEvent];
+    CFRelease(cgScrollEvent);
+
+    if (NSView* targetView = [[mainFrame webView] hitTest:[scrollEvent locationInWindow]]) {
+        [NSApp _setCurrentEvent:scrollEvent];
+        [targetView scrollWheel:scrollEvent];
+        [NSApp _setCurrentEvent:nil];
+    }
+#endif
+}
+
</ins><span class="cx"> - (NSArray *)contextClick
</span><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerEventSenderProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/EventSenderProxy.h (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/EventSenderProxy.h        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/EventSenderProxy.h        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     void mouseUp(unsigned button, WKEventModifiers);
</span><span class="cx">     void mouseMoveTo(double x, double y);
</span><span class="cx">     void mouseScrollBy(int x, int y);
</span><ins>+    void mouseScrollByWithWheelAndMomentumPhases(int x, int y, int phase, int momentum);
</ins><span class="cx">     void continuousMouseScrollBy(int x, int y, bool paged);
</span><span class="cx"> 
</span><span class="cx">     void leapForward(int milliseconds);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsEventSendingControlleridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2011, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">     void mouseUp(long buttonNumber, object modifierArray);
</span><span class="cx">     void mouseMoveTo(long x, long y);
</span><span class="cx">     void mouseScrollBy(long x, long y);
</span><ins>+    void mouseScrollByWithWheelAndMomentumPhases(long x, long y, DOMString phase, DOMString momentum, optional boolean asyncScrolling);
</ins><span class="cx">     void continuousMouseScrollBy(long x, long y, optional boolean paged);
</span><span class="cx">     object contextClick();
</span><span class="cx">     void scheduleAsynchronousClick();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleEventSendingControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2011, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -347,6 +347,61 @@
</span><span class="cx">     WKBundlePostSynchronousMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void EventSendingController::mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phaseStr, JSStringRef momentumStr, bool asyncScrolling)
+{
+    WKRetainPtr&lt;WKStringRef&gt; EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString(&quot;EventSender&quot;));
+    WKRetainPtr&lt;WKMutableDictionaryRef&gt; EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
+    
+    WKRetainPtr&lt;WKStringRef&gt; subMessageKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;SubMessage&quot;));
+    WKRetainPtr&lt;WKStringRef&gt; subMessageName(AdoptWK, WKStringCreateWithUTF8CString(&quot;MouseScrollByWithWheelAndMomentumPhases&quot;));
+    WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
+    
+    WKRetainPtr&lt;WKStringRef&gt; xKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;X&quot;));
+    WKRetainPtr&lt;WKDoubleRef&gt; xRef(AdoptWK, WKDoubleCreate(x));
+    WKDictionarySetItem(EventSenderMessageBody.get(), xKey.get(), xRef.get());
+    
+    WKRetainPtr&lt;WKStringRef&gt; yKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;Y&quot;));
+    WKRetainPtr&lt;WKDoubleRef&gt; yRef(AdoptWK, WKDoubleCreate(y));
+    WKDictionarySetItem(EventSenderMessageBody.get(), yKey.get(), yRef.get());
+
+    uint64_t phase = 0;
+    if (JSStringIsEqualToUTF8CString(phaseStr, &quot;none&quot;))
+        phase = 0;
+    else if (JSStringIsEqualToUTF8CString(phaseStr, &quot;began&quot;))
+        phase = 1; // kCGScrollPhaseBegan
+    else if (JSStringIsEqualToUTF8CString(phaseStr, &quot;changed&quot;))
+        phase = 2; // kCGScrollPhaseChanged
+    else if (JSStringIsEqualToUTF8CString(phaseStr, &quot;ended&quot;))
+        phase = 4; // kCGScrollPhaseEnded
+    else if (JSStringIsEqualToUTF8CString(phaseStr, &quot;cancelled&quot;))
+        phase = 8; // kCGScrollPhaseCancelled
+    else if (JSStringIsEqualToUTF8CString(phaseStr, &quot;maybegin&quot;))
+        phase = 128; // kCGScrollPhaseMayBegin
+
+    WKRetainPtr&lt;WKStringRef&gt; phaseKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;Phase&quot;));
+    WKRetainPtr&lt;WKUInt64Ref&gt; phaseRef(AdoptWK, WKUInt64Create(phase));
+    WKDictionarySetItem(EventSenderMessageBody.get(), phaseKey.get(), phaseRef.get());
+
+    uint64_t momentum = 0;
+    if (JSStringIsEqualToUTF8CString(momentumStr, &quot;none&quot;))
+        momentum = 0; // kCGMomentumScrollPhaseNone
+    else if (JSStringIsEqualToUTF8CString(momentumStr, &quot;begin&quot;))
+        momentum = 1; // kCGMomentumScrollPhaseBegin
+    else if (JSStringIsEqualToUTF8CString(momentumStr, &quot;continue&quot;))
+        momentum = 2; // kCGMomentumScrollPhaseContinue
+    else if (JSStringIsEqualToUTF8CString(momentumStr, &quot;end&quot;))
+        momentum = 3; // kCGMomentumScrollPhaseEnd
+
+    WKRetainPtr&lt;WKStringRef&gt; momentumKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;Momentum&quot;));
+    WKRetainPtr&lt;WKUInt64Ref&gt; momentumRef(AdoptWK, WKUInt64Create(momentum));
+    WKDictionarySetItem(EventSenderMessageBody.get(), momentumKey.get(), momentumRef.get());
+
+    if (asyncScrolling)
+        WKBundlePostMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), EventSenderMessageBody.get());
+    else
+        WKBundlePostSynchronousMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+}
+
</ins><span class="cx"> void EventSendingController::continuousMouseScrollBy(int x, int y, bool paged)
</span><span class="cx"> {
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString(&quot;EventSender&quot;));
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleEventSendingControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2011, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">     void mouseUp(int button, JSValueRef modifierArray);
</span><span class="cx">     void mouseMoveTo(int x, int y);
</span><span class="cx">     void mouseScrollBy(int x, int y);
</span><ins>+    void mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phase, JSStringRef momentum, bool asyncScrolling);
</ins><span class="cx">     void continuousMouseScrollBy(int x, int y, bool paged);
</span><span class="cx">     JSValueRef contextClick();
</span><span class="cx">     void leapForward(int milliseconds);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleiosEventSenderProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -98,6 +98,11 @@
</span><span class="cx">     // Write me.
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases(int x, int y, int phase, int momentum)
+{
+    // Write me.
+}
+
</ins><span class="cx"> void EventSenderProxy::continuousMouseScrollBy(int x, int y, bool paged)
</span><span class="cx"> {
</span><span class="cx">     // Write me.
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -856,6 +856,25 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        if (WKStringIsEqualToUTF8CString(subMessageName, &quot;MouseScrollByWithWheelAndMomentumPhases&quot;)) {
+            WKRetainPtr&lt;WKStringRef&gt; xKey = adoptWK(WKStringCreateWithUTF8CString(&quot;X&quot;));
+            double x = WKDoubleGetValue(static_cast&lt;WKDoubleRef&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
+            
+            WKRetainPtr&lt;WKStringRef&gt; yKey = adoptWK(WKStringCreateWithUTF8CString(&quot;Y&quot;));
+            double y = WKDoubleGetValue(static_cast&lt;WKDoubleRef&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get())));
+            
+            WKRetainPtr&lt;WKStringRef&gt; phaseKey = adoptWK(WKStringCreateWithUTF8CString(&quot;Phase&quot;));
+            int phase = static_cast&lt;int&gt;(WKUInt64GetValue(static_cast&lt;WKUInt64Ref&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, phaseKey.get()))));
+            WKRetainPtr&lt;WKStringRef&gt; momentumKey = adoptWK(WKStringCreateWithUTF8CString(&quot;Momentum&quot;));
+            int momentum = static_cast&lt;int&gt;(WKUInt64GetValue(static_cast&lt;WKUInt64Ref&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, momentumKey.get()))));
+            
+            // Forward to WebProcess
+            WKPageSetShouldSendEventsSynchronously(mainWebView()-&gt;page(), false);
+            m_eventSenderProxy-&gt;mouseScrollByWithWheelAndMomentumPhases(x, y, phase, momentum);
+
+            return;
+        }
+
</ins><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -925,6 +944,25 @@
</span><span class="cx">             return 0;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        if (WKStringIsEqualToUTF8CString(subMessageName, &quot;MouseScrollByWithWheelAndMomentumPhases&quot;)) {
+            WKRetainPtr&lt;WKStringRef&gt; xKey = adoptWK(WKStringCreateWithUTF8CString(&quot;X&quot;));
+            double x = WKDoubleGetValue(static_cast&lt;WKDoubleRef&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
+            
+            WKRetainPtr&lt;WKStringRef&gt; yKey = adoptWK(WKStringCreateWithUTF8CString(&quot;Y&quot;));
+            double y = WKDoubleGetValue(static_cast&lt;WKDoubleRef&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get())));
+            
+            WKRetainPtr&lt;WKStringRef&gt; phaseKey = adoptWK(WKStringCreateWithUTF8CString(&quot;Phase&quot;));
+            int phase = static_cast&lt;int&gt;(WKUInt64GetValue(static_cast&lt;WKUInt64Ref&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, phaseKey.get()))));
+            WKRetainPtr&lt;WKStringRef&gt; momentumKey = adoptWK(WKStringCreateWithUTF8CString(&quot;Momentum&quot;));
+            int momentum = static_cast&lt;int&gt;(WKUInt64GetValue(static_cast&lt;WKUInt64Ref&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, momentumKey.get()))));
+
+            // Forward to WebProcess
+            WKPageSetShouldSendEventsSynchronously(mainWebView()-&gt;page(), true);
+            m_eventSenderProxy-&gt;mouseScrollByWithWheelAndMomentumPhases(x, y, phase, momentum);
+            WKPageSetShouldSendEventsSynchronously(mainWebView()-&gt;page(), false);
+            return 0;
+        }
+        
</ins><span class="cx">         if (WKStringIsEqualToUTF8CString(subMessageName, &quot;ContinuousMouseScrollBy&quot;)) {
</span><span class="cx">             WKRetainPtr&lt;WKStringRef&gt; xKey = adoptWK(WKStringCreateWithUTF8CString(&quot;X&quot;));
</span><span class="cx">             double x = WKDoubleGetValue(static_cast&lt;WKDoubleRef&gt;(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnereflEventSenderProxyEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -392,6 +392,13 @@
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases(int x, int y, int /*phase*/, int /*momentum*/)
+{
+    // EFL does not have the concept of wheel gesture phases or momentum. Just relay to
+    // the mouse wheel handler.
+    mouseScrollBy(x, y);
+}
+
</ins><span class="cx"> void EventSenderProxy::leapForward(int milliseconds)
</span><span class="cx"> {
</span><span class="cx">     if (m_eventQueue.isEmpty())
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnergtkEventSenderProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -433,6 +433,13 @@
</span><span class="cx">     sendOrQueueEvent(event);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases(int x, int y, int /*phase*/, int /*momentum*/)
+{
+    // Gtk+ does not have the concept of wheel gesture phases or momentum. Just relay to
+    // the mouse wheel handler.
+    mouseScrollBy(x, y);
+}
+
</ins><span class="cx"> void EventSenderProxy::leapForward(int milliseconds)
</span><span class="cx"> {
</span><span class="cx">     if (m_eventQueue.isEmpty())
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacEventSenderProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm (164072 => 164073)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm        2014-02-14 00:22:15 UTC (rev 164072)
+++ trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm        2014-02-14 00:22:36 UTC (rev 164073)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -461,4 +461,25 @@
</span><span class="cx">     return;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases(int x, int y, int phase, int momentum)
+{
+    RetainPtr&lt;CGEventRef&gt; cgScrollEvent = adoptCF(CGEventCreateScrollWheelEvent(0, kCGScrollEventUnitLine, 2, y, x));
+
+    // CGEvent locations are in global display coordinates.
+    CGPoint lastGlobalMousePosition = CGPointMake(m_position.x, [[NSScreen mainScreen] frame].size.height - m_position.y);
+    CGEventSetLocation(cgScrollEvent.get(), lastGlobalMousePosition);
+
+    CGEventSetIntegerValueField(cgScrollEvent.get(), kCGScrollWheelEventScrollPhase, phase);
+    CGEventSetIntegerValueField(cgScrollEvent.get(), kCGScrollWheelEventMomentumPhase, momentum);
+
+    NSEvent* event = [NSEvent eventWithCGEvent: cgScrollEvent.get()];
+
+    // Our event should have the correct settings:
+    if (NSView *targetView = [m_testController-&gt;mainWebView()-&gt;platformView() hitTest: [event locationInWindow]]) {
+        [NSApp _setCurrentEvent: event];
+        [targetView scrollWheel: event];
+        [NSApp _setCurrentEvent: nil];
+    }
+}
+
</ins><span class="cx"> } // namespace WTR
</span></span></pre>
</div>
</div>

</body>
</html>