Synchronize dispatch_actions in WebDriver#36932
Conversation
dispatch_actions in WebDriver
ba03f39 to
27ac469
Compare
There was a problem hiding this comment.
An events route exists between WebDriver <-> Constellation <-> ScriptThread. Should we use it to receive response from ScriptThread? It means merge WebdriverData.sync_channel and WebdriverData.load_channel. Other option is let ScriptThread sends reply directly to WebDriver, similar to WebDriverScriptCommand
I prefer the other option. Right now sync_channel in Constellation does nothing except forwarding WebDriverInputComplete from ScriptThread back to WebDriver Server.
Mostly LGTM, except that perform_scroll also requires similar sync like the rest. See the comment below :)
Noted. We already have load_channel, need to check more if we can use it. |
f42ebe6 to
1fc8dd4
Compare
1fc8dd4 to
0f975d7
Compare
I also prefer the latter. If there's an existing design that works, we should reuse it so that it's easier for future developers.
A temporary pair seems fine (I'm assuming it's the current mechanism in script commands). WebDriver is not performance-sensitive code, so it's better to follow existing design. |
In addition, there is an existing route between |
c775965 to
15684dd
Compare
c07f22e to
17d8cd8
Compare
Maybe you can add this link #36676 (comment) in the PR message so that people coming by can better understand the context of |
xiaochengh
left a comment
There was a problem hiding this comment.
Looks good in general. Just some coding style comments without major concerns.
17d8cd8 to
52c807d
Compare
mrobinson
left a comment
There was a problem hiding this comment.
Thanks! Just a couple notes here. I have not reviewed the webdriver portions as I'm probably not the best person for that and have just focused on the embedding layer.
I've updated. Thank you! |
It is under discussion in #36714. |
I definitely agree with this. I think maybe we need a more generic mechanism for this in the WebView API. Currently you send an event to the WebView via |
Ultimately, WebDriver should be testing the embedding API, so it will need some way of controlling servoshell in order to create and add WebViews to the interface. This could be done either by making the |
|
Oh, I forgot to mention that an added benefit of having WebDriver use the embedding API is that it ensures that the embedding API is rich enough. |
Signed-off-by: batu_hoang <[email protected]>
45bc5cf to
34e5f9e
Compare
Signed-off-by: Martin Robinson <[email protected]>
It is totally ok. Thanks for your fixing. |
Signed-off-by: batu_hoang <[email protected]>
|
Looks like there are a couple build issues on OpenHarmony which must use the new constructor for embedder input events. |
Signed-off-by: Euclid Ye <[email protected]>
…_list` (#37081) Re-remove deleted logic from `WebDriverSession::input_cancel_list` logic in #37010 which was re-adedd during merge resolution in #36932. Otherwise, duplicate items would be registered in Release Actions. Signed-off-by: Euclid Ye <[email protected]>
Implement action synchronization for wheel event. Previously only done for pointer here #36932. Testing: `tests/wpt/meta/webdriver/tests/classic/perform_actions/wheel.py` --------- Signed-off-by: PotatoCP <[email protected]>
Implement action synchronization for key event. Previously only done for pointer #36932 and wheel #37260. --------- Signed-off-by: PotatoCP <[email protected]>
Implement missing synchronization in
dispatch_actionsofWebDriver.https://w3c.github.io/webdriver/#dispatching-actions
ScriptThreadto notifyWebDriverabout the completion of input commands.webdriver_idfield forInputEvent.ScriptThreaduses it to distinguish WebDriver events and sends notification.Tests:
./mach test-wpt --product servodriver -r tests\wpt\tests\webdriver\tests\classic\element_click\events.pypass ifhit_testingpass. Check issuecc: @xiaochengh