Repository navigation
script: Dispatch touch compatibility mouse events synchronously in ScriptThread - #48671
Merged
Merged
Conversation
Signed-off-by: Euclid Ye <[email protected]>
Signed-off-by: Euclid Ye <[email protected]>
Signed-off-by: Euclid Ye <[email protected]>
ScriptThread
|
🔨 Triggering try run (#37444305552) for Linux (WPT) |
|
Test results for linux-wpt from try job (#37444305552): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (9)
|
|
✨ Try run (#37444305552) succeeded. |
Narfinger
approved these changes
Oct 6, 2026
hhhwsqhhh
pushed a commit
to hhhwsqhhh/servo
that referenced
this pull request
Oct 12, 2026
…criptThread` (servo#48671) Compatibility mouse events for a tap were synthesized by the paint thread as new input events after confirmed by script->constellation->embedder->paint, so they were processed on a later rendering tick than the touchend that triggered them, making touch tests racy/flaky. One particular serious case is, the hit-test for compat mouse events happened when the layout state has already changed. This simplifies API as well, by removing unused `render_api` in `notify_input_event_handled` and point in `PendingClick`. It also simplifies messaging: `simulate_mouse_click` is now removed from paint, which was like paint -> constellation -> script -> embedder -> paint, and repeated 3 times as we had duplicate hit-test 3 times! Testing: `mouseevents-after-touchend.tentative.html` and `/touch-events/hover-state-caused-by-compatibility-mouse-events.tentative.html` has new passing and no longer intermittent. WebDriver `perform_actions/pointer_touch.py` has 4 more new failures: this is newly filed servo#48619 which has always been there, but previously hidden. Fixes: servo#36957 (review), performance related concern Fixes: servo#40233, incorrect behaviour ### Intermittent ones Fixes: servo#46497 Fixes: servo#42813 Fixes: servo#46781 Fixes: servo#46277 Fixes: servo#41175 Fixes: servo#44693 And probably some I'm not aware of yet. --------- Signed-off-by: Euclid Ye <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compatibility mouse events for a tap were synthesized by the paint thread as new
input events after confirmed by script->constellation->embedder->paint,
so they were processed on a later rendering tick than the touchend that triggered them, making touch tests racy/flaky.
One particular serious case is, the hit-test for compat mouse events happened when the layout state has already changed.
This simplifies API as well, by removing unused
render_apiinnotify_input_event_handledand point inPendingClick.It also simplifies messaging:
simulate_mouse_clickis now removed from paint, which was likepaint -> constellation -> script -> embedder -> paint, and repeated 3 times as we had duplicate hit-test 3 times!
Testing:
mouseevents-after-touchend.tentative.htmland/touch-events/hover-state-caused-by-compatibility-mouse-events.tentative.htmlhas new passing and no longer intermittent.WebDriver
perform_actions/pointer_touch.pyhas 4 more new failures: this is newly filed #48619 which hasalways been there, but previously hidden.
Fixes: #36957 (review), performance related concern
Fixes: #40233, incorrect behaviour
Intermittent ones
Fixes: #46497
Fixes: #42813
Fixes: #46781
Fixes: #46277
Fixes: #41175
Fixes: #44693
And probably some I'm not aware of yet.