[webkit-changes] [WebKit/WebKit] b9a297: [UI-side compositing] fast/scrolling/mac/momentum-...
Simon Fraser
noreply at github.com
Tue Apr 4 16:35:57 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b9a297652bdcc651ab0621152c9751da494289aa
https://github.com/WebKit/WebKit/commit/b9a297652bdcc651ab0621152c9751da494289aa
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-04-04 (Tue, 04 Apr 2023)
Changed paths:
M Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h
M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
M Tools/WebKitTestRunner/mac/EventSenderProxy.mm
Log Message:
-----------
[UI-side compositing] fast/scrolling/mac/momentum-scroll-with-borders.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=254855
rdar://107499791
Reviewed by Tim Horton.
Tests that use `UIHelper.mouseWheelSequence()` are flakey. `mouseWheelSequence()` generates a sequence
of wheel events in the UI process and dispatches them, and then waits on `eventSender.callAfterScrollingCompletes()`,
which internally uses `WheelEventTestMonitor`.
`WheelEventTestMonitor` stores state tracking whether events related to the end of the gesture have been dispatched
(m_expectWheelEndOrCancel, m_expectMomentumEnd), and that state normally gets updated when `EventSendingController`,
which runs in the web process, messages the UI process to synthesize the events. However, in the `mouseWheelSequence`
code path, in which the events are synthesized directly by the UI process via `UIScriptControllerMac::sendEventStream()`,
we never get to set the state on `WheelEventTestMonitor`.
Fix by having `EventSenderProxy::sendWheelEvent`, which is called in the UI process, message the injected bundle
which we can respond to in `InjectedBundle::didReceiveMessageToPage()` to set the appropriate state on
`EventSendingController`.
* Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h:
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* Tools/WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::sendWheelEvent):
Canonical link: https://commits.webkit.org/262598@main
More information about the webkit-changes
mailing list