mirror of
https://github.com/servo/servo
synced 2026-05-13 02:17:06 +02:00
1. `InputEvent::MouseLeave` indicates that mouse has left the viewport (fired by embedder) or iframe (synthesized in Constellationf24f225db8/components/constellation/constellation_webview.rs (L119-L122)). Its handler in script is named as `handle_mouse_leave_event`, which is very misleading as we have DOM event [mouseleave](https://w3c.github.io/uievents/#event-type-mouseleave). I rename it to `MouseLeftViewport` to be consistent with `WindowEvent::CursorLeft`:f24f225db8/ports/servoshell/desktop/headed_window.rs (L632-L638)2. Add doc and rename function, such as `handle_mouse_move_event` to `handle_native_mouse_move_event` to be closer to [spec](https://w3c.github.io/uievents/#handle-native-mouse-move). Testing: Just renaming + skipping unnecessary hit-test in simple case. Fixes: Nothing but preparing for #38670 and #38435. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>