Split page load into separate network and parsing stages. Delay Page creation until the load is finished. Make session history traversal simply activate existing pipelines, rather than potentially loading them from the network.

This commit is contained in:
Josh Matthews 2015-02-19 10:00:02 -05:00
parent 621150db1c
commit d9f04180a5
5 changed files with 267 additions and 189 deletions

View file

@ -88,7 +88,8 @@ impl Pipeline {
storage_task.clone(),
image_cache_task.clone(),
devtools_chan,
window_size);
window_size,
load_data.clone());
ScriptControlChan(script_chan)
}
Some(spipe) => {
@ -97,6 +98,7 @@ impl Pipeline {
new_pipeline_id: id,
subpage_id: parent.expect("script_pipeline != None but subpage_id == None").1,
layout_chan: ScriptTaskFactory::clone_layout_channel(None::<&mut STF>, &layout_pair),
load_data: load_data.clone(),
};
let ScriptControlChan(ref chan) = spipe.script_chan;
@ -160,11 +162,9 @@ impl Pipeline {
}
}
pub fn load(&self) {
pub fn activate(&self) {
let ScriptControlChan(ref chan) = self.script_chan;
chan.send(ConstellationControlMsg::Load(self.id,
self.parent,
self.load_data.clone())).unwrap();
chan.send(ConstellationControlMsg::Activate(self.id)).unwrap();
}
pub fn grant_paint_permission(&self) {