Crate servo

Source
Expand description

Servo, the mighty web browser engine from the future.

This is a very simple library that wires all of Servoโ€™s components together as type Servo, along with a generic client implementing the WindowMethods trait, to create a working web browser.

The Servo type is responsible for configuring a Constellation, which does the heavy lifting of coordinating all of Servoโ€™s internal subsystems, including the ScriptThread and the LayoutThread, as well maintains the navigation context.

Servo is fed events from a generic type that implements the WindowMethods trait.

Re-exportsยง

pub use webgpu;
pub use webxr;
pub use background_hang_monitor;
pub use base;
pub use canvas_traits;
pub use devtools;
pub use devtools_traits;
pub use euclid;
pub use fonts;
pub use ipc_channel;
pub use layout_api;
pub use media;
pub use net;
pub use net_traits;
pub use profile;
pub use profile_traits;
pub use script;
pub use script_traits;
pub use servo_config as config;
pub use servo_config;
pub use servo_geometry;
pub use servo_url;
pub use style;
pub use style_traits;
pub use webrender_api;
pub use bluetooth;
pub use bluetooth_traits;

Modulesยง

clipboard_delegate ๐Ÿ”’
gl
input_events
javascript_evaluator ๐Ÿ”’
media_platform ๐Ÿ”’
proxies ๐Ÿ”’
resources
responders ๐Ÿ”’
servo_delegate ๐Ÿ”’
user_content_manager
webdriver
webview ๐Ÿ”’
webview_delegate ๐Ÿ”’

Structsยง

AllowOrDenyRequest
AuthenticationRequest
A request to authenticate a WebView navigation. Embedders may choose to prompt the user to enter credentials or simply ignore this request (in which case credentials will not be used).
AuthenticationResponse
BothLogger ๐Ÿ”’
ColorPicker
Represents a dialog triggered by clicking a <input type=color> element.
CompositionEvent
Event to expose input methods to program logic.
CompositorHitTestResult
The result of a hit test in the compositor.
DefaultEventLoopWaker ๐Ÿ”’
DefaultWebXrRegistry ๐Ÿ”’
DualRumbleEffectParams
https://w3.org/TR/gamepad/#dom-gamepadhapticeffecttype-dual-rumble
EmbedderProxy
Sends messages to the embedder.
FilterPattern
Filter for file selection; the String content is expected to be extension (e.g, โ€œdocโ€, without the prefixing โ€œ.โ€)
FocusId
An opaque identifier for a single webview focus operation.
FocusSequenceNumber
A sequence number generated by a script thread for its pipelines. The constellation attaches the target pipelineโ€™s last seen FocusSequenceNumber to every focus-related message it sends.
GamepadIndex
Index of gamepad in list of systemโ€™s connected gamepads
GamepadInputBounds
The minimum and maximum values that can be reported for axis or button input from this gamepad
GamepadSupportedHapticEffects
The haptic effects supported by this gamepad
Image
A raster image buffer.
JavaScriptEvaluationId
An identifier for a particular JavaScript evaluation that is used to track the evaluation from the embedding layer to the script layer and then back.
KeyboardEvent
Recreate KeyboardEvent from keyboard_types to pair it with webdriver_id, which is used for webdriver action synchronization.
MediaMetadata
https://w3c.github.io/mediasession/#mediametadata
MediaPositionState
https://w3c.github.io/mediasession/#dictdef-mediapositionstate
Modifiers
Pressed modifier keys.
MouseButtonEvent
MouseLeftViewportEvent
MouseMoveEvent
NavigationRequest
A request to navigate a WebView or one of its inner frames. This can be handled asynchronously. If not handled, the request will automatically be allowed.
Notification
Data that could be used to display a desktop notification to the end user when the Notification API is called.
NotificationAction
Actions available for users to choose from for interacting with the notification.
OffscreenRenderingContext
PermissionRequest
A permissions request for a WebView The embedder should allow or deny the request, either by reading a cached value or querying the user for permission via the user interface.
RenderNotifier ๐Ÿ”’
RgbColor
ScreenGeometry
Information about a WebViewโ€™s screen geometry and offset. This is used for the Screen CSSOM APIs and window.screenLeft / window.screenX / window.screenTop / window.screenY / window.moveBy/ window.resizeBy / window.outerWidth / window.outerHeight / window.screen.availHeight / window.screen.availWidth.
ScreenMetrics
Unlike ScreenGeometry, the data is in device-independent pixels to be used by DOM APIs
ScriptToEmbedderChan
A Script to Embedder Channel
ScrollEvent
SelectElement
Represents a dialog triggered by clicking a <select> element.
SelectElementOption
Servo
The in-process interface to Servo.
ServoBuilder
SoftwareRenderingContext
A software rendering context that uses a software OpenGL implementation to render Servo. This will generally have bad performance, but can be used in situations where it is more convenient to have consistent, but slower display output.
TouchEvent
TouchId
An opaque identifier for a touch point.
TouchSequenceId
An ID for a sequence of touch events between a Down and the Up or Cancel event. The ID is the same for all events between Down and Up or Cancel
TraversalId
An opaque identifier for a single history traversal operation.
UntrustedNodeAddress
The address of a node. Layout sends these back. They must be validated via from_untrusted_node_address before they can be used, because we do not trust layout.
ViewportDetails
Data about a WebView or <iframe> viewport: its size and also the HiDPI scale factor to use when rendering the contents.
WebDriverCommandResponse
WebDriverMessageId
WebDriverSenders
A collection of IpcSenders that are used to asynchronously communicate to a WebDriver server with information about application state.
WebResourceLoad
Information related to the loading of a web resource. These are created for all HTTP requests. The client may choose to intercept the load of web resources and send an alternate response by calling WebResourceLoad::intercept.
WebResourceRequest
WebResourceResponse
WebView
A handle to a Servo webview. If you clone this handle, it does not create a new webview, but instead creates a new handle to the webview. Once the last handle is dropped, Servo considers that the webview has closed and will clean up all associated resources related to this webview.
WebViewBuilder
WebViewId
WheelDelta
The Wheel event deltas in every direction
WheelEvent
WindowRenderingContext
A RenderingContext that uses the surfman library to render to a raw-window-handle identified window. surfman will attempt to create an OpenGL context and surface for this window. This is a simple implementation of the RenderingContext crate, but by default it paints to the entire window surface.

Enumsยง

AlertResponse
AllowOrDeny
A response to a request to allow or deny an action.
AnimationState
For a given pipeline, whether any animations are currently running and any animation callbacks are queued
Code
Code is the physical position of a key.
CompositionState
Describes the state of a composition session.
ConfirmResponse
ContextMenuResult
Cursor
A cursor for the window. This is different from a CSS cursor (see CursorKind) in that it has no Auto value.
EditingActionEvent
An editing action that should be performed on a WebView.
EmbedderMsg
FormControl
The controls of an interactive form element.
GamepadEvent
The type of Gamepad event
GamepadHapticEffectType
https://w3.org/TR/gamepad/#dom-gamepadhapticeffecttype
GamepadUpdateType
The type of Gamepad input being updated
ImeEvent
InputEvent
An input event that is sent from the embedder to Servo.
InputMethodType
Used to specify the kind of input method editor appropriate to edit a field. This is a subset of htmlinputelement::InputType because some variants of InputType donโ€™t make sense in this context.
JSValue
JavaScriptEvaluationError
Key
The value received from the keypress.
KeyState
Describes the state a key is in.
LoadStatus
The status of the load in this WebView.
Location
The location attribute contains an indication of the physical location of the key on the device.
MediaSessionActionType
https://w3c.github.io/mediasession/#enumdef-mediasessionaction
MediaSessionEvent
Type of events sent from script to the embedder about the media session.
MediaSessionPlaybackState
https://w3c.github.io/mediasession/#enumdef-mediasessionplaybackstate
MouseButton
MouseButtonAction
The types of mouse events
NamedKey
Key represents the meaning of a keypress.
PermissionFeature
Enum with variants that match the DOM PermissionName enum
PixelFormat
PrefValue
PromptResponse
SelectElementOptionOrOptgroup
Represents the contents of either an <option> or an <optgroup> element
ServoError
ShutdownState
Tracks whether Servo isnโ€™t shutting down, is in the process of shutting down, or has finished shutting down.
SimpleDialog
Simple dialogs are synchronous dialogs that can be opened by web content. Since their messages are controlled by web content, they should be presented to the user in a way that makes them impossible to mistake for browser UI.
Theme
The type of platform theme.
TouchEventResult
Whether the default action for a touch event was prevented by web content
TouchEventType
The type of input represented by a multi-touch event.
WebDriverCommandMsg
Messages to the constellation originating from the WebDriver server.
WebDriverFrameId
WebDriverJSError
WebDriverLoadStatus
WebDriverScriptCommand
WebDriverUserPrompt
WebDriverUserPromptAction
WebRenderDebugOption
An option to control what kind of WebRender debugging is enabled while Servo is running.
WebResourceResponseMsg
WheelMode
Mode to measure WheelDelta floats in

Traitsยง

EventLoopWaker
RenderingContext
The RenderingContext trait defines a set of methods for managing an OpenGL or GLES rendering context. Implementors of this trait are responsible for handling the creation, management, and destruction of the rendering context and its associated resources.
ServoDelegate
WebViewDelegate

Functionsยง

create_compositor_channel ๐Ÿ”’
create_constellation ๐Ÿ”’
create_embedder_channel ๐Ÿ”’
create_sandbox ๐Ÿ”’
run_content_process
Content process entry point.
set_logger

Type Aliasesยง

WebDriverJSResult