-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Synchronize WebdriverScriptEvent
with pending input events
#36830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I have many doubts. If we handle Also, I still run into the following problem with this PR |
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> Co-authored-by: batu_hoang <longvatrong111@gmail.com>
2132768
to
569c5c7
Compare
Yes I think we can find another solution, as long as About this issuse, it's a newly separated issue of |
It seems the reason I only get "mousemove, mousedown, mouseup" but never the last "mouseclick" is because the wrong button is sent by webdriver.. Middle button is sent instead of left. https://www.w3.org/TR/pointerevents/#the-button-property servo/components/webdriver_server/lib.rs Lines 1631 to 1641 in 8b05b74
@longvatrong111 is going to fix this one :) |
I don't this this will work. If web driver fires interleaving input and script events, this approach still doesn't produce the correct handling order. IIUC the goal is to fix the WebDriver conformance tests, which are written in python. Is it possible to make the input event calls wait for the event completion? Btw, script events updating DOM might be fine, since input events on their own can also have listeners that update the DOM. |
We can let input event calls wait, but we need start with I think we have some options:
I'm not sure which is most fit with the standard. This's my previous concern. |
I considered this option as the ultimate solution before.. But it seems not possible according to my prior discussion... |
Offline discussed with @xiaochengh : |
Follow up of #36714
ScriptThread
delays the handling of input event to the nextupdate_the_rendering
. This PR try to make the routes ofexecute_script
same as input events.assertion failed: !GetCurrentRealmOrNull(*cx).is_null() (thread Script(1,2), at components\script_bindings\realms.rs:25)
Testing:
tests\wpt\tests\webdriver\tests\classic\element_click\events.py
Fixes: #36676 probably
cc @longvatrong111 @jdm @xiaochengh @PotatoCP