script: Unify LoadComplete and DOMLoad messages.

See the PR in which this commit landed and also
https://github.com/servo/servo/pull/6415#issuecomment-122294169
This commit is contained in:
Emilio Cobos Álvarez 2016-07-27 10:34:36 -07:00
parent 572b3c31bd
commit 36376461f4
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 10 additions and 25 deletions

View file

@ -1497,14 +1497,10 @@ impl Document {
let window = self.window();
window.dom_manipulation_task_source().queue_event(self.upcast(), atom!("DOMContentLoaded"),
EventBubbles::Bubbles, EventCancelable::NotCancelable, window);
window.reflow(ReflowGoal::ForDisplay,
ReflowQueryType::NoQuery,
ReflowReason::DOMContentLoaded);
let pipeline_id = self.window.pipeline();
let event = ConstellationMsg::DOMLoad(pipeline_id);
self.window.constellation_chan().send(event).unwrap();
update_with_current_time_ms(&self.dom_content_loaded_event_end);
}