Add top-level creation URL for global scope (#37342)

Global scopes have two creation URLs: one for itself and one for the
"top-level" scope. It's not immediately obvious what is considered
top-level here (it is not strictly defined in the specification).

In any case, reports need the creation URL of the scope itself, not the
top-level version. Therefore, propagate this information from all
scopes, where the worker and worklets remain to pass in `None` for their
top-level scope.

Part of #37328

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-06-20 09:07:28 +02:00 committed by GitHub
parent a426a2e884
commit d70f6ace24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 50 additions and 12 deletions

View file

@ -3052,7 +3052,8 @@ impl Window {
parent_info: Option<PipelineId>,
viewport_details: ViewportDetails,
origin: MutableOrigin,
creator_url: ServoUrl,
creation_url: ServoUrl,
top_level_creation_url: ServoUrl,
navigation_start: CrossProcessInstant,
webgl_chan: Option<WebGLChan>,
#[cfg(feature = "webxr")] webxr_registry: Option<webxr_api::Registry>,
@ -3088,7 +3089,8 @@ impl Window {
constellation_chan,
resource_threads,
origin,
Some(creator_url),
creation_url,
Some(top_level_creation_url),
microtask_queue,
#[cfg(feature = "webgpu")]
gpu_id_hub,