script: Manage <iframe> sizes in Window (#34643)

Manage `<iframe>` size updates in `Window`. In addition to removing
duplicated code, this will allow setting `<iframe>` sizes synchronously
on child `Pipeline`s of the same origin in the script process in a
followup change. The goal is remove flakiness from `<iframe>` sizing.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2024-12-16 16:05:33 +01:00 committed by GitHub
parent eb82161a8a
commit 3e052676ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 165 additions and 200 deletions

View file

@ -196,7 +196,7 @@ impl HTMLIFrameElement {
let window_size = WindowSizeData {
initial_viewport: window
.inner_window_dimensions_query(browsing_context_id, can_gc)
.get_iframe_size_if_known(browsing_context_id, can_gc)
.unwrap_or_default(),
device_pixel_ratio: window.device_pixel_ratio(),
};