Add per-Mount scrolling with shared paint and input clipping
Verify Tessera GUI / verify (push) Failing after 7m33s

This commit is contained in:
2026-10-21 22:05:08 +08:00
parent 7acc5783a5
commit 6e69c5e5ce
18 changed files with 784 additions and 33 deletions
+39
View File
@@ -270,6 +270,7 @@ impl TesseraApp {
mount,
kind: "focus".into(),
point: None,
delta: None,
press_point: None,
});
}
@@ -398,6 +399,7 @@ impl TesseraApp {
mount: mount.id,
kind: "click".into(),
point: Some([point.x, point.y]),
delta: None,
press_point: Some([point.x, point.y]),
})
}
@@ -423,6 +425,7 @@ impl TesseraApp {
mount: frame.tabs[index].id,
kind: if close { "tab-close" } else { "tab-activate" }.into(),
point: None,
delta: None,
press_point: None,
})
});
@@ -457,6 +460,7 @@ impl TesseraApp {
mount: id,
kind: if close { "tab-close" } else { "tab-activate" }.into(),
point: None,
delta: None,
press_point: None,
})
}
@@ -505,6 +509,7 @@ impl TesseraApp {
mount: targets[index].id,
kind: "focus".into(),
point: None,
delta: None,
press_point: None,
})
});
@@ -725,6 +730,7 @@ impl ApplicationHandler<AppEvent> for TesseraApp {
mount: 0,
kind: "window-close".into(),
point: None,
delta: None,
press_point: None,
});
if let Some(input) = input {
@@ -839,6 +845,39 @@ impl ApplicationHandler<AppEvent> for TesseraApp {
dx = dy;
dy = 0.0;
}
if !self.guest_covered(self.pointer) {
let input = self.namespace.read().ok().and_then(|namespace| {
let frame = &namespace.document.frame;
let offset = crate::tabs::height(&frame.tabs);
if frame.session == 0
|| frame.fault.is_some()
|| self.pointer.y < offset
|| namespace.viewport.is_some_and(|s| {
self.pointer.x < 0.0
|| self.pointer.x >= s.width
|| self.pointer.y >= s.height
})
{
return None;
}
let point = Point::new(self.pointer.x, self.pointer.y - offset);
let delta = [-dx, -dy];
let mount = crate::scroll::wheel_target(frame, point, delta)?;
Some(crate::events::Input {
window: self.resource,
session: frame.session,
layout_version: frame.layout_version,
mount,
kind: "scroll".into(),
point: Some([point.x, point.y]),
press_point: None,
delta: Some(delta),
})
});
if let Some(input) = input {
self.send_guest(input);
}
}
self.developer_tools
.wheel(&self.layout.developer_tools, self.pointer, dx, dy);
window.request_redraw();