aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/message.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-11-07 07:40:29 -0500
committerGitHub <noreply@github.com>2019-11-07 07:40:29 -0500
commit9a518cf7979b79b34611135d09c1dd0a96945255 (patch)
tree9ffeb03a554620b6741494bc80fc77596195a649 /components/script_layout_interface/message.rs
parenta33d493a4ff6f8a629a9b82202c49c41ecbefa49 (diff)
parent4578ae834c286570361d8cc6c1322b3acd3b7751 (diff)
downloadservo-9a518cf7979b79b34611135d09c1dd0a96945255.tar.gz
servo-9a518cf7979b79b34611135d09c1dd0a96945255.zip
Auto merge of #24677 - jdm:iframe-sizing-cleanup, r=asajeffrey
Ensure all iframes are sized correctly at creation Following in the path of #22395, these commits serve several purposes: * prevent layout instability early during iframe loads caused by a succession of resize events * reduce the complexity of determining what actual DPI and initial window size values are being used at startup * ensure that all documents have a correct initial viewport size at creation These changes fix problems that were exposed by the changes in #24462 but are independent of that PR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes
Diffstat (limited to 'components/script_layout_interface/message.rs')
-rw-r--r--components/script_layout_interface/message.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs
index 01a589d53cb..fb2bac65d07 100644
--- a/components/script_layout_interface/message.rs
+++ b/components/script_layout_interface/message.rs
@@ -10,7 +10,7 @@ use euclid::default::{Point2D, Rect};
use gfx_traits::Epoch;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use metrics::PaintTimeMetrics;
-use msg::constellation_msg::{BackgroundHangMonitorRegister, PipelineId};
+use msg::constellation_msg::{BackgroundHangMonitorRegister, BrowsingContextId, PipelineId};
use net_traits::image_cache::ImageCache;
use profile_traits::mem::ReportsChan;
use script_traits::Painter;
@@ -128,6 +128,7 @@ pub enum QueryMsg {
ResolvedStyleQuery(TrustedNodeAddress, Option<PseudoElement>, PropertyId),
StyleQuery(TrustedNodeAddress),
ElementInnerTextQuery(TrustedNodeAddress),
+ InnerWindowDimensionsQuery(BrowsingContextId),
}
/// Any query to perform with this reflow.
@@ -147,6 +148,7 @@ impl ReflowGoal {
ReflowGoal::LayoutQuery(ref querymsg, _) => match *querymsg {
QueryMsg::NodesFromPointQuery(..) |
QueryMsg::TextIndexQuery(..) |
+ QueryMsg::InnerWindowDimensionsQuery(_) |
QueryMsg::ElementInnerTextQuery(_) => true,
QueryMsg::ContentBoxQuery(_) |
QueryMsg::ContentBoxesQuery(_) |
@@ -176,6 +178,7 @@ impl ReflowGoal {
QueryMsg::NodeScrollIdQuery(_) |
QueryMsg::ResolvedStyleQuery(..) |
QueryMsg::OffsetParentQuery(_) |
+ QueryMsg::InnerWindowDimensionsQuery(_) |
QueryMsg::StyleQuery(_) => false,
},
}
@@ -227,4 +230,5 @@ pub struct LayoutThreadInit {
pub image_cache: Arc<dyn ImageCache>,
pub paint_time_metrics: PaintTimeMetrics,
pub layout_is_busy: Arc<AtomicBool>,
+ pub window_size: WindowSizeData,
}