aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/script/script_msg.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-12-16 16:05:33 +0100
committerGitHub <noreply@github.com>2024-12-16 15:05:33 +0000
commit3e052676efb351143ffc26bb166045f272e16074 (patch)
tree98a4590601b7fe65af2973ec1f0833b0516be611 /components/shared/script/script_msg.rs
parenteb82161a8ae503f3019098c3230e5b33b89ccb58 (diff)
downloadservo-3e052676efb351143ffc26bb166045f272e16074.tar.gz
servo-3e052676efb351143ffc26bb166045f272e16074.zip
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>
Diffstat (limited to 'components/shared/script/script_msg.rs')
-rw-r--r--components/shared/script/script_msg.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/shared/script/script_msg.rs b/components/shared/script/script_msg.rs
index 75da73fa167..9e51cf6d548 100644
--- a/components/shared/script/script_msg.rs
+++ b/components/shared/script/script_msg.rs
@@ -46,8 +46,6 @@ pub struct IFrameSizeMsg {
/// Messages from the layout to the constellation.
#[derive(Deserialize, Serialize)]
pub enum LayoutMsg {
- /// Inform the constellation of the size of the iframe's viewport.
- IFrameSizes(Vec<IFrameSizeMsg>),
/// Requests that the constellation inform the compositor that it needs to record
/// the time when the frame with the given ID (epoch) is painted.
PendingPaintMetric(PipelineId, Epoch),
@@ -57,7 +55,6 @@ impl fmt::Debug for LayoutMsg {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
use self::LayoutMsg::*;
let variant = match *self {
- IFrameSizes(..) => "IFrameSizes",
PendingPaintMetric(..) => "PendingPaintMetric",
};
write!(formatter, "LayoutMsg::{}", variant)
@@ -260,6 +257,8 @@ pub enum ScriptMsg {
GetWebGPUChan(IpcSender<Option<WebGPU>>),
/// Notify the constellation of a pipeline's document's title.
TitleChanged(PipelineId, String),
+ /// Notify the constellation that the size of some `<iframe>`s has changed.
+ IFrameSizes(Vec<IFrameSizeMsg>),
}
impl fmt::Debug for ScriptMsg {
@@ -320,6 +319,7 @@ impl fmt::Debug for ScriptMsg {
#[cfg(feature = "webgpu")]
GetWebGPUChan(..) => "GetWebGPUChan",
TitleChanged(..) => "TitleChanged",
+ IFrameSizes(..) => "IFramSizes",
};
write!(formatter, "ScriptMsg::{}", variant)
}