aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 70099ee5866..95326b46352 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -89,7 +89,7 @@ use js::jsval::{JSVal, NullValue};
use js::rust::wrappers::JS_DefineProperty;
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
use media::WindowGLContext;
-use msg::constellation_msg::PipelineId;
+use msg::constellation_msg::{BrowsingContextId, PipelineId};
use net_traits::image_cache::{ImageCache, ImageResponder, ImageResponse};
use net_traits::image_cache::{PendingImageId, PendingImageResponse};
use net_traits::storage_thread::StorageType;
@@ -1829,6 +1829,16 @@ impl Window {
DOMString::from(resolved)
}
+ pub fn inner_window_dimensions_query(
+ &self,
+ browsing_context: BrowsingContextId,
+ ) -> Option<Size2D<f32, CSSPixel>> {
+ if !self.layout_reflow(QueryMsg::InnerWindowDimensionsQuery(browsing_context)) {
+ return None;
+ }
+ self.layout_rpc.inner_window_dimensions()
+ }
+
#[allow(unsafe_code)]
pub fn offset_parent_query(&self, node: &Node) -> (Option<DomRoot<Element>>, UntypedRect<Au>) {
if !self.layout_reflow(QueryMsg::OffsetParentQuery(node.to_opaque())) {
@@ -2359,6 +2369,7 @@ fn debug_reflow_events(id: PipelineId, reflow_goal: &ReflowGoal, reason: &Reflow
&QueryMsg::StyleQuery(_n) => "\tStyleQuery",
&QueryMsg::TextIndexQuery(..) => "\tTextIndexQuery",
&QueryMsg::ElementInnerTextQuery(_) => "\tElementInnerTextQuery",
+ &QueryMsg::InnerWindowDimensionsQuery(_) => "\tInnerWindowDimensionsQuery",
},
});