aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/proxies.rs
Commit message (Collapse)AuthorAgeFilesLines
* Create a `constellation_traits` crate (#36088)Martin Robinson2025-03-221-1/+1
| | | | | | | | | | | | | | This change creates a `constellation_traits` crate. Previously messages to the `Constellation` were in the `compositing_traits` crate, which came about organically. This change moves these to a new crate which also contains data types that are used in both compositing/libservo and script (ie types that cross the process boundary). The idea is similar to `embedding_traits`, but this is meant for types not exposed to the API. This change allows deduplicating `UntrustedNodeAddress`, which previously had two versions to avoid circular dependencies. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-1/+1
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove `Servo::allow_navigation_request` (#35544)Martin Robinson2025-02-191-1/+1
| | | | | This method is now unused in the new Servo API. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* libservo: Add WebViewDelegate and ServoDelegate and port `winit_minimal` ↵Delan Azabani2025-02-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | (#35196) This change adds the second major part of the new API: delegates which have methods called by the Servo loop. When a delegate is set on a `WebView` or on `Servo` itself, the event loop will call into appropriate delegate methods. Applications can implement the delegate on their own structs to add special behavior per-`WebView` or for all `WebView`s. In addition, each delegate has a default implementation, which automatically exposes "reasonable" behavior such as by-default allowing navigation. There's a lot more work to do here, such as refining the delegate methods so that they all have nice interfaces, particulary with regard to delegate methods that need an asynchronous response. This will be handed gradually as we keep working on the API. Signed-off-by: Delan Azabani <dazabani@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* libservo: Add an initial WebView data structure to the API (#35119)Delan Azabani2025-01-251-0/+47
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>