servo/ports/servoshell/desktop
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
..
protocols Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
accelerated_gl_media.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
app.rs libservo: Expose a ServoBuilder (#36549) 2025-04-16 16:58:52 +00:00
app_state.rs libservo: Make zooming and HiDPI scaling work per-WebView (#36419) 2025-04-14 12:01:49 +00:00
cli.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
dialog.rs Support single-value <select> elements (#35684) 2025-04-03 12:11:55 +00:00
egui_glue.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
events_loop.rs libservo: Move animation tracking from WindowMethods to delegates (#36400) 2025-04-09 19:41:53 +00:00
gamepad.rs libservo: Expose a single InputEvent type and pass it to script (#35430) 2025-02-12 17:07:15 +00:00
geometry.rs Use webrender_api::units::DevicePixel rather than style_traits::DevicePixel unless interfacing with Stylo (#34353) 2024-11-25 23:42:04 +00:00
headed_window.rs Move click event trigger from embedding layer to ScriptThread (#36413) 2025-04-18 19:27:57 +00:00
headless_window.rs libservo: Make zooming and HiDPI scaling work per-WebView (#36419) 2025-04-14 12:01:49 +00:00
keyutils.rs servoshell: Clean up keyboard event conversion a little (#32564) 2024-06-19 19:38:56 +00:00
minibrowser.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
mod.rs libservo: Expose a ServoBuilder (#36549) 2025-04-16 16:58:52 +00:00
tracing.rs servoshell: Port desktop servoshell to use delegate API (#35284) 2025-02-06 07:33:31 +00:00
webxr.rs libservo: Expose a ServoBuilder (#36549) 2025-04-16 16:58:52 +00:00
window_trait.rs libservo: Make zooming and HiDPI scaling work per-WebView (#36419) 2025-04-14 12:01:49 +00:00