diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/node.rs | 16 | ||||
-rw-r--r-- | components/script/dom/window.rs | 8 |
2 files changed, 7 insertions, 17 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index af1afccc3b1..54bda6acc03 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -45,8 +45,7 @@ use dom::text::Text; use dom::virtualmethods::{VirtualMethods, vtable_for}; use dom::window::Window; use geom::rect::Rect; -use layout_interface::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC, - LayoutChan, ReapLayoutDataMsg}; +use layout_interface::{LayoutChan, ReapLayoutDataMsg}; use devtools_traits::NodeInfo; use script_traits::UntrustedNodeAddress; use servo_util::geometry::Au; @@ -689,20 +688,11 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> { } fn get_bounding_content_box(self) -> Rect<Au> { - let window = window_from_node(self).root(); - let page = window.page(); - let addr = self.to_trusted_node_address(); - - let ContentBoxResponse(rect) = page.layout().content_box(addr); - rect + window_from_node(self).root().page().content_box_query(self.to_trusted_node_address()) } fn get_content_boxes(self) -> Vec<Rect<Au>> { - let window = window_from_node(self).root(); - let page = window.page(); - let addr = self.to_trusted_node_address(); - let ContentBoxesResponse(rects) = page.layout().content_boxes(addr); - rects + window_from_node(self).root().page().content_boxes_query(self.to_trusted_node_address()) } // http://dom.spec.whatwg.org/#dom-parentnode-queryselector diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 71c8890ab6f..c9eeedc2a2a 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -19,7 +19,7 @@ use dom::location::Location; use dom::navigator::Navigator; use dom::performance::Performance; use dom::screen::Screen; -use layout_interface::ReflowGoal; +use layout_interface::NoQuery; use page::Page; use script_task::{ExitWindowMsg, ScriptChan, TriggerLoadMsg, TriggerFragmentMsg}; use script_task::FromWindow; @@ -312,7 +312,7 @@ impl Reflectable for Window { pub trait WindowHelpers { fn reflow(self); - fn flush_layout(self, goal: ReflowGoal); + fn flush_layout(self); fn wait_until_safe_to_modify_dom(self); fn init_browser_context(self, doc: JSRef<Document>); fn load_url(self, href: DOMString); @@ -350,8 +350,8 @@ impl<'a> WindowHelpers for JSRef<'a, Window> { self.page().damage(); } - fn flush_layout(self, goal: ReflowGoal) { - self.page().flush_layout(goal); + fn flush_layout(self) { + self.page().flush_layout(NoQuery); } fn wait_until_safe_to_modify_dom(self) { |