SyntheticGestures used by LayoutTests and perf benchmarks use a callback to notify the client when the gesture has completed. Today, this callback is executed when the last event of the gesture is dispatched, e.g. the GestureScrollEnd in a SmoothScroll gesture.
This is a problem because this only tells the client the events have been dispatched. They must go through several rounds of queueing: browser-side dispatch queues, IPC/Mojo, compositor and main thread queues.
Even once the events have been handled, their effects may not be visible to future input or JavaScript. For example:
- Events handled on the main thread need to commit and activate the pending tree in order for future input (handled on compositor thread) to see the changes
- Events handled on the impl thread need to commit before JS can see the changes
These faults have led to flaky tests since it's difficult/impossible in some cases to know when a gesture's changes are truly in effect.
This bug tracks introducing plumbing to allow SyntheticGestures to resolve the callback only when these effects are fully propagated through the system.
Comment 1 by bokan@chromium.org
, Nov 22