aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2013-09-11 21:03:56 -0700
committerJosh Matthews <josh@joshmatthews.net>2013-09-12 10:17:00 -0700
commit4ec428b9d6eb5d3c0e188b085bb7836cd36a12a9 (patch)
treed151fa3ee758a3fee14883d671ed0b5182044f68 /src/components/script/script_task.rs
parent2372a841494dce56bc56467f2bcdb77ffa997cdd (diff)
downloadservo-4ec428b9d6eb5d3c0e188b085bb7836cd36a12a9.tar.gz
servo-4ec428b9d6eb5d3c0e188b085bb7836cd36a12a9.zip
Trigger a reflow when nodes are appended and removed from the document. Fixes #907.
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index 4025de24bb4..95c433c8569 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -611,11 +611,6 @@ impl ScriptTask {
let document = HTMLDocument::new(root, Some(window));
- // Tie the root into the document.
- do root.with_mut_base |base| {
- base.add_to_doc(document)
- }
-
// Create the root frame.
page.frame = Some(Frame {
document: document,
@@ -623,6 +618,11 @@ impl ScriptTask {
});
page.url = Some((url.clone(), true));
+ // Tie the root into the document.
+ do root.with_mut_base |base| {
+ base.add_to_doc(document)
+ }
+
// Send style sheets over to layout.
//
// FIXME: These should be streamed to layout as they're parsed. We don't need to stop here