servo/components/shared
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
..
background_hang_monitor script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
base Make DOMException serializable (#36535) 2025-04-15 13:25:31 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas canvas: Implement line dash setters and getters (#36257) 2025-04-01 11:22:00 +00:00
compositing compositing: Add memory reporter for WebRender. (#36557) 2025-04-16 13:14:04 +00:00
constellation Streams: make writable streams transferrable (#36588) 2025-04-18 08:33:36 +00:00
devtools Devtools: initial Debugger > Sources panel (#36164) 2025-04-08 09:22:53 +00:00
embedder Move click event trigger from embedding layer to ScriptThread (#36413) 2025-04-18 19:27:57 +00:00
fonts Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
net Refactor common infrastructure for creating memory reports. (#36579) 2025-04-18 02:14:49 +00:00
profile Refactor common infrastructure for creating memory reports. (#36579) 2025-04-18 02:14:49 +00:00
script Move click event trigger from embedding layer to ScriptThread (#36413) 2025-04-18 19:27:57 +00:00
script_layout Refactor common infrastructure for creating memory reports. (#36579) 2025-04-18 02:14:49 +00:00
webgpu chore: Update wgpu to v25 (#36486) 2025-04-18 07:49:06 +00:00
webxr libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420) 2025-04-09 14:19:33 +00:00