Move link rel=stylesheet fetching to layout task

Fixes #3346.
This commit is contained in:
Matt Brubeck 2014-09-15 12:39:18 -07:00
parent 7a5f15f137
commit 1ae3bda172
17 changed files with 154 additions and 196 deletions

View file

@ -23,10 +23,8 @@ use dom::node::{ElementNodeTypeId, Node, NodeHelpers};
use dom::window::{TimerId, Window, WindowHelpers};
use dom::worker::{Worker, TrustedWorkerAddress};
use dom::xmlhttprequest::{TrustedXHRAddress, XMLHttpRequest, XHRProgress};
use html::hubbub_html_parser::{InputString, InputUrl, HtmlParserResult};
use html::hubbub_html_parser::{HtmlDiscoveredStyle, HtmlDiscoveredScript};
use html::hubbub_html_parser::{InputString, InputUrl, HtmlParserResult, HtmlDiscoveredScript};
use html::hubbub_html_parser;
use layout_interface::AddStylesheetMsg;
use layout_interface::{ScriptLayoutChan, LayoutChan, MatchSelectorsDocumentDamage};
use layout_interface::{ReflowDocumentDamage, ReflowForDisplay};
use layout_interface::ContentChangedDocumentDamage;
@ -682,10 +680,6 @@ impl ScriptTask {
assert!(js_scripts.is_none());
js_scripts = Some(scripts);
}
Ok(HtmlDiscoveredStyle(sheet)) => {
let LayoutChan(ref chan) = *page.layout_chan;
chan.send(AddStylesheetMsg(sheet));
}
Err(()) => break
}
}