aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-12 19:36:51 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-12-13 10:43:27 -0800
commit21e8c72a7526a32733453221d4ed10ac070521dd (patch)
tree03204e5058c7b16f07a3718d240d3bacfd9a0021 /src/components/script/dom/htmliframeelement.rs
parent499aa97fa4424cad9585e57987665542003e2597 (diff)
downloadservo-21e8c72a7526a32733453221d4ed10ac070521dd.tar.gz
servo-21e8c72a7526a32733453221d4ed10ac070521dd.zip
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.
Diffstat (limited to 'src/components/script/dom/htmliframeelement.rs')
-rw-r--r--src/components/script/dom/htmliframeelement.rs14
1 files changed, 2 insertions, 12 deletions
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<ChanOne<Size2D<uint>>>,
constellation_chan: ConstellationChan,
}
impl IFrameSize {
pub fn set_rect(&mut self, rect: Rect<f32>) {
- 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));
}
}