Delay initiating layout operations for as long as possible.

This commit is contained in:
Josh Matthews 2014-09-15 23:16:45 -04:00
parent 8a02fe0fc6
commit 2bd93ed070
4 changed files with 46 additions and 13 deletions

View file

@ -693,6 +693,7 @@ impl ScriptTask {
// Kick off the initial reflow of the page.
debug!("kicking off initial reflow of {}", url);
document.deref().content_changed();
window.flush_layout(ReflowForDisplay);
let fragment = url.fragment.as_ref().map(|ref fragment| fragment.to_string());
@ -722,6 +723,8 @@ impl ScriptTask {
Ok(_) => (),
Err(_) => println!("evaluate_script failed")
}
window.flush_layout(ReflowForDisplay);
}
});