aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-13 15:06:51 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-12-13 15:10:04 -0800
commit971f77d2c69740ef625aff6aacab6297ce537765 (patch)
treec5e485ebdf2f22725098b6f09c1f910a30c31e80 /src/components/script
parentaa1ebbbdb0243f098921103f02bb9b7dbcc40441 (diff)
downloadservo-971f77d2c69740ef625aff6aacab6297ce537765.tar.gz
servo-971f77d2c69740ef625aff6aacab6297ce537765.zip
layout: Stop going to the DOM for iframe sizes
Diffstat (limited to 'src/components/script')
-rw-r--r--src/components/script/dom/htmliframeelement.rs12
-rw-r--r--src/components/script/html/hubbub_html_parser.rs7
-rw-r--r--src/components/script/script_task.rs8
3 files changed, 9 insertions, 18 deletions
diff --git a/src/components/script/dom/htmliframeelement.rs b/src/components/script/dom/htmliframeelement.rs
index 7f39cfa58d8..3f8ff80a5c7 100644
--- a/src/components/script/dom/htmliframeelement.rs
+++ b/src/components/script/dom/htmliframeelement.rs
@@ -11,8 +11,7 @@ use dom::node::{AbstractNode, Node, ScriptView};
use dom::windowproxy::WindowProxy;
use extra::url::Url;
-use geom::rect::Rect;
-use servo_msg::constellation_msg::{ConstellationChan, FrameRectMsg, PipelineId, SubpageId};
+use servo_msg::constellation_msg::{PipelineId, SubpageId};
use std::ascii::StrAsciiExt;
enum SandboxAllowance {
@@ -32,16 +31,9 @@ pub struct HTMLIFrameElement {
sandbox: Option<u8>
}
-struct IFrameSize {
+pub struct IFrameSize {
pipeline_id: PipelineId,
subpage_id: SubpageId,
- constellation_chan: ConstellationChan,
-}
-
-impl IFrameSize {
- pub fn set_rect(&mut self, rect: Rect<f32>) {
- self.constellation_chan.send(FrameRectMsg(self.pipeline_id, self.subpage_id, rect));
- }
}
impl HTMLIFrameElement {
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index e73d1205950..6ca31770032 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -17,7 +17,7 @@ use script_task::page_from_context;
use extra::url::Url;
use hubbub::hubbub;
use js::jsapi::JSContext;
-use servo_msg::constellation_msg::{ConstellationChan, SubpageId};
+use servo_msg::constellation_msg::SubpageId;
use servo_net::image_cache_task::ImageCacheTask;
use servo_net::resource_task::{Load, Payload, Done, ResourceTask, load_whole_resource};
use servo_util::tree::{TreeNodeRef, ElementLike};
@@ -248,8 +248,8 @@ pub fn parse_html(cx: *JSContext,
url: Url,
resource_task: ResourceTask,
image_cache_task: ImageCacheTask,
- next_subpage_id: SubpageId,
- constellation_chan: ConstellationChan) -> HtmlParserResult {
+ next_subpage_id: SubpageId)
+ -> HtmlParserResult {
debug!("Hubbub: parsing {:?}", url);
// Spawn a CSS parser to receive links to CSS style sheets.
let resource_task2 = resource_task.clone();
@@ -385,7 +385,6 @@ pub fn parse_html(cx: *JSContext,
iframe_element.size = Some(IFrameSize {
pipeline_id: pipeline_id,
subpage_id: subpage_id,
- constellation_chan: constellation_chan.clone(),
});
iframe_chan.send(HtmlDiscoveredIFrame((iframe_url,
subpage_id,
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index 4676639a6a4..226a5af6305 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -723,11 +723,11 @@ impl ScriptTask {
url.clone(),
self.resource_task.clone(),
self.image_cache_task.clone(),
- page.next_subpage_id.clone(),
- self.constellation_chan.clone());
+ page.next_subpage_id.clone());
-
- let HtmlParserResult {discovery_port} = html_parsing_result;
+ let HtmlParserResult {
+ discovery_port
+ } = html_parsing_result;
// Create the root frame.
page.frame = Some(Frame {