diff options
-rw-r--r-- | components/script/dom/domparser.rs | 7 | ||||
-rw-r--r-- | components/script/dom/webidls/DOMParser.webidl | 4 | ||||
-rw-r--r-- | tests/wpt/metadata/domparsing/DOMParser-parseFromString-xml.html.ini | 18 |
3 files changed, 7 insertions, 22 deletions
diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs index f5655fdbed3..346b8f80170 100644 --- a/components/script/dom/domparser.rs +++ b/components/script/dom/domparser.rs @@ -5,7 +5,10 @@ use document_loader::DocumentLoader; use dom::bindings::codegen::Bindings::DOMParserBinding; use dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods; -use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::{Text_html, Text_xml}; +use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xhtml_xml; +use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xml; +use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_html; +use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_xml; use dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::error::Fallible; @@ -70,7 +73,7 @@ impl DOMParserMethods for DOMParser { document.set_ready_state(DocumentReadyState::Complete); Ok(document) } - Text_xml => { + Text_xml | Application_xml | Application_xhtml_xml => { // FIXME: this should probably be FromParser when we actually parse the string (#3756). let document = Document::new(&self.window, None, diff --git a/components/script/dom/webidls/DOMParser.webidl b/components/script/dom/webidls/DOMParser.webidl index 9df194706b9..8680f695f97 100644 --- a/components/script/dom/webidls/DOMParser.webidl +++ b/components/script/dom/webidls/DOMParser.webidl @@ -8,9 +8,9 @@ enum SupportedType { "text/html", - "text/xml"/*, + "text/xml", "application/xml", - "application/xhtml+xml", + "application/xhtml+xml"/*, "image/svg+xml"*/ }; diff --git a/tests/wpt/metadata/domparsing/DOMParser-parseFromString-xml.html.ini b/tests/wpt/metadata/domparsing/DOMParser-parseFromString-xml.html.ini index c5f9f1fdb9b..a3744b3b3ce 100644 --- a/tests/wpt/metadata/domparsing/DOMParser-parseFromString-xml.html.ini +++ b/tests/wpt/metadata/domparsing/DOMParser-parseFromString-xml.html.ini @@ -3,30 +3,12 @@ [Should return an error document for XML wellformedness errors in type text/xml] expected: FAIL - [Should parse correctly in type application/xml] - expected: FAIL - - [XMLDocument interface for correctly parsed document with type application/xml] - expected: FAIL - [Should return an error document for XML wellformedness errors in type application/xml] expected: FAIL - [XMLDocument interface for incorrectly parsed document with type application/xml] - expected: FAIL - - [Should parse correctly in type application/xhtml+xml] - expected: FAIL - - [XMLDocument interface for correctly parsed document with type application/xhtml+xml] - expected: FAIL - [Should return an error document for XML wellformedness errors in type application/xhtml+xml] expected: FAIL - [XMLDocument interface for incorrectly parsed document with type application/xhtml+xml] - expected: FAIL - [Should parse correctly in type image/svg+xml] expected: FAIL |