diff options
author | Tim Kuehn <tkuehn@cmu.edu> | 2013-08-08 23:06:10 -0700 |
---|---|---|
committer | Tim Kuehn <tkuehn@cmu.edu> | 2013-08-19 19:11:12 -0400 |
commit | f2c00f7e2870c05573c18713d0d33f025d66010a (patch) | |
tree | 51a9b8a039ba6c5ab4fc6549feff432d4a096415 /src/components/main/pipeline.rs | |
parent | 8993434c39bd64efded22ed60607859239c3f3ed (diff) | |
download | servo-f2c00f7e2870c05573c18713d0d33f025d66010a.tar.gz servo-f2c00f7e2870c05573c18713d0d33f025d66010a.zip |
move navigation_type from Pipeline to FrameChange
Diffstat (limited to 'src/components/main/pipeline.rs')
-rw-r--r-- | src/components/main/pipeline.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs index ab12a1f73e0..a1760dc7868 100644 --- a/src/components/main/pipeline.rs +++ b/src/components/main/pipeline.rs @@ -11,7 +11,7 @@ use gfx::opts::Opts; use layout::layout_task::LayoutTask; use script::layout_interface::LayoutChan; use script::script_task::{ExecuteMsg, LoadMsg}; -use servo_msg::constellation_msg::{ConstellationChan, NavigationType, PipelineId, SubpageId}; +use servo_msg::constellation_msg::{ConstellationChan, PipelineId, SubpageId}; use script::script_task::{AttachLayoutMsg, NewLayoutInfo, ScriptTask, ScriptChan}; use script::script_task; use servo_net::image_cache_task::ImageCacheTask; @@ -31,7 +31,6 @@ pub struct Pipeline { render_chan: RenderChan, /// The most recently loaded url url: Option<Url>, - navigation_type: Option<NavigationType>, } impl Pipeline { @@ -140,13 +139,11 @@ impl Pipeline { layout_chan: layout_chan, render_chan: render_chan, url: None, - navigation_type: None, } } - pub fn load(&mut self, url: Url, navigation_type: Option<NavigationType>) { + pub fn load(&mut self, url: Url) { self.url = Some(url.clone()); - self.navigation_type = navigation_type; self.script_chan.send(LoadMsg(self.id, url)); } @@ -163,11 +160,10 @@ impl Pipeline { self.render_chan.send(PaintPermissionRevoked); } - pub fn reload(&mut self, navigation_type: Option<NavigationType>) { - if self.url.is_some() { - let url = self.url.get_ref().clone(); - self.load(url, navigation_type); - } + pub fn reload(&mut self) { + do self.url.clone().map_consume() |url| { + self.load(url); + }; } pub fn exit(&self) { |