servo/components
Delan Azabani 2ce7709b8b
libservo: Add an initial WebView data structure to the API (#35119)
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>
2025-01-25 08:17:50 +00:00
..
allocator Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
background_hang_monitor Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
bluetooth api: Flatten and simplify Servo preferences (#34966) 2025-01-14 13:54:06 +00:00
canvas feat: Turn RenderingContext into a trait (#35052) 2025-01-24 02:39:39 +00:00
compositing libservo: Add an initial WebView data structure to the API (#35119) 2025-01-25 08:17:50 +00:00
config Remove Preferences::network_tls_ignore_unexpected_eof (#35080) 2025-01-20 13:07:54 +00:00
constellation libservo: Add an initial WebView data structure to the API (#35119) 2025-01-25 08:17:50 +00:00
deny_public_fields Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
devtools api: Flatten and simplify Servo preferences (#34966) 2025-01-14 13:54:06 +00:00
dom_struct script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
domobject_derive Upgrade rustc to 1.83 (#34793) 2025-01-01 09:38:28 +00:00
fonts Fix some clippy issues on the Android build (#35147) 2025-01-23 15:18:58 +00:00
geometry servoshell: Allow overriding screen resolution with a command-line argument (#34038) 2024-10-30 11:54:13 +00:00
hyper_serde Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
jstraceable_derive Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
layout layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
layout_2020 layout: Remove min and max container sizes from FlexContext (#35144) 2025-01-24 16:11:23 +00:00
layout_thread layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
layout_thread_2020 layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
malloc_size_of script: Move the FontContext to Window (#34845) 2025-01-07 04:44:31 +00:00
media Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
metrics Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
net Remove Preferences::network_tls_ignore_unexpected_eof (#35080) 2025-01-20 13:07:54 +00:00
pixels Optimized unmultiply_inplace to remove fp ops (#33582) 2024-09-30 19:39:27 +00:00
profile script: Eliminate code duplication in the task queue (#34798) 2025-01-01 13:50:52 +00:00
rand crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
range Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
script libservo: Add an initial WebView data structure to the API (#35119) 2025-01-25 08:17:50 +00:00
script_bindings Make generated bindings generic over DOM types (#35169) 2025-01-25 05:08:49 +00:00
servo libservo: Add an initial WebView data structure to the API (#35119) 2025-01-25 08:17:50 +00:00
shared libservo: Add an initial WebView data structure to the API (#35119) 2025-01-25 08:17:50 +00:00
timers script: Make timers per-process (#34581) 2024-12-24 09:53:35 +00:00
url Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
webdriver_server webdriver: Serialize JS int values as i32. (#34997) 2025-01-15 08:15:37 +00:00
webgpu chore: Update wgpu and fix webgpu pref (#35020) 2025-01-16 14:42:47 +00:00