script: Fix a few load related bugs.

This is what was making me hit the new test failures. So turns out that when the
DOMContentLoaded event is fired we fired no messages to the constellation, but
we fired the DOMLoad message from the DocumentProgressHandler, effectively after
having dispatched the Load message from script thread.

This also fixes the possibility of a subframe navigation not blocking the load
event of the parent document, for example.
This commit is contained in:
Emilio Cobos Álvarez 2016-07-24 04:26:54 -07:00
parent d81fe27b11
commit e6958d3947
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 22 additions and 14 deletions

View file

@ -1193,8 +1193,6 @@ impl ScriptThread {
// https://html.spec.whatwg.org/multipage/#the-end step 7
let handler = box DocumentProgressHandler::new(Trusted::new(doc));
self.dom_manipulation_task_source.queue(handler, GlobalRef::Window(doc.window())).unwrap();
self.constellation_chan.send(ConstellationMsg::LoadComplete(pipeline)).unwrap();
}
fn collect_reports(&self, reports_chan: ReportsChan) {