aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-10-08 21:12:02 +0200
committerMs2ger <ms2ger@gmail.com>2013-10-10 10:57:38 +0200
commit04319fdb684e37bcb29cad7e096da2298dc027a5 (patch)
tree27f8d1465fa5557e1e12f933edbb36246c732d92 /src/components/script/script_task.rs
parent59d2d345c82974d686692d16570828046866488a (diff)
downloadservo-04319fdb684e37bcb29cad7e096da2298dc027a5.tar.gz
servo-04319fdb684e37bcb29cad7e096da2298dc027a5.zip
Issue #888 - Node's owner document should never be None.
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 69509d3a648..c29a2d3c599 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -715,17 +715,18 @@ impl ScriptTask {
// Parse HTML.
//
// Note: We can parse the next document in parallel with any previous documents.
+ let document = HTMLDocument::new(Some(window));
+
let html_parsing_result = hubbub_html_parser::parse_html(cx.ptr,
+ document,
url.clone(),
self.resource_task.clone(),
self.image_cache_task.clone(),
page.next_subpage_id.clone(),
self.constellation_chan.clone());
- let document = HTMLDocument::new(Some(window));
let HtmlParserResult {root, discovery_port, url: final_url} = html_parsing_result;
- document.set_root(root);
// Create the root frame.
page.frame = Some(Frame {
@@ -770,9 +771,8 @@ impl ScriptTask {
// of the page.
// FIXME: We have no way to ensure that the first reflow performed is a
// ReflowForDisplay operation.
- do root.with_mut_base |base| {
- base.add_to_doc(document)
- }
+ document.set_root(root);
+
// No more reflow required
page.url = Some((url, false));