Add Servo scroll snapshots

This commit is contained in:
2026-05-08 13:54:56 -04:00
parent 8068d4ba32
commit 7178174e20
12 changed files with 738 additions and 268 deletions
+9
View File
@@ -213,6 +213,13 @@ pub struct NavigationRequest {
pub url: UrlText,
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ScrollRequest {
pub webview_id: WebViewId,
pub delta_x: i32,
pub delta_y: i32,
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PermissionRequest {
pub webview_id: WebViewId,
@@ -237,6 +244,8 @@ pub trait ServoHost {
fn navigate(&mut self, request: NavigationRequest) -> Result<(), ServoHostError>;
fn scroll(&mut self, request: ScrollRequest) -> Result<(), ServoHostError>;
fn set_permission(
&mut self,
request: PermissionRequest,