servo/components/shared
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
..
background_hang_monitor script: Eliminate code duplication in the task queue (#34798) 2025-01-01 13:50:52 +00:00
base chore: remove WindowMethods::rendering_context (#34780) 2025-01-01 08:26:23 +00:00
bluetooth doc(resources): Add documentation to undocumented embedder_traits::resources::Resource variants (#33885) 2024-10-18 03:44:14 +00:00
canvas prefs: Move some DebugOptions to Preferences and clean up (#34998) 2025-01-17 11:47:47 +00:00
compositing Implement Clipboard Event Api (#33576) 2025-01-15 19:45:29 +00:00
devtools Support syntax highlighting of arguments in the devtools console (#34810) 2025-01-02 18:47:52 +00:00
embedder libservo: Add an initial WebView data structure to the API (#35119) 2025-01-25 08:17:50 +00:00
fonts Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
net [#34767] - Range header is missing from CORS header safelist (#35138) 2025-01-24 17:31:27 +00:00
profile script: Eliminate code duplication in the task queue (#34798) 2025-01-01 13:50:52 +00:00
script Implement Clipboard Event Api (#33576) 2025-01-15 19:45:29 +00:00
script_layout script: Move the FontContext to Window (#34845) 2025-01-07 04:44:31 +00:00
webrender feat: Turn RenderingContext into a trait (#35052) 2025-01-24 02:39:39 +00:00