mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
This patch introduces a new handle-based webview API to libservo, with two main design goals: 1. The lifetime of the handles controls the lifetime of the webview, giving the embedder full control over exactly when webviews are created and destroyed. This is consistent with how WebKitGTK’s WebView works; the engine can only create webviews via a create request, and can only destroy them via a close request. 2. All methods are infallible; if the constellation dies, the embedder finds out when calling Servo::handle_events. For the moment, the embedder is only responsible for creating the WebView id, and not the internal TopLevelBrowsingContext data structures. This is so that the ScriptThread is able to get a handle on the new WebView's WindowProxy in the case that it's an auxiliary browsing context. In the future, the embedder should also be responsible for creating the TopLevelBrowsingContext and the ScriptThread should have mechanism to associate the two views so that WebView creation is always executed through the same code path in the embedding layer. For now, it's enough that the embedder can get a handle to the new WebView when it's creation is requested. Once we replace EmbedderMsg with a webview delegate trait, we will pass WebView handles to the embedder, rather than webview ids. We’ll also add detailed docs, once the design settles. Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> |
||
---|---|---|
.. | ||
allocator | ||
background_hang_monitor | ||
bluetooth | ||
canvas | ||
compositing | ||
config | ||
constellation | ||
deny_public_fields | ||
devtools | ||
dom_struct | ||
domobject_derive | ||
fonts | ||
geometry | ||
hyper_serde | ||
jstraceable_derive | ||
layout | ||
layout_2020 | ||
layout_thread | ||
layout_thread_2020 | ||
malloc_size_of | ||
media | ||
metrics | ||
net | ||
pixels | ||
profile | ||
rand | ||
range | ||
script | ||
script_bindings | ||
servo | ||
shared | ||
timers | ||
url | ||
webdriver_server | ||
webgpu |