servo/components/script
Delan Azabani b4e2037dbe
Make auxiliary webviews exist in the constellation immediately (#35672)
To allow embedders to interact with webviews as soon as they are
created, we need to ensure that they exist in both the compositor and
the constellation before those interactions happen. #35662 does this
for the compositor, while this patch does this for the constellation.

When a webview opens another webview (via <a target>, <form target>,
window.open(), etc), the embedder creates an “auxiliary” webview,
which previously went as follows:

- script create_auxiliary_browsing_context
- libservo AllowOpeningWebView
- embedder request_open_auxiliary_webview (→ constellation FocusWebView)
- script create_auxiliary_browsing_context
- constellation ScriptNewAuxiliary

In that model, the constellation may receive FocusWebView before it
receives ScriptNewAuxiliary. Now they are created as follows:

- script create_auxiliary_browsing_context
- constellation CreateAuxiliaryWebView
- libservo AllowOpeningWebView
- embedder request_open_auxiliary_webview (→ constellation FocusWebView)
- constellation CreateAuxiliaryWebView
- script create_auxiliary_browsing_context

Since these messages are all synchronous and the constellation will
have set up the webview before handling any new messages, the webview
will always exist by the time we handle the embedder’s FocusWebView.

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-02-26 11:07:05 +00:00
..
docs Update branch name to main (#30877) 2023-12-16 09:32:20 +00:00
dom Make auxiliary webviews exist in the constellation immediately (#35672) 2025-02-26 11:07:05 +00:00
layout_dom Support the <meter> element (#35524) 2025-02-21 16:28:12 +00:00
xpath Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
animation_timeline.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
animations.rs Implement Event propagation across shadow roots (#34884) 2025-01-22 15:25:16 +00:00
body.rs refactor: add CanGc as argument to Promise::reject_error (#35646) 2025-02-25 10:12:58 +00:00
build.rs script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
canvas_context.rs Unify (Offscreen)CanvasRenderingContext2d and make PaintRenderingContext2D standalone (#35619) 2025-02-23 16:31:06 +00:00
canvas_state.rs Do not assume OffscreenCanvasContext to be 2d (#35629) 2025-02-24 14:06:08 +00:00
Cargo.toml Make WebBluetooth an optional feature. (#35479) 2025-02-18 04:13:43 +00:00
clipboard_provider.rs libservo: Add a ClipboardDelegate and a default implementation (#35297) 2025-02-07 10:43:46 +00:00
conversions.rs suppress build warnings when disabling webgpu and webxr (#35379) 2025-02-08 08:16:21 +00:00
devtools.rs Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
document_collection.rs script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
document_loader.rs script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
drag_data_store.rs DataTransferItem: improve spec compliance (#35418) 2025-02-16 18:53:35 +00:00
fetch.rs refactor: add CanGc as argument to Promise::reject_error (#35646) 2025-02-25 10:12:58 +00:00
iframe_collection.rs script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
init.rs Make generated bindings generic over DOM types (#35169) 2025-01-25 05:08:49 +00:00
layout_image.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
lib.rs script: Add CanvasContext trait (#35448) 2025-02-21 20:26:27 +00:00
links.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
mem.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
messaging.rs Make WebBluetooth an optional feature. (#35479) 2025-02-18 04:13:43 +00:00
microtask.rs Fire slot change events when the slot content changes (#35137) 2025-01-27 14:13:22 +00:00
navigation.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
network_listener.rs Propagate CanGc arguments through callers in constructors (#35541) 2025-02-20 16:17:45 +00:00
realms.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
script_module.rs Propagate more CanGc (#35604) 2025-02-23 17:28:17 +00:00
script_runtime.rs refactor: propagate CanGc arguments through callers (#35591) 2025-02-23 00:34:51 +00:00
script_thread.rs Touch handler: Fix race condition and rate-limit move events (#35537) 2025-02-25 07:13:16 +00:00
security_manager.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
serviceworker_manager.rs api: Flatten and simplify Servo preferences (#34966) 2025-01-14 13:54:06 +00:00
stylesheet_loader.rs Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
stylesheet_set.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task_manager.rs script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
task_queue.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task_source.rs script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
test.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
textinput.rs Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
timers.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
unminify.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
webdriver_handlers.rs libservo: Move WebDriver messages to the embedder crate (#35602) 2025-02-24 13:57:28 +00:00
window_named_properties.rs window: avoid NonNull<JSObject> in NamedGetter (#35508) 2025-02-17 12:48:21 +00:00