aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domparser.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-10-23 09:18:37 -0600
committerbors-servo <metajack+bors@gmail.com>2014-10-23 09:18:37 -0600
commit2df236376a443d8d031ee7a72379f336f2cd8cc4 (patch)
tree8f4278428198189993dd703945ada5189ddaf764 /components/script/dom/domparser.rs
parent470d27a6681b4647de64c085654403820d48f7af (diff)
parent539c21f38022b6d0be6ad01be94bc2e1217d5ccb (diff)
downloadservo-2df236376a443d8d031ee7a72379f336f2cd8cc4.tar.gz
servo-2df236376a443d8d031ee7a72379f336f2cd8cc4.zip
auto merge of #3759 : jdm/servo/readystate, r=Ms2ger
...itor after the initial parse. Fixes #1720. Fixes #3738. r? @Ms2ger or @Manishearth
Diffstat (limited to 'components/script/dom/domparser.rs')
-rw-r--r--components/script/dom/domparser.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs
index 0ce5487159a..30bbebf77df 100644
--- a/components/script/dom/domparser.rs
+++ b/components/script/dom/domparser.rs
@@ -10,7 +10,7 @@ use dom::bindings::global::GlobalRef;
use dom::bindings::global;
use dom::bindings::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
-use dom::document::{Document, HTMLDocument, NonHTMLDocument};
+use dom::document::{Document, HTMLDocument, NonHTMLDocument, NotFromParser};
use dom::window::Window;
use servo_util::str::DOMString;
@@ -44,12 +44,15 @@ impl<'a> DOMParserMethods for JSRef<'a, DOMParser> {
ty: DOMParserBinding::SupportedType)
-> Fallible<Temporary<Document>> {
let window = self.window.root();
+ //FIXME: these should probably be FromParser when we actually parse the string (#3756).
match ty {
Text_html => {
- Ok(Document::new(*window, None, HTMLDocument, Some("text/html".to_string())))
+ Ok(Document::new(*window, None, HTMLDocument, Some("text/html".to_string()),
+ NotFromParser))
}
Text_xml => {
- Ok(Document::new(*window, None, NonHTMLDocument, Some("text/xml".to_string())))
+ Ok(Document::new(*window, None, NonHTMLDocument, Some("text/xml".to_string()),
+ NotFromParser))
}
_ => {
Err(FailureUnknown)