Add mouse hover tracking across the Servo input pipeline

Without continuous MouseMove events, Servo never updates hover state:
no cursor changes over links, no :hover CSS effects, no mouseenter
JavaScript events. The web page appears completely non-interactive.

Track mouse position from GPUI on_mouse_move through the full IPC
pipeline to Servo. Hover position is included with each ensure
request so Servo updates hover state at frame rate (~60fps).
This commit is contained in:
2026-05-09 16:21:43 -04:00
parent e621c43757
commit 4c6d9c757a
9 changed files with 1219 additions and 433 deletions
@@ -6,6 +6,10 @@ use servo::{
use crate::keyboard::key_and_code_for_character;
pub(super) fn send_mouse_hover(webview: &WebView, x: u32, y: u32) {
webview.notify_input_event(InputEvent::MouseMove(MouseMoveEvent::new(point(x, y))));
}
pub(super) fn send_mouse_click(webview: &WebView, x: u32, y: u32) {
let point = point(x, y);
webview.notify_input_event(InputEvent::MouseMove(MouseMoveEvent::new(point)));