Make all DOM manipulation wait until it's safe to do so (ie. all reflows for the page have completed). Fix a race where a newly-initiated reflow would be considered complete when receiving the completion notice for the previous reflow.

This commit is contained in:
Josh Matthews 2013-09-16 23:41:34 -04:00
parent 37787d55d0
commit d465abdb1c
7 changed files with 49 additions and 10 deletions

View file

@ -458,6 +458,12 @@ impl Document {
window.content_changed()
}
}
pub fn wait_until_safe_to_modify_dom(&self) {
for window in self.window.iter() {
window.wait_until_safe_to_modify_dom();
}
}
}
impl Traceable for Document {