Skip to content

Commit

Permalink
Reorder some steps in ServoParser::finish
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Jan 17, 2017
1 parent 70ed3e7 commit 44fd53f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/script/dom/servoparser/mod.rs
Expand Up @@ -343,22 +343,22 @@ impl ServoParser {
assert!(self.script_input.borrow().is_empty());
assert!(self.network_input.borrow().is_empty());

// Step 1.
self.document.set_ready_state(DocumentReadyState::Interactive);

// Step 2.
self.tokenizer.borrow_mut().end();
self.document.set_current_parser(None);

if self.pipeline.is_some() {
// Step 1.
self.document.set_ready_state(DocumentReadyState::Interactive);

self.document.disarm_reflow_timeout();
self.document.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
let window = self.document.window();
window.reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery, ReflowReason::FirstLoad);

// Step 3.
self.document.process_deferred_scripts();
}

// Step 3.
self.document.process_deferred_scripts();
}
}

Expand Down

0 comments on commit 44fd53f

Please sign in to comment.