Skip to main content

WebViewTrait

Trait WebViewTrait 

Source
pub trait WebViewTrait {
    // Required methods
    fn id(&self) -> WebViewId;
    fn screen_geometry(&self) -> Option<ScreenGeometry>;
    fn set_animating(&self, new_value: bool);
    fn notify_viewport_updated(&self);
}
Expand description

A trait that exposes the embedding layer’s WebView to the Servo renderer. This is to prevent a dependency cycle between the renderer and the embedding layer.

Required Methods§

Source

fn id(&self) -> WebViewId

Source

fn screen_geometry(&self) -> Option<ScreenGeometry>

Source

fn set_animating(&self, new_value: bool)

Source

fn notify_viewport_updated(&self)

Notify the embedding layer that this WebView’s viewport geometry changed — its size, page or pinch zoom, or HiDPI scale — so it can refresh geometry, such as the accessibility root node, that the embedder derives from the viewport rather than from a pipeline update.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§