diff options
author | Euclid Ye <yezhizhenjiakang@gmail.com> | 2025-04-19 03:27:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-18 19:27:57 +0000 |
commit | 46247a76210daef793fec29b001cf4c05281f2e4 (patch) | |
tree | 92a824783be48e82836002a2a352c478bb3d8eae /components/layout_2020/flow/inline/inline_box.rs | |
parent | 2ee8427665099987f715296d4d55b6388a480c08 (diff) | |
download | servo-46247a76210daef793fec29b001cf4c05281f2e4.tar.gz servo-46247a76210daef793fec29b001cf4c05281f2e4.zip |
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
https://github.com/servo/servo/blob/4d4f94936f8859f039497df370083fd7ea35fb00/components/script/dom/document.rs#L1296-L1297?
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Diffstat (limited to 'components/layout_2020/flow/inline/inline_box.rs')
0 files changed, 0 insertions, 0 deletions