From 21e8c72a7526a32733453221d4ed10ac070521dd Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 12 Dec 2013 19:36:51 -0800 Subject: constellation: Stop using futures for frame sizes. This will allow us to stop going to the DOM in order to handle iframe sizing. Instead we can just store the pipeline and frame IDs of iframes inside the flow tree itself. --- src/components/script/dom/htmliframeelement.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/components/script/dom/htmliframeelement.rs') diff --git a/src/components/script/dom/htmliframeelement.rs b/src/components/script/dom/htmliframeelement.rs index 73172cb0ad8..7f39cfa58d8 100644 --- a/src/components/script/dom/htmliframeelement.rs +++ b/src/components/script/dom/htmliframeelement.rs @@ -9,15 +9,11 @@ use dom::element::HTMLIframeElementTypeId; use dom::htmlelement::HTMLElement; use dom::node::{AbstractNode, Node, ScriptView}; use dom::windowproxy::WindowProxy; -use geom::size::Size2D; -use geom::rect::Rect; +use extra::url::Url; +use geom::rect::Rect; use servo_msg::constellation_msg::{ConstellationChan, FrameRectMsg, PipelineId, SubpageId}; - use std::ascii::StrAsciiExt; -use std::comm::ChanOne; -use extra::url::Url; -use std::util::replace; enum SandboxAllowance { AllowNothing = 0x00, @@ -39,17 +35,11 @@ pub struct HTMLIFrameElement { struct IFrameSize { pipeline_id: PipelineId, subpage_id: SubpageId, - future_chan: Option>>, constellation_chan: ConstellationChan, } impl IFrameSize { pub fn set_rect(&mut self, rect: Rect) { - let future_chan = replace(&mut self.future_chan, None); - do future_chan.map |future_chan| { - let Size2D { width, height } = rect.size; - future_chan.send(Size2D(width as uint, height as uint)); - }; self.constellation_chan.send(FrameRectMsg(self.pipeline_id, self.subpage_id, rect)); } } -- cgit v1.2.3