Improve how UI events are dispatched by WebKitTestRunner
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Aug 2015 23:09:54 +0000 (23:09 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Aug 2015 23:09:54 +0000 (23:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148326

Reviewed by Anders Carlsson.

Source/WebKit2:

Added "fully synchronous mode for testing", in which all messages are dispatched
synchronously.

When an async message is sent in this mode, it is wrapped into a sync one automatically.

A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
This makes sure that we don't increase potential for IPC misuse.

* WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!

* UIProcess/API/C/WKPage.cpp:
(WKPageSetShouldSendEventsSynchronously): Deleted.
* UIProcess/API/C/WKPagePrivate.h:
We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.

* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
Removed code that was only needed to support pseudo-syncronous scrolling in tests.

* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):
* Platform/IPC/Connection.h:
(IPC::Connection::allowFullySynchronousModeForTesting):
(IPC::Connection::sendSync):
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
(IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
(IPC::MessageDecoder::setImportanceAssertion):
(IPC::MessageDecoder::unwrapForTesting):
* Platform/IPC/MessageDecoder.h:
(IPC::MessageDecoder::UUID):
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
(IPC::MessageEncoder::setFullySynchronousModeForTesting):
(IPC::MessageEncoder::wrapForTesting):
* Platform/IPC/MessageEncoder.h:
(IPC::MessageEncoder::UUID):
* Platform/IPC/MessageFlags.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationSetMediaKeysStorageDirectory):
(WKContextConfigurationAllowFullySynchronousModeForTesting):
* UIProcess/API/C/WKContextConfigurationRef.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
(WebKit::WebPageProxy::handleTouchEvent):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::renderTreeSize):
(WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostMessage):
(WKBundlePagePostSynchronousMessageForTesting):
(WKBundlePagePostSynchronousMessage): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::handleWheelEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::handleKeyEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::validateCommand):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::scroll):
(WebKit::WebPage::postMessage):
(WebKit::WebPage::postSynchronousMessageForTesting):
(WebKit::WebPage::mouseEventSyncForTesting): Deleted.
(WebKit::WebPage::wheelEventSyncForTesting): Deleted.
(WebKit::WebPage::keyEventSyncForTesting): Deleted.
(WebKit::WebPage::touchEventSyncForTesting): Deleted.
(WebKit::WebPage::postSynchronousMessage): Deleted.
* WebProcess/WebPage/WebPage.h:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always
asynchronous (and really, it has always been for the most part).

* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming.
(WTR::EventSendingController::mouseUp): Ditto.
(WTR::EventSendingController::mouseMoveTo): Ditto.
(WTR::EventSendingController::mouseForceDown): Ditto.
(WTR::EventSendingController::mouseForceUp): Ditto.
(WTR::EventSendingController::mouseForceChanged): Ditto.
(WTR::EventSendingController::leapForward): Ditto.
(WTR::EventSendingController::scheduleAsynchronousClick): Ditto.
(WTR::EventSendingController::keyDown): Ditto.
(WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto.
(WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used
to be done in custom WebKit2 code for test wheel event handling.
(WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version.
(WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird.
(WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming.
(WTR::EventSendingController::addTouchPoint): Ditto.
(WTR::EventSendingController::updateTouchPoint): Ditto.
(WTR::EventSendingController::setTouchModifier): Ditto.
(WTR::EventSendingController::setTouchPointRadius): Ditto.
(WTR::EventSendingController::touchStart): Ditto.
(WTR::EventSendingController::touchMove): Ditto.
(WTR::EventSendingController::touchEnd): Ditto.
(WTR::EventSendingController::touchCancel): Ditto.
(WTR::EventSendingController::clearTouchPoints): Ditto.
(WTR::EventSendingController::releaseTouchPoint): Ditto.
(WTR::EventSendingController::cancelTouchPoint): Ditto.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::postSetWindowIsKey):
(WTR::InjectedBundle::postSimulateWebNotificationClick):
(WTR::InjectedBundle::isGeolocationProviderActive):
(WTR::InjectedBundle::shouldProcessWorkQueue):
Updated for WKBundlePagePostSynchronousMessage renaming.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::secureEventInputIsEnabled): Ditto.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Allow handling the new test style messages.
(WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls
to WKPageSetShouldSendEventsSynchronously, which we no longer need.
(WTR::TestController::didReceiveMessageFromInjectedBundle):
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved
"MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously.
(WTR::EventSenderProxy::keyDown): Ditto.
(WTR::EventSenderProxy::mouseScrollBy): Ditto.
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto.

LayoutTests:

* fast/events/clear-drag-state-expected.txt:
* fast/events/clear-drag-state.html:
* platform/mac-wk2/TestExpectations:
This test used to accidentally pass in WebKit2, but it didn't actually check
for the problem. This patch improves WK2 behavior, which makes the test fail.
Changed the test to not pass accidentally, and added it to WK2 test expectations.

* fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt:
* fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
Updated the test to be fully async.

* fast/events/wheelevent-basic-expected.txt:
* fast/events/wheelevent-basic.html:
Updated the test to be fully async, got rid of tab characters.

* fast/events/wheelevent-mousewheel-interaction.html:
* fast/forms/search/search-scroll-hidden-decoration-container-crash.html:
* fast/frames/flattening/scrolling-in-object.html:
Updated these tests to be fully async. Since they check for something that happens
asynchronously, and doesn't have an end event, they have to use setTimeout.

* fast/scrolling/latching/iframe_in_iframe.html:
* fast/scrolling/latching/scroll-div-latched-div.html:
* fast/scrolling/latching/scroll-div-latched-mainframe.html:
* fast/scrolling/latching/scroll-div-no-latching.html:
* fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html:
* fast/scrolling/latching/scroll-iframe-fragment.html:
* fast/scrolling/latching/scroll-iframe-latched-iframe.html:
* fast/scrolling/latching/scroll-iframe-latched-mainframe.html:
* fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html:
* fast/scrolling/latching/scroll-latched-nested-div.html:
* fast/scrolling/latching/scroll-nested-iframe.html:
* fast/scrolling/latching/scroll-select-bottom-test.html:
* fast/scrolling/latching/scroll-select-latched-mainframe.html:
* fast/scrolling/latching/scroll-select-latched-select.html:
Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls.
We no longer need multiple events for scroll snap animation to start, and due to
the way we coalesce events, having multiple events resulted in getting too high velocity.
Removed async scrolling argument form the function calls, because it's now always async.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html
to WK1 expectations, because the test needn't be skipped on WK2.

* scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored
it for clarity.

* tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html:
* tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
* tiled-drawing/scrolling/iframe_in_iframe.html:
* tiled-drawing/scrolling/overflow-scroll-reduced-content.html:
* tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
* tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
* tiled-drawing/scrolling/wheel-events-with-no-delta.html:
Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching.

* tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
Removed debug output about how many events are received. The number may vary due
to coalescing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc

90 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/clear-drag-state-expected.txt
LayoutTests/fast/events/clear-drag-state.html
LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt
LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
LayoutTests/fast/events/wheelevent-basic-expected.txt
LayoutTests/fast/events/wheelevent-basic.html
LayoutTests/fast/events/wheelevent-mousewheel-interaction.html
LayoutTests/fast/forms/search/search-scroll-hidden-decoration-container-crash.html
LayoutTests/fast/frames/flattening/scrolling-in-object.html
LayoutTests/fast/scrolling/latching/iframe_in_iframe.html
LayoutTests/fast/scrolling/latching/scroll-div-latched-div.html
LayoutTests/fast/scrolling/latching/scroll-div-latched-mainframe.html
LayoutTests/fast/scrolling/latching/scroll-div-no-latching.html
LayoutTests/fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html
LayoutTests/fast/scrolling/latching/scroll-iframe-fragment.html
LayoutTests/fast/scrolling/latching/scroll-iframe-latched-iframe.html
LayoutTests/fast/scrolling/latching/scroll-iframe-latched-mainframe.html
LayoutTests/fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html
LayoutTests/fast/scrolling/latching/scroll-latched-nested-div.html
LayoutTests/fast/scrolling/latching/scroll-nested-iframe.html
LayoutTests/fast/scrolling/latching/scroll-select-bottom-test.html
LayoutTests/fast/scrolling/latching/scroll-select-latched-mainframe.html
LayoutTests/fast/scrolling/latching/scroll-select-latched-select.html
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/scrollbars/scroll-rtl-or-bt-layer.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html
LayoutTests/tiled-drawing/scrolling/iframe_in_iframe.html
LayoutTests/tiled-drawing/scrolling/overflow-scroll-reduced-content.html
LayoutTests/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html
LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html
LayoutTests/tiled-drawing/scrolling/wheel-events-with-no-delta.html
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/IPC/Connection.cpp
Source/WebKit2/Platform/IPC/Connection.h
Source/WebKit2/Platform/IPC/MessageDecoder.cpp
Source/WebKit2/Platform/IPC/MessageDecoder.h
Source/WebKit2/Platform/IPC/MessageEncoder.cpp
Source/WebKit2/Platform/IPC/MessageEncoder.h
Source/WebKit2/Platform/IPC/MessageFlags.h
Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp
Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h
Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp
Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPagePrivate.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl
Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/mac/EventSenderProxy.mm

index ddadce3..6d26584 100644 (file)
@@ -1,3 +1,94 @@
+2015-08-21  Alexey Proskuryakov  <ap@apple.com>
+
+        Improve how UI events are dispatched by WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=148326
+
+        Reviewed by Anders Carlsson.
+
+        * fast/events/clear-drag-state-expected.txt:
+        * fast/events/clear-drag-state.html:
+        * platform/mac-wk2/TestExpectations:
+        This test used to accidentally pass in WebKit2, but it didn't actually check
+        for the problem. This patch improves WK2 behavior, which makes the test fail.
+        Changed the test to not pass accidentally, and added it to WK2 test expectations.
+        
+        * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt:
+        * fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
+        Updated the test to be fully async.
+
+        * fast/events/wheelevent-basic-expected.txt:
+        * fast/events/wheelevent-basic.html:
+        Updated the test to be fully async, got rid of tab characters.
+
+        * fast/events/wheelevent-mousewheel-interaction.html: 
+        * fast/forms/search/search-scroll-hidden-decoration-container-crash.html:
+        * fast/frames/flattening/scrolling-in-object.html:
+        Updated these tests to be fully async. Since they check for something that happens
+        asynchronously, and doesn't have an end event, they have to use setTimeout.
+
+        * fast/scrolling/latching/iframe_in_iframe.html:
+        * fast/scrolling/latching/scroll-div-latched-div.html:
+        * fast/scrolling/latching/scroll-div-latched-mainframe.html:
+        * fast/scrolling/latching/scroll-div-no-latching.html:
+        * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html:
+        * fast/scrolling/latching/scroll-iframe-fragment.html:
+        * fast/scrolling/latching/scroll-iframe-latched-iframe.html:
+        * fast/scrolling/latching/scroll-iframe-latched-mainframe.html:
+        * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html:
+        * fast/scrolling/latching/scroll-latched-nested-div.html:
+        * fast/scrolling/latching/scroll-nested-iframe.html:
+        * fast/scrolling/latching/scroll-select-bottom-test.html:
+        * fast/scrolling/latching/scroll-select-latched-mainframe.html:
+        * fast/scrolling/latching/scroll-select-latched-select.html:
+        Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls.
+        We no longer need multiple events for scroll snap animation to start, and due to
+        the way we coalesce events, having multiple events resulted in getting too high velocity.
+        Removed async scrolling argument form the function calls, because it's now always async.
+
+        * platform/mac-wk1/TestExpectations:
+        * platform/mac/TestExpectations:
+        Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html
+        to WK1 expectations, because the test needn't be skipped on WK2.
+
+        * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored
+        it for clarity.
+
+        * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html:
+        * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
+        * tiled-drawing/scrolling/iframe_in_iframe.html:
+        * tiled-drawing/scrolling/overflow-scroll-reduced-content.html:
+        * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
+        * tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
+        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
+        * tiled-drawing/scrolling/wheel-events-with-no-delta.html:
+        Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching.
+
+        * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
+        Removed debug output about how many events are received. The number may vary due
+        to coalescing.
+
 2015-08-21  Nan Wang  <n_wang@apple.com>
 
         AX: Fix accessibility/mac/search-with-frames.html test
index e7f9264..d950c94 100644 (file)
@@ -2,3 +2,10 @@ This test ensures we clear the drag state at the end of each drag. To test manua
 
 Drag me down twice!
 PASS
+
+span:span:dragenter
+span:div:dragenter
+div:div:dragenter
+span:span:dragleave
+span:div:dragleave
+
index c6382aa..dc08212 100644 (file)
@@ -60,7 +60,7 @@ if (window.eventSender) {
     dragSpan();
     var firstLog = setLog('');
     dragSpan();
-    var secondLog = setLog('PASS');
+    var secondLog = setLog('PASS\n\n' + firstLog);
     if (firstLog != secondLog)
         setLog('FAIL:\nFirst drag:\n' + firstLog + '\nSecond drag:\n' + secondLog);
 }
index 1fa08d1..dd46bbb 100644 (file)
@@ -1,4 +1,7 @@
 This tests that a usually overflow: hidden viewport should be scrollable when scaled. Otherwise, you can't get to content you would have been able to get to had you not been zoomed it.
 PASS window.document.body.scrollTop is 0
 PASS window.document.body.scrollTop is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 79ad9f0..7a26943 100644 (file)
@@ -2,7 +2,7 @@
     <style>
         html, body { margin:0; overflow: hidden; }
     </style>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <div>This tests that a usually overflow: hidden viewport should be scrollable when scaled. Otherwise, you can't get to content
@@ -19,6 +19,8 @@
             return;
         }
         
+        jsTestIsAsync = true;
+
         // Force a layout.
         document.body.offsetLeft;
 
 
         shouldBe("window.document.body.scrollTop", "0");
 
+        document.body.onscroll = function() {
+            shouldBe("window.document.body.scrollTop", "100");
+            finishJSTest();
+        }
+
         if (window.eventSender) {
             eventSender.mouseMoveTo(100, 100);
             eventSender.mouseScrollBy(0, -5);
         }
-
-        shouldBe("window.document.body.scrollTop", "100");
     })();
 </script>
index 60c8c50..39241be 100644 (file)
@@ -18,14 +18,16 @@ PASS WheelEvent.DOM_DELTA_PAGE is 0x02
 PASS window.onwheel is null
 PASS document.onwheel is null
 PASS testDiv.onwheel is null
+Wheel event fired
 PASS testEvent.__proto__ is WheelEvent.prototype
 PASS testEvent.__proto__.__proto__ is MouseEvent.prototype
+PASS testEvent.deltaX > 0 is true
+PASS testEvent.deltaY > 0 is true
 PASS testEvent.deltaZ is 0
 PASS testEvent.deltaMode is WheelEvent.DOM_DELTA_PIXEL
-PASS deltaX > 0 is true
-PASS deltaX is expectedDeltaX
-PASS deltaY > 0 is true
-PASS deltaY is expectedDeltaY
+Scroll event fired
+PASS eventDeltaX is scrollDeltaX
+PASS eventDeltaY is scrollDeltaY
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 03d368a..025cf76 100644 (file)
@@ -4,10 +4,12 @@
 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent">
 <script src="../../resources/js-test-pre.js"></script>
 <script>
-var deltaX = 0;
-var deltaY = 0;
-var expectedDeltaX;
-var expectedDeltaY;
+var eventDeltaX = 0;
+var eventDeltaY = 0;
+var scrollDeltaX;
+var scrollDeltaY;
+
+jsTestIsAsync = true;
 
 var testDiv;
 function runTest() {
@@ -25,12 +27,6 @@ function runTest() {
     if (window.eventSender) {
         eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5);
         eventSender.mouseScrollBy(-1, -2);
-       expectedDeltaX = testDiv.scrollLeft;
-       expectedDeltaY = testDiv.scrollTop;
-       shouldBeTrue("deltaX > 0");
-       shouldBe("deltaX", "expectedDeltaX");
-       shouldBeTrue("deltaY > 0");
-       shouldBe("deltaY", "expectedDeltaY");
     } else {
         debug("FAIL: This test requires window.eventSender.");
     }
@@ -38,22 +34,34 @@ function runTest() {
 
 var testEvent;
 function wheelHandler(e) {
+    debug("Wheel event fired");
     testEvent = e;
     shouldBe("testEvent.__proto__", "WheelEvent.prototype");
     shouldBe("testEvent.__proto__.__proto__", "MouseEvent.prototype");
-    if (e.deltaX)
-        deltaX = e.deltaX;
-    if (e.deltaY)
-        deltaY = e.deltaY;
+    shouldBeTrue("testEvent.deltaX > 0");
+    shouldBeTrue("testEvent.deltaY > 0");
     shouldBe("testEvent.deltaZ", "0");
     shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PIXEL")
+    eventDeltaX = e.deltaX;
+    eventDeltaY = e.deltaY;
+}
+
+function scrollHandler()
+{
+    debug("Scroll event fired");
+    scrollDeltaX = testDiv.scrollLeft;
+    scrollDeltaY = testDiv.scrollTop;
+    shouldBe("eventDeltaX", "scrollDeltaX");
+    shouldBe("eventDeltaY", "scrollDeltaY");
+
+    finishJSTest();
 }
 
 </script>
 </head>
 <body>
 <span id="parent">
-    <div id="target" style="border:solid 1px green; width:100px; height:70px; overflow:scroll; white-space:nowrap;">
+    <div id="target" style="border:solid 1px green; width:100px; height:70px; overflow:scroll; white-space:nowrap;" onscroll="scrollHandler()">
         TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP<br/>
         Scroll mouse wheel over here<br/>
         Scroll mouse wheel over here<br/>
index e7d282d..2a8e631 100644 (file)
@@ -11,7 +11,6 @@ function runTest() {
     if (window.eventSender) {
         eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5);
         eventSender.mouseScrollBy(10, 20);
-        finishJSTest();
     } else {
         debug("FAIL: This test requires window.eventSender.");
         finishJSTest();
@@ -23,6 +22,8 @@ function wheelHandler(e) {
     testEvent = e;
     testPassed("Standard wheel event was fired.");
     shouldBe("testEvent.__proto__", "WheelEvent.prototype");
+
+    setTimeout(finishJSTest, 100);
 }
 
 function mouseWheelHandler(e) {
index df1a296..ca29a60 100644 (file)
@@ -11,8 +11,10 @@ input::-webkit-textfield-decoration-container {
 </style>
 <input type="search">
 <script>
-if (window.testRunner)
+if (window.testRunner) {
     testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
 
 if (window.eventSender) {
     var input = document.querySelector('input');
@@ -20,6 +22,11 @@ if (window.eventSender) {
     var y = input.offsetTop + input.offsetHeight / 2;
     eventSender.mouseMoveTo(x, y);
     eventSender.mouseScrollBy(0, 10);
-    document.write('PASS');
+    
+    setTimeout(function() {
+        document.body.appendChild(document.createTextNode('PASS'));
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, 100);
 }
 </script>
index cbad8f3..98418ff 100644 (file)
@@ -14,7 +14,9 @@
                     var startY = element.offsetTop + element.offsetHeight / 2;
                     eventSender.mouseMoveTo(startX, startY);
                     eventSender.mouseScrollBy(0, -4);
-                    testRunner.notifyDone();
+                    setTimeout(function() {
+                        testRunner.notifyDone();
+                    }, 100);
                 }
             }
         </script>
index 3905d99..e1c9517 100644 (file)
@@ -77,9 +77,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index 10b6798..890b063 100644 (file)
@@ -67,16 +67,13 @@ function scrollTest()
     var startPosX = Math.round(divTarget.offsetLeft) + 20;
     var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
     eventSender.mouseMoveTo(startPosX, startPosY);
-    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);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     setTimeout(checkForScroll, 100);
 }
 
index ea667b7..e72e8d7 100644 (file)
@@ -70,16 +70,13 @@ function scrollTest() {
     var startPosY = Math.round(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("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-    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);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     setTimeout(checkForScroll, 100);
 }
 
index d92f3fd..0928818 100644 (file)
@@ -65,19 +65,19 @@ function scrollTest() {
     //debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
 
     //debug("Page before: " + pageScrollPositionBefore + ", div before: " + divScrollPositionBefore);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 1, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 1, 'none', 'none', true);
-
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none', true);
-
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none', true);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 1, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 1, 'none', 'none');
+
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'none');
+
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'none');
 
     setTimeout(checkForScroll, 100);
 }
index e201b82..d9a9df5 100644 (file)
@@ -67,16 +67,13 @@ function scrollTest()
     divScrollPositionBefore = divTarget.scrollTop;
 
     eventSender.mouseMoveTo(startPosX, startPosY);
-    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);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
index 81db22f..f626d5c 100644 (file)
             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("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-            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);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             setTimeout(checkForScroll, 100);
         }
 
index dca089d..c03a0b5 100644 (file)
@@ -46,16 +46,13 @@ function scrollTest() {
     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("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-    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);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     setTimeout(checkForScroll, 100);
 }
 
index a0a7eb2..46f038c 100644 (file)
@@ -41,16 +41,13 @@ function scrollTest() {
     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("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-    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);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     setTimeout(checkForScroll, 100);
 }
 
index c129ae7..eb87139 100644 (file)
             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("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-            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);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             setTimeout(checkForScroll, 100);
         }
 
index 23c4537..0d8e7df 100644 (file)
@@ -93,16 +93,13 @@ function checkForFirstScroll() {
 
     wrapperScrollPositionBefore = wrapperTarget.scrollTop;
 
-    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);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     // The timeout used to be only 100, but when we added support for rubber-banding in overflow
     // areas, we found we had to increase the timeout to allow the rubber-band to finish.
     setTimeout(checkForSecondScroll, 1000);
@@ -125,16 +122,13 @@ function scrollTest() {
     var startPosX = divTarget.offsetLeft + divTarget.clientWidth + 50;
     var startPosY = Math.round(divTarget.offsetTop) - 42; // One wheel turn before end.
     eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-    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, -5, 'none', 'begin', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'none', 'continue', true);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     // The timeout used to be only 100, but when we added support for rubber-banding in overflow
     // areas, we found we had to increase the timeout to allow the rubber-band to finish.
     setTimeout(checkForFirstScroll, 1000);
index fbe5376..f232f51 100644 (file)
@@ -55,9 +55,6 @@ function scrollTest() {
     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);
 }
index a028254..83ad0d9 100644 (file)
@@ -80,9 +80,6 @@ function scrollTest() {
     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);
 }
index a0ef664..58771b5 100644 (file)
@@ -76,9 +76,6 @@ function scrollTest() {
     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);
 }
index 1b1f8dc..c85e300 100644 (file)
@@ -78,9 +78,6 @@ function scrollTest() {
     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);
 }
index b5ea2de..84dae4c 100644 (file)
@@ -112,6 +112,9 @@ scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar
 scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html
 scrollbars/scrolling-by-page-on-keyboard-spacebar.html
 
+# This test times out.
+webkit.org/b/147683 fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html [ Skip ]
+
 compositing/rtl/rtl-fixed-overflow-scrolled.html [ Failure ]
 
 compositing/iframes/overlapped-nested-iframes.html [ Pass Failure ]
index 868c8ea..9ca3813 100644 (file)
@@ -159,6 +159,7 @@ editing/selection/select-across-readonly-input-2.html
 editing/selection/select-across-readonly-input-3.html
 editing/selection/select-across-readonly-input-4.html
 editing/selection/select-across-readonly-input-5.html
+fast/events/clear-drag-state.html
 fast/events/drag-and-drop-subframe-dataTransfer.html
 fast/events/drag-selects-image.html
 fast/events/remove-target-with-shadow-in-drag.html
index 5f81e2f..6684d98 100644 (file)
@@ -1272,9 +1272,6 @@ http/tests/security/contentSecurityPolicy/media-src-allowed.html [ Skip ]
 # <rdar://problem/21857102>
 [ ElCapitan+ ] fast/canvas/canvas-too-large-to-draw.html [ Crash ]
 
-# WK1-only timeout.
-webkit.org/b/147683 fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html [ Skip ]
-
 webkit.org/b/147763 [ Mavericks Yosemite ] accessibility/mac/loaded-notification.html [ Skip ]
 
 # Language-specific font fallback is disabled on certain versions of OS X
index 8d4b39b..afa1edb 100644 (file)
@@ -31,49 +31,69 @@ function log(message)
     document.getElementById("console").innerHTML += message + "<br>";
 }
 
-function centerMouseOn(elementId)
+function centerMouseOn(element)
 {
-    var element = document.getElementById(elementId);
     eventSender.mouseMoveTo(element.offsetLeft + element.offsetWidth / 2,
         element.offsetTop + element.offsetHeight / 2);
 }
 
-function test()
+function testRTL()
 {
-    if (window.testRunner)
-        testRunner.dumpAsText();
+    var rtl = document.getElementById("rtl");
+    centerMouseOn(rtl);
+    var offsetBefore = rtl.scrollLeft;
 
-    if (!window.eventSender || !window.eventSender.mouseScrollBy) {
-        log("This test requires DumpRenderTree with eventSender.mouseScrollBy.");
-        return;
+    rtl.onscroll = function() {
+        var offsetAfter = rtl.scrollLeft;
+        if (offsetBefore > offsetAfter)
+            log("rtl: PASS");
+        else {
+            log("rtl: FAIL");
+            log("scrollLeft before: " + offsetBefore);
+            log("scrollLeft after: " + offsetAfter);
+        }
+        testBT();
     }
 
-    centerMouseOn("rtl");
-    var offsetBefore = document.getElementById("rtl").scrollLeft;
     eventSender.mouseScrollBy(1, 0);
-    var offsetAfter = document.getElementById("rtl").scrollLeft;
-    if (offsetBefore > offsetAfter)
-        log("rtl: PASS");
-    else {
-        log("rtl: FAIL");
-        log("scrollLeft before: " + offsetBefore);
-        log("scrollLeft after: " + offsetAfter);
+}
+
+function testBT()
+{
+    var bt = document.getElementById("bt");
+    centerMouseOn(bt);
+    offsetBefore = bt.scrollTop;
+    bt.onscroll = function() {
+        offsetAfter = bt.scrollTop;
+        if (offsetBefore > offsetAfter)
+            log("bt: PASS");
+        else {
+            log("bt: FAIL");
+            log("scrollTop before: " + offsetBefore);
+            log("scrollTop after: " + offsetAfter);
+        }
+
+        document.body.removeChild(document.getElementById("rtl"));
+        document.body.removeChild(document.getElementById("bt"));
+        testRunner.notifyDone();
     }
 
-    centerMouseOn("bt");
-    offsetBefore = document.getElementById("bt").scrollTop;
     eventSender.mouseScrollBy(0, 1);
-    offsetAfter = document.getElementById("bt").scrollTop;
-    if (offsetBefore > offsetAfter)
-        log("bt: PASS");
-    else {
-        log("bt: FAIL");
-        log("scrollTop before: " + offsetBefore);
-        log("scrollTop after: " + offsetAfter);
+}
+
+function test()
+{
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+
+    if (!window.eventSender || !window.eventSender.mouseScrollBy) {
+        log("This test requires DumpRenderTree with eventSender.mouseScrollBy.");
+        return;
     }
 
-    document.body.removeChild(document.getElementById("rtl"));
-    document.body.removeChild(document.getElementById("bt"));
+    testRTL();
 }
 
 test();
index 4f06790..6e64da2 100644 (file)
@@ -84,9 +84,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index c1591eb..76eed21 100644 (file)
@@ -78,9 +78,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index bc943cb..6ea2d84 100644 (file)
@@ -90,10 +90,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
index ef33bc0..5783f7a 100644 (file)
@@ -83,10 +83,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
index d8a9eb3..1f59571 100644 (file)
@@ -62,9 +62,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index 6b4af42..342b316 100644 (file)
@@ -52,9 +52,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index be52d5d..29ff3c1 100644 (file)
@@ -65,10 +65,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 
index 94b4280..7378f7c 100644 (file)
@@ -58,10 +58,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 
index a110ced..1915b2b 100644 (file)
@@ -57,9 +57,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 
index df23df0..a0a13ec 100644 (file)
@@ -45,9 +45,9 @@
                 var startPosX = Math.round(selectTarget.offsetLeft) + 20;
                 var startPosY = Math.round(selectTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the target div
                 eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the target div
-                eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
+                eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
                 for (var i = 0; i < 40; ++i) {
-                    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none', true);
+                    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none');
                 }
                 eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
                  
index 2f26c1d..60210f7 100644 (file)
@@ -89,10 +89,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 
index a147579..f732715 100644 (file)
@@ -83,10 +83,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 
index 4ebbc48..ce69e5f 100644 (file)
@@ -13,17 +13,16 @@ TEST COMPLETE
 div display height = 111
 Mouse moved to (30, 238)
 PASS Page did not receive wheel events.
-Document was initial target for 8 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2311.00)
+  (bounds 2008.00 2296.00)
   (visible rect 0.00, 0.00 785.00 x 585.00)
   (coverage rect 0.00, 0.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2311.00)
+      (bounds 2008.00 2296.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)
index 65a8cea..fa3434b 100644 (file)
@@ -57,8 +57,6 @@ function checkForScroll()
     else
         testPassed("Page did not receive wheel events.");
 
-    debug("Document was initial target for " + wheelCount + " of the wheel events.");
-
     if (window.internals) {
         document.getElementById('layers').innerText = internals.layerTreeAsText(document,
             internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
@@ -88,9 +86,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index 647cf24..9391544 100644 (file)
@@ -80,9 +80,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index 1fc1ae3..321510d 100644 (file)
@@ -77,9 +77,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index 9d7b0f5..e258aaa 100644 (file)
@@ -55,9 +55,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
 
     setTimeout(decreaseContentSize, 100);
index 70fade3..b928213 100644 (file)
@@ -46,9 +46,6 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForZero);
 }
index 9c465eb..90435ec 100644 (file)
@@ -27,10 +27,7 @@ function scrollTest()
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     eventSender.callAfterScrollingCompletes(checkForScroll);
 }
index d0d604f..182e19f 100644 (file)
             var startPosX = windowPosition.x + 0.5 * iframeTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * iframeTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollSnap(targetLabel); });
         }
 
             var startPosX = windowPosition.x + 0.5 * iframeTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * iframeTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollGlide(targetLabel); });
         }
 
index 8240166..37b4429 100644 (file)
                 y: divTarget.scrollTop
             };
             eventSender.mouseMoveTo(100, 100);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "began", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "begin", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end", false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "began", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "begin");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "none", "continue");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end");
             eventSender.callAfterScrollingCompletes(checkForSingleAxisGlide);
         }
 
             };
 
             eventSender.mouseMoveTo(100, 100);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 1, "began", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none", false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 1, "began", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(1, 1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
             eventSender.callAfterScrollingCompletes(checkForScrollSnap);
         }
 
             };
 
             eventSender.mouseMoveTo(100, 100);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "began", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "changed", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "begin", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "continue", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end", false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "began", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "changed", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "begin");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, -1, "none", "continue");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end");
             eventSender.callAfterScrollingCompletes(checkForScrollGlide);
         }
 
index cb3b248..7b16d65 100644 (file)
             var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollSnap(targetLabel); });
         }
 
             var startPosX = windowPosition.x + divTarget.clientWidth - 10;
             var startPosY = windowPosition.y + 50;
             eventSender.mouseMoveTo(startPosX, startPosY);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollGlide(targetLabel); });
         }
 
index 9faf0ab..3f6cb30 100644 (file)
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(checkForScrollSnap);
         }
 
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(checkForScrollGlide);
         }
 
index a8d6f09..c8ea29c 100644 (file)
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(checkForScrollSnap);
         }
 
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-4, 0, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(checkForScrollGlide);
         }
 
index 1c71b0d..3d49fbc 100644 (file)
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(checkForScrollSnap);
         }
 
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(checkForScrollGlide);
         }
 
index 301adf9..eeb82d0 100644 (file)
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(checkForScrollSnap);
         }
 
             var startPosX = divTarget.offsetLeft + 20;
             var startPosY = divTarget.offsetTop + 20;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(checkForScrollGlide);
         }
 
index 8d181ec..af93d22 100644 (file)
@@ -49,9 +49,9 @@
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY);
             // Each unit of stateless scroll is scaled by 10 pixels.
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "none", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "none", "none", false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "none", "none", false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "none", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "none", "none");
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "none", "none");
             // Wait for the snapping to finish.
             setTimeout(function() {
                 if (divTarget.scrollTop != 400)
index f4ee06c..f04c688 100644 (file)
             var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollSnap(targetLabel); });
         }
 
             var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollGlide(targetLabel); });
         }
 
index 8c99d61..fc9bf8e 100644 (file)
             var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollSnap(targetLabel); });
         }
 
             var startPosX = windowPosition.x + divTarget.clientWidth - 10;
             var startPosY = windowPosition.y + 50;
             eventSender.mouseMoveTo(startPosX, startPosY);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollGlide(targetLabel); });
         }
 
index 5674051..be523ec 100644 (file)
             var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollSnap(targetLabel); });
         }
 
             var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
             var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
             eventSender.mouseMoveTo(startPosX, startPosY);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue', false);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'begin');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue');
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
             eventSender.callAfterScrollingCompletes(function() { return checkForScrollGlide(targetLabel); });
         }
 
index 524b045..4e20e4a 100644 (file)
@@ -19,15 +19,11 @@ function mouseWheelFired(e) {
 function scrollTest()
 {
     eventSender.mouseMoveTo(20, 20);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
 }
 
index 38ebf37..cb62c37 100644 (file)
@@ -1,3 +1,94 @@
+2015-08-21  Alexey Proskuryakov  <ap@apple.com>
+
+        Improve how UI events are dispatched by WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=148326
+
+        Reviewed by Anders Carlsson.
+
+        Added "fully synchronous mode for testing", in which all messages are dispatched
+        synchronously.
+
+        When an async message is sent in this mode, it is wrapped into a sync one automatically.
+
+        A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
+        or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
+        This makes sure that we don't increase potential for IPC misuse.
+
+        * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetShouldSendEventsSynchronously): Deleted.
+        * UIProcess/API/C/WKPagePrivate.h:
+        We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.
+
+        * WebProcess/WebPage/EventDispatcher.cpp:
+        (WebKit::EventDispatcher::wheelEvent):
+        (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
+        Removed code that was only needed to support pseudo-syncronous scrolling in tests.
+
+        * Platform/IPC/Connection.cpp:
+        (IPC::Connection::sendMessage):
+        (IPC::Connection::dispatchSyncMessage):
+        (IPC::Connection::dispatchMessage):
+        * Platform/IPC/Connection.h:
+        (IPC::Connection::allowFullySynchronousModeForTesting):
+        (IPC::Connection::sendSync):
+        * Platform/IPC/MessageDecoder.cpp:
+        (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
+        (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
+        (IPC::MessageDecoder::setImportanceAssertion):
+        (IPC::MessageDecoder::unwrapForTesting):
+        * Platform/IPC/MessageDecoder.h:
+        (IPC::MessageDecoder::UUID):
+        * Platform/IPC/MessageEncoder.cpp:
+        (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
+        (IPC::MessageEncoder::setFullySynchronousModeForTesting):
+        (IPC::MessageEncoder::wrapForTesting):
+        * Platform/IPC/MessageEncoder.h:
+        (IPC::MessageEncoder::UUID):
+        * Platform/IPC/MessageFlags.h:
+        * UIProcess/API/APIProcessPoolConfiguration.cpp:
+        (API::ProcessPoolConfiguration::copy):
+        * UIProcess/API/APIProcessPoolConfiguration.h:
+        * UIProcess/API/C/WKContextConfigurationRef.cpp:
+        (WKContextConfigurationSetMediaKeysStorageDirectory):
+        (WKContextConfigurationAllowFullySynchronousModeForTesting):
+        * UIProcess/API/C/WKContextConfigurationRef.h:
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::handleMouseEvent):
+        (WebKit::WebPageProxy::sendWheelEvent):
+        (WebKit::WebPageProxy::handleKeyboardEvent):
+        (WebKit::WebPageProxy::handleTouchEvent):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::renderTreeSize):
+        (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::processDidFinishLaunching):
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePagePostMessage):
+        (WKBundlePagePostSynchronousMessageForTesting):
+        (WKBundlePagePostSynchronousMessage): Deleted.
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::mouseEvent):
+        (WebKit::handleWheelEvent):
+        (WebKit::WebPage::wheelEvent):
+        (WebKit::handleKeyEvent):
+        (WebKit::WebPage::keyEvent):
+        (WebKit::WebPage::validateCommand):
+        (WebKit::WebPage::touchEvent):
+        (WebKit::WebPage::scroll):
+        (WebKit::WebPage::postMessage):
+        (WebKit::WebPage::postSynchronousMessageForTesting):
+        (WebKit::WebPage::mouseEventSyncForTesting): Deleted.
+        (WebKit::WebPage::wheelEventSyncForTesting): Deleted.
+        (WebKit::WebPage::keyEventSyncForTesting): Deleted.
+        (WebKit::WebPage::touchEventSyncForTesting): Deleted.
+        (WebKit::WebPage::postSynchronousMessage): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+
 2015-08-20  Matt Rajca  <mrajca@apple.com>
 
         Media Session: let UI clients change the volume of the focused media element
index 703d197..64eb375 100644 (file)
@@ -349,6 +349,14 @@ bool Connection::sendMessage(std::unique_ptr<MessageEncoder> encoder, unsigned m
     if (!isValid())
         return false;
 
+    if (m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting && !encoder->isSyncMessage() && !(encoder->messageReceiverName() == "IPC")) {
+        uint64_t syncRequestID;
+        auto wrappedMessage = createSyncMessageEncoder("IPC", "WrappedAsyncMessageForTesting", encoder->destinationID(), syncRequestID);
+        wrappedMessage->setFullySynchronousModeForTesting();
+        wrappedMessage->wrapForTesting(WTF::move(encoder));
+        return static_cast<bool>(sendSyncMessage(syncRequestID, WTF::move(wrappedMessage), std::chrono::milliseconds::max()));
+    }
+
     if (messageSendFlags & DispatchMessageEvenWhenWaitingForSyncReply
         && (!m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage
             || m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount))
@@ -832,8 +840,20 @@ void Connection::dispatchSyncMessage(MessageDecoder& decoder)
     auto replyEncoder = std::make_unique<MessageEncoder>("IPC", "SyncMessageReply", syncRequestID);
 #endif
 
-    // Hand off both the decoder and encoder to the client.
-    m_client->didReceiveSyncMessage(*this, decoder, replyEncoder);
+    if (decoder.messageReceiverName() == "IPC" && decoder.messageName() == "WrappedAsyncMessageForTesting") {
+        if (!m_fullySynchronousModeIsAllowedForTesting) {
+            decoder.markInvalid();
+            return;
+        }
+        std::unique_ptr<MessageDecoder> unwrappedDecoder = MessageDecoder::unwrapForTesting(decoder);
+        RELEASE_ASSERT(unwrappedDecoder);
+        processIncomingMessage(WTF::move(unwrappedDecoder));
+
+        SyncMessageState::singleton().dispatchMessages(nullptr);
+    } else {
+        // Hand off both the decoder and encoder to the client.
+        m_client->didReceiveSyncMessage(*this, decoder, replyEncoder);
+    }
 
     // FIXME: If the message was invalid, we should send back a SyncMessageError.
     ASSERT(!decoder.isInvalid());
@@ -887,6 +907,14 @@ void Connection::dispatchMessage(std::unique_ptr<MessageDecoder> message)
     if (!m_client)
         return;
 
+    if (message->shouldUseFullySynchronousModeForTesting()) {
+        if (!m_fullySynchronousModeIsAllowedForTesting) {
+            m_client->didReceiveInvalidMessage(*this, message->messageReceiverName(), message->messageName());
+            return;
+        }
+        m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting++;
+    }
+
     m_inDispatchMessageCount++;
 
     if (message->shouldDispatchMessageWhenWaitingForSyncReply())
@@ -908,6 +936,9 @@ void Connection::dispatchMessage(std::unique_ptr<MessageDecoder> message)
     if (message->shouldDispatchMessageWhenWaitingForSyncReply())
         m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount--;
 
+    if (message->shouldUseFullySynchronousModeForTesting())
+        m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting--;
+
     if (m_didReceiveInvalidMessage && m_client)
         m_client->didReceiveInvalidMessage(*this, message->messageReceiverName(), message->messageName());
 
index 7d10f2a..df36ea0 100644 (file)
@@ -68,6 +68,7 @@ enum SyncMessageSendFlags {
     // Some platform accessibility clients can't suspend gracefully and need to spin the run loop so WebProcess doesn't hang.
     // FIXME (126021): Remove when no platforms need to support this.
     SpinRunLoopWhileWaitingForReply = 1 << 1,
+    UseFullySynchronousModeForTesting = 1 << 2,
 };
 
 enum WaitForMessageFlags {
@@ -205,6 +206,8 @@ public:
     void uninstallIncomingSyncMessageCallback(uint64_t);
     bool hasIncomingSyncMessage();
 
+    void allowFullySynchronousModeForTesting() { m_fullySynchronousModeIsAllowedForTesting = true; }
+
 private:
     Connection(Identifier, bool isServer, Client&);
     void platformInitialize(Identifier);
@@ -256,6 +259,8 @@ private:
     unsigned m_inSendSyncCount;
     unsigned m_inDispatchMessageCount;
     unsigned m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount;
+    unsigned m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting { 0 };
+    bool m_fullySynchronousModeIsAllowedForTesting { false };
     bool m_didReceiveInvalidMessage;
 
     // Incoming messages.
@@ -368,7 +373,12 @@ template<typename T> bool Connection::sendSync(T&& message, typename T::Reply&&
 
     uint64_t syncRequestID = 0;
     std::unique_ptr<MessageEncoder> encoder = createSyncMessageEncoder(T::receiverName(), T::name(), destinationID, syncRequestID);
-    
+
+    if (syncSendFlags & SyncMessageSendFlags::UseFullySynchronousModeForTesting) {
+        encoder->setFullySynchronousModeForTesting();
+        m_fullySynchronousModeIsAllowedForTesting = true;
+    }
+
     // Encode the rest of the input arguments.
     encoder->encode(message.arguments());
 
index 97a759f..05f23ce 100644 (file)
@@ -74,6 +74,11 @@ bool MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply() const
     return m_messageFlags & DispatchMessageWhenWaitingForSyncReply;
 }
 
+bool MessageDecoder::shouldUseFullySynchronousModeForTesting() const
+{
+    return m_messageFlags & UseFullySynchronousModeForTesting;
+}
+
 #if PLATFORM(MAC)
 void MessageDecoder::setImportanceAssertion(std::unique_ptr<ImportanceAssertion> assertion)
 {
@@ -81,4 +86,21 @@ void MessageDecoder::setImportanceAssertion(std::unique_ptr<ImportanceAssertion>
 }
 #endif
 
+std::unique_ptr<MessageDecoder> MessageDecoder::unwrapForTesting(MessageDecoder& decoder)
+{
+    ASSERT(decoder.isSyncMessage());
+
+    Vector<Attachment> attachments;
+    Attachment attachment;
+    while (decoder.removeAttachment(attachment))
+        attachments.append(WTF::move(attachment));
+    attachments.reverse();
+
+    DataReference wrappedMessage;
+    if (!decoder.decode(wrappedMessage))
+        return nullptr;
+
+    return std::make_unique<MessageDecoder>(wrappedMessage, WTF::move(attachments));
+}
+
 } // namespace IPC
index 9d57c18..a2fa1d7 100644 (file)
@@ -54,6 +54,7 @@ public:
 
     bool isSyncMessage() const;
     bool shouldDispatchMessageWhenWaitingForSyncReply() const;
+    bool shouldUseFullySynchronousModeForTesting() const;
 
 #if PLATFORM(MAC)
     void setImportanceAssertion(std::unique_ptr<ImportanceAssertion>);
@@ -69,6 +70,8 @@ public:
     const uuid_t& UUID() const { return m_UUID; }
 #endif
 
+    static std::unique_ptr<MessageDecoder> unwrapForTesting(MessageDecoder&);
+
 private:
     uint8_t m_messageFlags;
     StringReference m_messageReceiverName;
index 7d09584..cb8370f 100644 (file)
@@ -27,6 +27,7 @@
 #include "MessageEncoder.h"
 
 #include "ArgumentCoders.h"
+#include "DataReference.h"
 #include "MessageFlags.h"
 #include "MessageRecorder.h"
 #include "StringReference.h"
@@ -100,4 +101,24 @@ void MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply(bool should
         *buffer() &= ~DispatchMessageWhenWaitingForSyncReply;
 }
 
+void MessageEncoder::setFullySynchronousModeForTesting()
+{
+    *buffer() |= UseFullySynchronousModeForTesting;
+}
+
+void MessageEncoder::wrapForTesting(std::unique_ptr<MessageEncoder> original)
+{
+    ASSERT(isSyncMessage());
+    ASSERT(!original->isSyncMessage());
+
+    original->setShouldDispatchMessageWhenWaitingForSyncReply(true);
+
+    encodeVariableLengthByteArray(DataReference(original->buffer(), original->bufferSize()));
+
+    Vector<Attachment> attachments = original->releaseAttachments();
+    reserve(attachments.size());
+    for (Attachment& attachment : attachments)
+        addAttachment(WTF::move(attachment));
+}
+
 } // namespace IPC
index 401c365..b52fb10 100644 (file)
@@ -56,10 +56,14 @@ public:
     void setShouldDispatchMessageWhenWaitingForSyncReply(bool);
     bool shouldDispatchMessageWhenWaitingForSyncReply() const;
 
+    void setFullySynchronousModeForTesting();
+
 #if HAVE(DTRACE)
     const uuid_t& UUID() const { return m_UUID; }
 #endif
 
+    void wrapForTesting(std::unique_ptr<MessageEncoder>);
+
 private:
     void encodeHeader();
 
index 187ca98..e8d3e5e 100644 (file)
@@ -31,6 +31,7 @@ namespace IPC {
 enum MessageFlags {
     SyncMessage = 1 << 0,
     DispatchMessageWhenWaitingForSyncReply = 1 << 1,
+    UseFullySynchronousModeForTesting = 1 << 2,
 };
 
 } // namespace IPC
index 482912f..0b4186b 100644 (file)
@@ -87,6 +87,7 @@ Ref<ProcessPoolConfiguration> ProcessPoolConfiguration::copy()
     copy->m_mediaKeysStorageDirectory = this->m_mediaKeysStorageDirectory;
     copy->m_webSQLDatabaseDirectory = this->m_webSQLDatabaseDirectory;
     copy->m_cachePartitionedURLSchemes = this->m_cachePartitionedURLSchemes;
+    copy->m_fullySynchronousModeIsAllowedForTesting = this->m_fullySynchronousModeIsAllowedForTesting;
     
     return copy;
 }
index 50e1f8f..4a7a49f 100644 (file)
@@ -87,6 +87,9 @@ public:
     const Vector<WTF::String>& cachePartitionedURLSchemes() { return m_cachePartitionedURLSchemes; }
     void setCachePartitionedURLSchemes(Vector<WTF::String>&& cachePartitionedURLSchemes) { m_cachePartitionedURLSchemes = WTF::move(cachePartitionedURLSchemes); }
 
+    bool fullySynchronousModeIsAllowedForTesting() const { return m_fullySynchronousModeIsAllowedForTesting; }
+    void setFullySynchronousModeIsAllowedForTesting(bool allowed) { m_fullySynchronousModeIsAllowedForTesting = allowed; }
+
 private:
     bool m_shouldHaveLegacyDataStore { false };
 
@@ -104,6 +107,7 @@ private:
     WTF::String m_webSQLDatabaseDirectory;
     WTF::String m_mediaKeysStorageDirectory;
     Vector<WTF::String> m_cachePartitionedURLSchemes;
+    bool m_fullySynchronousModeIsAllowedForTesting { false };
 };
 
 } // namespace API
index 84e43fe..f607cbf 100644 (file)
@@ -111,3 +111,13 @@ void WKContextConfigurationSetMediaKeysStorageDirectory(WKContextConfigurationRe
 {
     toImpl(configuration)->setMediaKeysStorageDirectory(toImpl(mediaKeysStorageDirectory)->string());
 }
+
+bool WKContextConfigurationFullySynchronousModeIsAllowedForTesting(WKContextConfigurationRef configuration)
+{
+    return toImpl(configuration)->fullySynchronousModeIsAllowedForTesting();
+}
+
+void WKContextConfigurationSetFullySynchronousModeIsAllowedForTesting(WKContextConfigurationRef configuration, bool allowed)
+{
+    toImpl(configuration)->setFullySynchronousModeIsAllowedForTesting(allowed);
+}
index 06e53c4..7019104 100644 (file)
@@ -55,6 +55,9 @@ WK_EXPORT void WKContextConfigurationSetWebSQLDatabaseDirectory(WKContextConfigu
 WK_EXPORT WKStringRef WKContextConfigurationCopyMediaKeysStorageDirectory(WKContextConfigurationRef configuration);
 WK_EXPORT void WKContextConfigurationSetMediaKeysStorageDirectory(WKContextConfigurationRef configuration, WKStringRef mediaKeysStorageDirectory);
 
+WK_EXPORT bool WKContextConfigurationFullySynchronousModeIsAllowedForTesting(WKContextConfigurationRef configuration);
+WK_EXPORT void WKContextConfigurationSetFullySynchronousModeIsAllowedForTesting(WKContextConfigurationRef configuration, bool allowed);
+
 #ifdef __cplusplus
 }
 #endif
index cf767ed..49862f8 100644 (file)
@@ -2283,11 +2283,6 @@ void WKPageEndPrinting(WKPageRef page)
 }
 #endif
 
-void WKPageSetShouldSendEventsSynchronously(WKPageRef page, bool sync)
-{
-    toImpl(page)->setShouldSendEventsSynchronously(sync);
-}
-
 bool WKPageGetAllowsRemoteInspection(WKPageRef page)
 {
 #if ENABLE(REMOTE_INSPECTOR)
index f995db2..ad9a9f8 100644 (file)
@@ -82,8 +82,6 @@ WK_EXPORT void WKPageBeginPrinting(WKPageRef page, WKFrameRef frame, WKPrintInfo
 WK_EXPORT void WKPageDrawPagesToPDF(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo, uint32_t first, uint32_t count, WKPageDrawToPDFFunction callback, void* context);
 WK_EXPORT void WKPageEndPrinting(WKPageRef page);
 
-WK_EXPORT void WKPageSetShouldSendEventsSynchronously(WKPageRef page, bool sync);
-
 WK_EXPORT bool WKPageGetAllowsRemoteInspection(WKPageRef page);
 WK_EXPORT void WKPageSetAllowsRemoteInspection(WKPageRef page, bool allow);
 
index a6df1c7..3659c56 100644 (file)
@@ -427,7 +427,6 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin
     , m_sessionRestorationRenderTreeSize(0)
     , m_wantsSessionRestorationRenderTreeSizeThresholdEvent(false)
     , m_hitRenderTreeSizeThreshold(false)
-    , m_shouldSendEventsSynchronously(false)
     , m_suppressVisibilityUpdates(false)
     , m_autoSizingShouldExpandToViewHeight(false)
     , m_mediaVolume(1)
@@ -1686,12 +1685,7 @@ void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent& event)
     if (event.type() == WebEvent::MouseDown)
         m_currentlyProcessedMouseDownEvent = std::make_unique<NativeWebMouseEvent>(event);
 
-    if (m_shouldSendEventsSynchronously) {
-        bool handled = false;
-        m_process->sendSync(Messages::WebPage::MouseEventSyncForTesting(event), Messages::WebPage::MouseEventSyncForTesting::Reply(handled), m_pageID);
-        didReceiveEvent(event.type(), handled);
-    } else
-        m_process->send(Messages::WebPage::MouseEvent(event), m_pageID);
+    m_process->send(Messages::WebPage::MouseEvent(event), m_pageID);
 }
 
 #if MERGE_WHEEL_EVENTS
@@ -1798,13 +1792,6 @@ void WebPageProxy::sendWheelEvent(const WebWheelEvent& event)
 {
     m_process->responsivenessTimer()->start();
 
-    if (m_shouldSendEventsSynchronously) {
-        bool handled = false;
-        m_process->sendSync(Messages::WebPage::WheelEventSyncForTesting(event), Messages::WebPage::WheelEventSyncForTesting::Reply(handled), m_pageID);
-        didReceiveEvent(event.type(), handled);
-        return;
-    }
-
     m_process->send(
         Messages::EventDispatcher::WheelEvent(
             m_pageID,
@@ -1826,11 +1813,7 @@ void WebPageProxy::handleKeyboardEvent(const NativeWebKeyboardEvent& event)
     m_keyEventQueue.append(event);
 
     m_process->responsivenessTimer()->start();
-    if (m_shouldSendEventsSynchronously) {
-        bool handled = false;
-        m_process->sendSync(Messages::WebPage::KeyEventSyncForTesting(event), Messages::WebPage::KeyEventSyncForTesting::Reply(handled), m_pageID);
-        didReceiveEvent(event.type(), handled);
-    } else if (m_keyEventQueue.size() == 1) // Otherwise, sent from DidReceiveEvent message handler.
+    if (m_keyEventQueue.size() == 1) // Otherwise, sent from DidReceiveEvent message handler.
         m_process->send(Messages::WebPage::KeyEvent(event), m_pageID);
 }
 
@@ -1973,12 +1956,7 @@ void WebPageProxy::handleTouchEvent(const NativeWebTouchEvent& event)
     if (!m_isPageSuspended) {
         m_touchEventQueue.append(event);
         m_process->responsivenessTimer()->start();
-        if (m_shouldSendEventsSynchronously) {
-            bool handled = false;
-            m_process->sendSync(Messages::WebPage::TouchEventSyncForTesting(event), Messages::WebPage::TouchEventSyncForTesting::Reply(handled), m_pageID);
-            didReceiveEvent(event.type(), handled);
-        } else
-            m_process->send(Messages::WebPage::TouchEvent(event), m_pageID);
+        m_process->send(Messages::WebPage::TouchEvent(event), m_pageID);
     } else {
         if (m_touchEventQueue.isEmpty()) {
             bool isEventHandled = false;
index 13fbbe6..42a2c19 100644 (file)
@@ -911,8 +911,6 @@ public:
 
     uint64_t renderTreeSize() const { return m_renderTreeSize; }
 
-    void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; };
-
     void printMainFrame();
     
     void setMediaVolume(float);
@@ -1724,8 +1722,6 @@ private:
     bool m_wantsSessionRestorationRenderTreeSizeThresholdEvent;
     bool m_hitRenderTreeSizeThreshold;
 
-    bool m_shouldSendEventsSynchronously;
-
     bool m_suppressVisibilityUpdates;
     bool m_autoSizingShouldExpandToViewHeight;
     WebCore::IntSize m_minimumLayoutSize;
index 8c5e6f9..7acca0a 100644 (file)
@@ -782,6 +782,9 @@ void WebProcessPool::processDidFinishLaunching(WebProcessProxy* process)
         process->send(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, m_memorySamplerInterval), 0);
     }
 
+    if (m_configuration->fullySynchronousModeIsAllowedForTesting())
+        process->connection()->allowFullySynchronousModeForTesting();
+
     m_connectionClient.didCreateConnection(this, process->webConnection());
 }
 
index 6b0e627..50e08c7 100644 (file)
@@ -605,11 +605,13 @@ void WKBundlePagePostMessage(WKBundlePageRef pageRef, WKStringRef messageNameRef
     toImpl(pageRef)->postMessage(toWTFString(messageNameRef), toImpl(messageBodyRef));
 }
 
-void WKBundlePagePostSynchronousMessage(WKBundlePageRef pageRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef, WKTypeRef* returnDataRef)
+void WKBundlePagePostSynchronousMessageForTesting(WKBundlePageRef pageRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef, WKTypeRef* returnDataRef)
 {
+    WebPage* page = toImpl(pageRef);
+    page->layoutIfNeeded();
+
     RefPtr<API::Object> returnData;
-    toImpl(pageRef)->postSynchronousMessage(toWTFString(messageNameRef), toImpl(messageBodyRef), returnData);
+    page->postSynchronousMessageForTesting(toWTFString(messageNameRef), toImpl(messageBodyRef), returnData);
     if (returnDataRef)
         *returnDataRef = toAPI(returnData.release().leakRef());
 }
-
index 5c85149..9089137 100644 (file)
@@ -115,7 +115,9 @@ typedef void (*WKBundlePageTestNotificationCallback)(void* context);
 WK_EXPORT void WKBundlePageRegisterScrollOperationCompletionCallback(WKBundlePageRef, WKBundlePageTestNotificationCallback, void* context);
 
 WK_EXPORT void WKBundlePagePostMessage(WKBundlePageRef page, WKStringRef messageName, WKTypeRef messageBody);
-WK_EXPORT void WKBundlePagePostSynchronousMessage(WKBundlePageRef page, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData);
+
+// Switches a connection into a fully synchronous mode, so all messages become synchronous until we get a response.
+WK_EXPORT void WKBundlePagePostSynchronousMessageForTesting(WKBundlePageRef page, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData);
 
 #ifdef __cplusplus
 }
index 3745151..8c4a0ac 100644 (file)
@@ -88,19 +88,6 @@ void EventDispatcher::initializeConnection(IPC::Connection* connection)
     connection->addWorkQueueMessageReceiver(Messages::EventDispatcher::messageReceiverName(), &m_queue.get(), this);
 }
 
-#if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
-static void updateWheelEventTestTriggersIfNeeded(uint64_t pageID)
-{
-    WebPage* webPage = WebProcess::singleton().webPage(pageID);
-    Page* page = webPage ? webPage->corePage() : nullptr;
-
-    if (!page || !page->expectsWheelEventTriggers())
-        return;
-
-    page->testTrigger()->deferTestsForReason(reinterpret_cast<WheelEventTestTrigger::ScrollableAreaIdentifier>(page), WheelEventTestTrigger::ScrollingThreadSyncNeeded);
-}
-#endif
-
 void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEvent, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
 {
     PlatformWheelEvent platformWheelEvent = platform(wheelEvent);
@@ -146,11 +133,6 @@ void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEven
 
         ScrollingTree::EventResult result = scrollingTree->tryToHandleWheelEvent(platformWheelEvent);
 
-#if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
-        if (result == ScrollingTree::DidHandleEvent)
-            updateWheelEventTestTriggersIfNeeded(pageID);
-#endif
-
         if (result == ScrollingTree::DidHandleEvent || result == ScrollingTree::DidNotHandleEvent) {
             sendDidReceiveEvent(pageID, wheelEvent, result == ScrollingTree::DidHandleEvent);
             return;
index 9f59523..8c661f9 100644 (file)
@@ -2049,34 +2049,6 @@ void WebPage::mouseEvent(const WebMouseEvent& mouseEvent)
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(mouseEvent.type()), handled));
 }
 
-void WebPage::mouseEventSyncForTesting(const WebMouseEvent& mouseEvent, bool& handled)
-{
-#if ENABLE(DRAG_SUPPORT)
-    if (m_isStartingDrag)
-        messageSenderConnection()->waitForAndDispatchImmediately<Messages::WebPage::DidStartDrag>(messageSenderDestinationID(), std::chrono::seconds(60));
-#endif
-
-    handled = false;
-#if !PLATFORM(IOS)
-    if (!handled && m_headerBanner)
-        handled = m_headerBanner->mouseEvent(mouseEvent);
-    if (!handled && m_footerBanner)
-        handled = m_footerBanner->mouseEvent(mouseEvent);
-#endif // !PLATFORM(IOS)
-
-    if (!handled) {
-        CurrentEvent currentEvent(mouseEvent);
-
-        // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse
-        // button is currently pressed. It is possible that neither of those things will be true since on 
-        // Lion when legacy scrollbars are enabled, WebKit receives mouse events all the time. If it is one 
-        // of those cases where the page is not active and the mouse is not pressed, then we can fire a more
-        // efficient scrollbars-only version of the event.
-        bool onlyUpdateScrollbars = !(m_page->focusController().isActive() || (mouseEvent.button() != WebMouseEvent::NoButton));
-        handled = handleMouseEvent(mouseEvent, this, onlyUpdateScrollbars);
-    }
-}
-
 static bool handleWheelEvent(const WebWheelEvent& wheelEvent, Page* page)
 {
     Frame& frame = page->mainFrame();
@@ -2101,16 +2073,6 @@ void WebPage::wheelEvent(const WebWheelEvent& wheelEvent)
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(wheelEvent.type()), handled));
 }
 
-void WebPage::wheelEventSyncForTesting(const WebWheelEvent& wheelEvent, bool& handled)
-{
-    CurrentEvent currentEvent(wheelEvent);
-
-    if (ScrollingCoordinator* scrollingCoordinator = m_page->scrollingCoordinator())
-        scrollingCoordinator->commitTreeStateIfNeeded();
-
-    handled = handleWheelEvent(wheelEvent, m_page.get());
-}
-
 static bool handleKeyEvent(const WebKeyboardEvent& keyboardEvent, Page* page)
 {
     if (!page->mainFrame().view())
@@ -2138,18 +2100,6 @@ void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent)
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(keyboardEvent.type()), handled));
 }
 
-void WebPage::keyEventSyncForTesting(const WebKeyboardEvent& keyboardEvent, bool& handled)
-{
-    CurrentEvent currentEvent(keyboardEvent);
-
-    Frame& frame = m_page->focusController().focusedOrMainFrame();
-    frame.document()->updateStyleIfNeeded();
-
-    handled = handleKeyEvent(keyboardEvent, m_page.get());
-    if (!handled)
-        handled = performDefaultBehaviorForKeyEvent(keyboardEvent);
-}
-
 void WebPage::validateCommand(const String& commandName, uint64_t callbackID)
 {
     bool isEnabled = false;
@@ -2219,12 +2169,6 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
     }
     send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(touchEvent.type()), handled));
 }
-
-void WebPage::touchEventSyncForTesting(const WebTouchEvent& touchEvent, bool& handled)
-{
-    CurrentEvent currentEvent(touchEvent);
-    handled = handleTouchEvent(touchEvent, m_page.get());
-}
 #endif
 
 bool WebPage::scroll(Page* page, ScrollDirection direction, ScrollGranularity granularity)
@@ -5022,12 +4966,12 @@ void WebPage::postMessage(const String& messageName, API::Object* messageBody)
     send(Messages::WebPageProxy::HandleMessage(messageName, UserData(WebProcess::singleton().transformObjectsToHandles(messageBody))));
 }
 
-void WebPage::postSynchronousMessage(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
+void WebPage::postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
 {
     UserData returnUserData;
 
     auto& webProcess = WebProcess::singleton();
-    if (!sendSync(Messages::WebPageProxy::HandleSynchronousMessage(messageName, UserData(webProcess.transformObjectsToHandles(messageBody))), Messages::WebPageProxy::HandleSynchronousMessage::Reply(returnUserData)))
+    if (!sendSync(Messages::WebPageProxy::HandleSynchronousMessage(messageName, UserData(webProcess.transformObjectsToHandles(messageBody))), Messages::WebPageProxy::HandleSynchronousMessage::Reply(returnUserData), std::chrono::milliseconds::max(), IPC::SyncMessageSendFlags::UseFullySynchronousModeForTesting))
         returnData = nullptr;
     else
         returnData = webProcess.transformHandlesToObjects(returnUserData.object());
index 7f0c1fe..aed049a 100644 (file)
@@ -901,7 +901,7 @@ public:
     void setPageActivityState(WebCore::PageActivityState::Flags);
 
     void postMessage(const String& messageName, API::Object* messageBody);
-    void postSynchronousMessage(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
+    void postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
 
 #if PLATFORM(GTK)
     void setInputMethodState(bool);
@@ -990,15 +990,11 @@ private:
     void updateUserActivity();
 
     void mouseEvent(const WebMouseEvent&);
-    void mouseEventSyncForTesting(const WebMouseEvent&, bool&);
-    void wheelEventSyncForTesting(const WebWheelEvent&, bool&);
     void keyEvent(const WebKeyboardEvent&);
-    void keyEventSyncForTesting(const WebKeyboardEvent&, bool&);
 #if ENABLE(IOS_TOUCH_EVENTS)
     void touchEventSync(const WebTouchEvent&, bool& handled);
 #elif ENABLE(TOUCH_EVENTS)
     void touchEvent(const WebTouchEvent&);
-    void touchEventSyncForTesting(const WebTouchEvent&, bool& handled);
 #endif
 #if ENABLE(CONTEXT_MENUS)
     void contextMenuHidden() { m_isShowingContextMenu = false; }
index baf169a..a647180 100644 (file)
@@ -38,10 +38,7 @@ messages -> WebPage LegacyReceiver {
     ViewWillEndLiveResize()
 
     KeyEvent(WebKit::WebKeyboardEvent event)
-    KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
     MouseEvent(WebKit::WebMouseEvent event)
-    MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
-    WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
 #if PLATFORM(IOS)
     SetViewportConfigurationMinimumLayoutSize(WebCore::FloatSize size)
     SetMaximumUnobscuredSize(WebCore::FloatSize size)
@@ -107,7 +104,6 @@ messages -> WebPage LegacyReceiver {
 #endif
 #if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS)
     TouchEvent(WebKit::WebTouchEvent event)
-    TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
 #endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
index 464d712..52d5dd2 100644 (file)
@@ -1,3 +1,67 @@
+2015-08-21  Alexey Proskuryakov  <ap@apple.com>
+
+        Improve how UI events are dispatched by WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=148326
+
+        Reviewed by Anders Carlsson.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
+        * WebKitTestRunner/InjectedBundle/EventSendingController.h:
+        Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always
+        asynchronous (and really, it has always been for the most part).
+
+        * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
+        (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming.
+        (WTR::EventSendingController::mouseUp): Ditto.
+        (WTR::EventSendingController::mouseMoveTo): Ditto.
+        (WTR::EventSendingController::mouseForceDown): Ditto.
+        (WTR::EventSendingController::mouseForceUp): Ditto.
+        (WTR::EventSendingController::mouseForceChanged): Ditto.
+        (WTR::EventSendingController::leapForward): Ditto.
+        (WTR::EventSendingController::scheduleAsynchronousClick): Ditto.
+        (WTR::EventSendingController::keyDown): Ditto.
+        (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto.
+        (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used
+        to be done in custom WebKit2 code for test wheel event handling.
+        (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version.
+        (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird.
+        (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming.
+        (WTR::EventSendingController::addTouchPoint): Ditto.
+        (WTR::EventSendingController::updateTouchPoint): Ditto.
+        (WTR::EventSendingController::setTouchModifier): Ditto.
+        (WTR::EventSendingController::setTouchPointRadius): Ditto.
+        (WTR::EventSendingController::touchStart): Ditto.
+        (WTR::EventSendingController::touchMove): Ditto.
+        (WTR::EventSendingController::touchEnd): Ditto.
+        (WTR::EventSendingController::touchCancel): Ditto.
+        (WTR::EventSendingController::clearTouchPoints): Ditto.
+        (WTR::EventSendingController::releaseTouchPoint): Ditto.
+        (WTR::EventSendingController::cancelTouchPoint): Ditto.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::postSetWindowIsKey):
+        (WTR::InjectedBundle::postSimulateWebNotificationClick):
+        (WTR::InjectedBundle::isGeolocationProviderActive):
+        (WTR::InjectedBundle::shouldProcessWorkQueue):
+        Updated for WKBundlePagePostSynchronousMessage renaming.
+
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::secureEventInputIsEnabled): Ditto.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::initialize): Allow handling the new test style messages.
+        (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls
+        to WKPageSetShouldSendEventsSynchronously, which we no longer need.
+        (WTR::TestController::didReceiveMessageFromInjectedBundle):
+        (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved
+        "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously.
+
+        * WebKitTestRunner/mac/EventSenderProxy.mm:
+        (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously.
+        (WTR::EventSenderProxy::keyDown): Ditto.
+        (WTR::EventSenderProxy::mouseScrollBy): Ditto.
+        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto.
+
 2015-08-21  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Skip no-llint tests that fail due to running out of executable memory after r188969
index 56a91b1..47f4b97 100644 (file)
@@ -31,7 +31,7 @@ interface EventSendingController {
     void mouseForceUp();
     void mouseForceChanged(double force);
     void mouseScrollBy(long x, long y);
-    void mouseScrollByWithWheelAndMomentumPhases(long x, long y, DOMString phase, DOMString momentum, optional boolean asyncScrolling);
+    void mouseScrollByWithWheelAndMomentumPhases(long x, long y, DOMString phase, DOMString momentum);
     void continuousMouseScrollBy(long x, long y, optional boolean paged);
     object contextClick();
     void scheduleAsynchronousClick();
index b9bc693..b007dcf 100644 (file)
@@ -217,7 +217,7 @@ void EventSendingController::mouseDown(int button, JSValueRef modifierArray)
     WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
     WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, createMouseMessageBody(MouseDown, button, modifiers));
 
-    WKBundlePagePostSynchronousMessage(page, EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(page, EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::mouseUp(int button, JSValueRef modifierArray)
@@ -230,7 +230,7 @@ void EventSendingController::mouseUp(int button, JSValueRef modifierArray)
     WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
     WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, createMouseMessageBody(MouseUp, button, modifiers));
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::mouseMoveTo(int x, int y)
@@ -252,7 +252,7 @@ void EventSendingController::mouseMoveTo(int x, int y)
 
     m_position = WKPointMake(x, y);
     
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::mouseForceDown()
@@ -264,7 +264,7 @@ void EventSendingController::mouseForceDown()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("MouseForceDown"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::mouseForceUp()
@@ -276,7 +276,7 @@ void EventSendingController::mouseForceUp()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("MouseForceUp"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::mouseForceChanged(double force)
@@ -292,7 +292,7 @@ void EventSendingController::mouseForceChanged(double force)
     WKRetainPtr<WKDoubleRef> forceRef(AdoptWK, WKDoubleCreate(force));
     WKDictionarySetItem(EventSenderMessageBody.get(), forceKey.get(), forceRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::leapForward(int milliseconds)
@@ -308,7 +308,7 @@ void EventSendingController::leapForward(int milliseconds)
     WKRetainPtr<WKUInt64Ref> timeRef(AdoptWK, WKUInt64Create(milliseconds));
     WKDictionarySetItem(EventSenderMessageBody.get(), timeKey.get(), timeRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::scheduleAsynchronousClick()
@@ -359,7 +359,7 @@ void EventSendingController::keyDown(JSStringRef key, JSValueRef modifierArray,
     WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
     WKRetainPtr<WKMutableDictionaryRef> keyDownMessageBody = createKeyDownMessageBody(key, modifiers, location);
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), keyDownMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), keyDownMessageBody.get(), 0);
 }
 
 void EventSendingController::scheduleAsynchronousKeyDown(JSStringRef key)
@@ -387,10 +387,11 @@ void EventSendingController::mouseScrollBy(int x, int y)
     WKRetainPtr<WKDoubleRef> yRef(AdoptWK, WKDoubleCreate(y));
     WKDictionarySetItem(EventSenderMessageBody.get(), yKey.get(), yRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePageForceRepaint(InjectedBundle::singleton().page()->page()); // Triggers a scrolling tree commit.
+    WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get());
 }
 
-void EventSendingController::mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phaseStr, JSStringRef momentumStr, bool asyncScrolling)
+void EventSendingController::mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phaseStr, JSStringRef momentumStr)
 {
     WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
     WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
@@ -439,10 +440,8 @@ void EventSendingController::mouseScrollByWithWheelAndMomentumPhases(int x, int
     WKRetainPtr<WKUInt64Ref> momentumRef(AdoptWK, WKUInt64Create(momentum));
     WKDictionarySetItem(EventSenderMessageBody.get(), momentumKey.get(), momentumRef.get());
 
-    if (asyncScrolling)
-        WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get());
-    else
-        WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePageForceRepaint(InjectedBundle::singleton().page()->page()); // Triggers a scrolling tree commit.
+    WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get());
 }
 
 void EventSendingController::continuousMouseScrollBy(int x, int y, bool paged)
@@ -466,7 +465,9 @@ void EventSendingController::continuousMouseScrollBy(int x, int y, bool paged)
     WKRetainPtr<WKUInt64Ref> pagedRef(AdoptWK, WKUInt64Create(paged));
     WKDictionarySetItem(EventSenderMessageBody.get(), pagedKey.get(), pagedRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    // FIXME: This message should be asynchronous, as scrolling is intrinsically asynchronous.
+    // See also: <https://bugs.webkit.org/show_bug.cgi?id=148256>.
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 JSValueRef EventSendingController::contextClick()
@@ -612,7 +613,7 @@ void EventSendingController::addTouchPoint(int x, int y)
     WKRetainPtr<WKUInt64Ref> yRef(AdoptWK, WKUInt64Create(y));
     WKDictionarySetItem(EventSenderMessageBody.get(), yKey.get(), yRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::updateTouchPoint(int index, int x, int y)
@@ -636,7 +637,7 @@ void EventSendingController::updateTouchPoint(int index, int x, int y)
     WKRetainPtr<WKUInt64Ref> yRef(AdoptWK, WKUInt64Create(y));
     WKDictionarySetItem(EventSenderMessageBody.get(), yKey.get(), yRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::setTouchModifier(const JSStringRef &modifier, bool enable)
@@ -666,7 +667,7 @@ void EventSendingController::setTouchModifier(const JSStringRef &modifier, bool
     WKRetainPtr<WKUInt64Ref> enableRef(AdoptWK, WKUInt64Create(enable));
     WKDictionarySetItem(EventSenderMessageBody.get(), enableKey.get(), enableRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 
@@ -687,7 +688,7 @@ void EventSendingController::setTouchPointRadius(int radiusX, int radiusY)
     WKRetainPtr<WKUInt64Ref> yRef(AdoptWK, WKUInt64Create(radiusY));
     WKDictionarySetItem(EventSenderMessageBody.get(), yKey.get(), yRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::touchStart()
@@ -699,7 +700,7 @@ void EventSendingController::touchStart()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("TouchStart"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::touchMove()
@@ -711,7 +712,7 @@ void EventSendingController::touchMove()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("TouchMove"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::touchEnd()
@@ -723,7 +724,7 @@ void EventSendingController::touchEnd()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("TouchEnd"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::touchCancel()
@@ -735,7 +736,7 @@ void EventSendingController::touchCancel()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("TouchCancel"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::clearTouchPoints()
@@ -747,7 +748,7 @@ void EventSendingController::clearTouchPoints()
     WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("ClearTouchPoints"));
     WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::releaseTouchPoint(int index)
@@ -763,7 +764,7 @@ void EventSendingController::releaseTouchPoint(int index)
     WKRetainPtr<WKUInt64Ref> indexRef(AdoptWK, WKUInt64Create(index));
     WKDictionarySetItem(EventSenderMessageBody.get(), indexKey.get(), indexRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 
 void EventSendingController::cancelTouchPoint(int index)
@@ -779,7 +780,7 @@ void EventSendingController::cancelTouchPoint(int index)
     WKRetainPtr<WKUInt64Ref> indexRef(AdoptWK, WKUInt64Create(index));
     WKDictionarySetItem(EventSenderMessageBody.get(), indexKey.get(), indexRef.get());
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
 }
 #endif
 
index ed77da1..4e8100c 100644 (file)
@@ -50,7 +50,7 @@ public:
     void mouseForceUp();
     void mouseForceChanged(double force);
     void mouseScrollBy(int x, int y);
-    void mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phase, JSStringRef momentum, bool asyncScrolling);
+    void mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phase, JSStringRef momentum);
     void continuousMouseScrollBy(int x, int y, bool paged);
     JSValueRef contextClick();
     void leapForward(int milliseconds);
index 7e77322..99c8645 100644 (file)
@@ -381,7 +381,7 @@ void InjectedBundle::postSetWindowIsKey(bool isKey)
 {
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetWindowIsKey"));
     WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(isKey));
-    WKBundlePagePostSynchronousMessage(page()->page(), messageName.get(), messageBody.get(), 0);
+    WKBundlePagePostSynchronousMessageForTesting(page()->page(), messageName.get(), messageBody.get(), 0);
 }
 
 void InjectedBundle::postSimulateWebNotificationClick(uint64_t notificationID)
@@ -468,7 +468,7 @@ bool InjectedBundle::isGeolocationProviderActive() const
 {
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("IsGeolocationClientActive"));
     WKTypeRef resultToPass = 0;
-    WKBundlePagePostSynchronousMessage(page()->page(), messageName.get(), 0, &resultToPass);
+    WKBundlePagePostSynchronousMessageForTesting(page()->page(), messageName.get(), 0, &resultToPass);
     WKRetainPtr<WKBooleanRef> isActive(AdoptWK, static_cast<WKBooleanRef>(resultToPass));
 
     return WKBooleanGetValue(isActive.get());
@@ -524,7 +524,7 @@ bool InjectedBundle::shouldProcessWorkQueue() const
 
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("IsWorkQueueEmpty"));
     WKTypeRef resultToPass = 0;
-    WKBundlePagePostSynchronousMessage(page()->page(), messageName.get(), 0, &resultToPass);
+    WKBundlePagePostSynchronousMessageForTesting(page()->page(), messageName.get(), 0, &resultToPass);
     WKRetainPtr<WKBooleanRef> isEmpty(AdoptWK, static_cast<WKBooleanRef>(resultToPass));
 
     return !WKBooleanGetValue(isEmpty.get());
index d9c32ef..0100a3b 100644 (file)
@@ -831,7 +831,7 @@ bool TestRunner::secureEventInputIsEnabled() const
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SecureEventInputIsEnabled"));
     WKTypeRef returnData = 0;
 
-    WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), messageName.get(), 0, &returnData);
+    WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), 0, &returnData);
     return WKBooleanGetValue(static_cast<WKBooleanRef>(returnData));
 }
 
index 0383c1f..b2f77fb 100644 (file)
@@ -358,6 +358,7 @@ void TestController::initialize(int argc, const char* argv[])
 
     auto configuration = adoptWK(WKContextConfigurationCreate());
     WKContextConfigurationSetInjectedBundlePath(configuration.get(), injectedBundlePath());
+    WKContextConfigurationSetFullySynchronousModeIsAllowedForTesting(configuration.get(), true);
 
     if (const char* dumpRenderTreeTemp = libraryPathForTesting()) {
         String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp);
@@ -987,13 +988,7 @@ void TestController::didReceiveKeyDownMessageFromInjectedBundle(WKDictionaryRef
     WKRetainPtr<WKStringRef> locationKey = adoptWK(WKStringCreateWithUTF8CString("Location"));
     unsigned location = static_cast<unsigned>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, locationKey.get()))));
 
-    if (synchronous)
-        WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
-
     m_eventSenderProxy->keyDown(key, modifiers, location);
-
-    if (synchronous)
-        WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
 }
 
 void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody)
@@ -1013,7 +1008,6 @@ void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName
             WKEventModifiers modifiers = static_cast<WKEventModifiers>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, modifiersKey.get()))));
 
             // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             if (WKStringIsEqualToUTF8CString(subMessageName, "MouseDown"))
                 m_eventSenderProxy->mouseDown(button, modifiers);
             else
@@ -1028,6 +1022,18 @@ void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName
             return;
         }
 
+        if (WKStringIsEqualToUTF8CString(subMessageName, "MouseScrollBy")) {
+            WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("X"));
+            double x = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
+
+            WKRetainPtr<WKStringRef> yKey = adoptWK(WKStringCreateWithUTF8CString("Y"));
+            double y = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get())));
+
+            // Forward to WebProcess
+            m_eventSenderProxy->mouseScrollBy(x, y);
+            return;
+        }
+
         if (WKStringIsEqualToUTF8CString(subMessageName, "MouseScrollByWithWheelAndMomentumPhases")) {
             WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("X"));
             double x = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
@@ -1041,7 +1047,6 @@ void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName
             int momentum = static_cast<int>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, momentumKey.get()))));
             
             // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             m_eventSenderProxy->mouseScrollByWithWheelAndMomentumPhases(x, y, phase, momentum);
 
             return;
@@ -1079,12 +1084,10 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
             WKEventModifiers modifiers = static_cast<WKEventModifiers>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, modifiersKey.get()))));
 
             // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             if (WKStringIsEqualToUTF8CString(subMessageName, "MouseDown"))
                 m_eventSenderProxy->mouseDown(button, modifiers);
             else
                 m_eventSenderProxy->mouseUp(button, modifiers);
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
@@ -1096,24 +1099,18 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
             double y = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get())));
 
             // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->mouseMoveTo(x, y);
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
 #if PLATFORM(MAC)
         if (WKStringIsEqualToUTF8CString(subMessageName, "MouseForceDown")) {
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->mouseForceDown();
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
         if (WKStringIsEqualToUTF8CString(subMessageName, "MouseForceUp")) {
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->mouseForceUp();
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
@@ -1121,46 +1118,11 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
             WKRetainPtr<WKStringRef> forceKey = adoptWK(WKStringCreateWithUTF8CString("Force"));
             double force = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, forceKey.get())));
 
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->mouseForceChanged(force);
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 #endif // PLATFORM(MAC)
 
-        if (WKStringIsEqualToUTF8CString(subMessageName, "MouseScrollBy")) {
-            WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("X"));
-            double x = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
-
-            WKRetainPtr<WKStringRef> yKey = adoptWK(WKStringCreateWithUTF8CString("Y"));
-            double y = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get())));
-
-            // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
-            m_eventSenderProxy->mouseScrollBy(x, y);
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
-            return 0;
-        }
-
-        if (WKStringIsEqualToUTF8CString(subMessageName, "MouseScrollByWithWheelAndMomentumPhases")) {
-            WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("X"));
-            double x = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
-            
-            WKRetainPtr<WKStringRef> yKey = adoptWK(WKStringCreateWithUTF8CString("Y"));
-            double y = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get())));
-            
-            WKRetainPtr<WKStringRef> phaseKey = adoptWK(WKStringCreateWithUTF8CString("Phase"));
-            int phase = static_cast<int>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, phaseKey.get()))));
-            WKRetainPtr<WKStringRef> momentumKey = adoptWK(WKStringCreateWithUTF8CString("Momentum"));
-            int momentum = static_cast<int>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, momentumKey.get()))));
-
-            // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
-            m_eventSenderProxy->mouseScrollByWithWheelAndMomentumPhases(x, y, phase, momentum);
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
-            return 0;
-        }
-        
         if (WKStringIsEqualToUTF8CString(subMessageName, "ContinuousMouseScrollBy")) {
             WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("X"));
             double x = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
@@ -1172,9 +1134,7 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
             bool paged = static_cast<bool>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, pagedKey.get()))));
 
             // Forward to WebProcess
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->continuousMouseScrollBy(x, y, paged);
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
@@ -1235,30 +1195,22 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
         }
 
         if (WKStringIsEqualToUTF8CString(subMessageName, "TouchStart")) {
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->touchStart();
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
         if (WKStringIsEqualToUTF8CString(subMessageName, "TouchMove")) {
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->touchMove();
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
         if (WKStringIsEqualToUTF8CString(subMessageName, "TouchEnd")) {
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->touchEnd();
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
         if (WKStringIsEqualToUTF8CString(subMessageName, "TouchCancel")) {
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->touchCancel();
-            WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
             return 0;
         }
 
index a8a219a..ab0df84 100644 (file)
@@ -417,9 +417,7 @@ void EventSenderProxy::mouseMoveTo(double x, double y)
     NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]];
     if (targetView) {
         [NSApp _setCurrentEvent:event];
-        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), true);
         [targetView mouseMoved:event];
-        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), false);
         [NSApp _setCurrentEvent:nil];
     } else {
         NSPoint windowLocation = [event locationInWindow];
@@ -612,8 +610,6 @@ void EventSenderProxy::keyDown(WKStringRef key, WKEventModifiers modifiers, unsi
     if (keyLocation == 0x03 /*DOM_KEY_LOCATION_NUMPAD*/)
         modifierFlags |= NSNumericPadKeyMask;
 
-    // FIXME: [[[mainFrame frameView] documentView] layout];
-
     NSEvent *event = [NSEvent keyEventWithType:NSKeyDown
                         location:NSMakePoint(5, 5)
                         modifierFlags:modifierFlags
@@ -658,9 +654,7 @@ void EventSenderProxy::mouseScrollBy(int x, int y)
     NSEvent *event = [NSEvent eventWithCGEvent:cgScrollEvent.get()];
     if (NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]]) {
         [NSApp _setCurrentEvent:event];
-        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), true);
         [targetView scrollWheel:event];
-        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), false);
         [NSApp _setCurrentEvent:nil];
     } else {
         NSPoint location = [event locationInWindow];
@@ -693,9 +687,7 @@ void EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases(int x, int y, int
     // Our event should have the correct settings:
     if (NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]]) {
         [NSApp _setCurrentEvent:event];
-        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), true);
         [targetView scrollWheel:event];
-        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), false);
         [NSApp _setCurrentEvent:nil];
     } else {
         NSPoint windowLocation = [event locationInWindow];