servo/components/shared/embedder
Euclid Ye 46247a7621
Move click event trigger from embedding layer to ScriptThread (#36413)
1. Move click event trigger from embedding layer to `ScriptThread`
2. Previously, the logic is to trigger click event at same position as
`MouseButtonAction::Up` if `MouseButtonAction::Up` is within 10px of
`MouseButtonAction::Down`, in embedding layer. This PR ~~removes the
condition~~ moves the check to `ScriptThread`.

Testing: tested for webdriver with self written test case. Perform
actions of pointermove, pointerdown, pointerup in sequence. Click event
can now be triggered.
Fixes: #35395 

cc @xiaochengh @jdm 

For `MAYBE? TODO:` part I added, should we do it? I read the
[spec](https://w3c.github.io/uievents/#event-type-click), it doesn't
specify we have to implement MDN's way.

If we should work in the MDN's way, it also should be fixed in another
PR, as this PR doesn't regress anything. Also I am not sure what is the
best way to do it.
Should I handle it in
4d4f94936f/components/script/dom/document.rs (L1296-L1297)?

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-04-18 19:27:57 +00:00
..
build.rs Set the cfg properly for the production-stripped profile (#32991) 2024-08-09 09:16:51 +00:00
Cargo.toml resources: Remove baked in resources (#36042) 2025-04-17 05:12:44 +00:00
input_events.rs Move click event trigger from embedding layer to ScriptThread (#36413) 2025-04-18 19:27:57 +00:00
lib.rs libservo: Expose a ServoBuilder (#36549) 2025-04-16 16:58:52 +00:00
resources.rs resources: Remove baked in resources (#36042) 2025-04-17 05:12:44 +00:00
user_content_manager.rs Allow setting userscripts directly without the need of files (#35388) 2025-03-27 03:00:08 +00:00
webdriver.rs Implement GetComputedRole in wd (#36552) 2025-04-16 03:55:15 +00:00