mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
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:
parent
eb82161a8a
commit
3e052676ef
18 changed files with 165 additions and 200 deletions
|
@ -1865,6 +1865,7 @@ where
|
|||
pipeline.title = title;
|
||||
}
|
||||
},
|
||||
FromScriptMsg::IFrameSizes(iframe_sizes) => self.handle_iframe_size_msg(iframe_sizes),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2138,11 +2139,6 @@ where
|
|||
fn handle_request_from_layout(&mut self, message: FromLayoutMsg) {
|
||||
trace_layout_msg!(message, "{message:?}");
|
||||
match message {
|
||||
// Layout sends new sizes for all subframes. This needs to be reflected by all
|
||||
// frame trees in the navigation context containing the subframe.
|
||||
FromLayoutMsg::IFrameSizes(iframe_sizes) => {
|
||||
self.handle_iframe_size_msg(iframe_sizes);
|
||||
},
|
||||
FromLayoutMsg::PendingPaintMetric(pipeline_id, epoch) => {
|
||||
self.handle_pending_paint_metric(pipeline_id, epoch);
|
||||
},
|
||||
|
|
|
@ -189,6 +189,7 @@ mod from_script {
|
|||
#[cfg(feature = "webgpu")]
|
||||
Self::GetWebGPUChan(..) => target!("GetWebGPUChan"),
|
||||
Self::TitleChanged(..) => target!("TitleChanged"),
|
||||
Self::IFrameSizes(..) => target!("IFrameSizes"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -257,7 +258,6 @@ mod from_layout {
|
|||
impl LogTarget for script_traits::LayoutMsg {
|
||||
fn log_target(&self) -> &'static str {
|
||||
match self {
|
||||
Self::IFrameSizes(..) => target!("IFrameSizes"),
|
||||
Self::PendingPaintMetric(..) => target!("PendingPaintMetric"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue