Properly mark application/xhtml+xml documents as XML

For this to work, we must remove the unimplemented!() call
in Element::parse_fragment because all the tests rely on
setting innerHTML.
This commit is contained in:
Anthony Ramine 2016-11-30 16:19:07 +01:00
parent 0c64bd766a
commit c1bdd3d5ce
8 changed files with 9 additions and 136 deletions

View file

@ -1278,12 +1278,8 @@ impl Element {
pub fn parse_fragment(&self, markup: DOMString) -> Fallible<Root<DocumentFragment>> {
// Steps 1-2.
let context_document = document_from_node(self);
let new_children = if context_document.is_html_document() {
ServoParser::parse_html_fragment(self, markup)
} else {
// FIXME: XML case
unimplemented!()
};
// TODO(#11995): XML case.
let new_children = ServoParser::parse_html_fragment(self, markup);
// Step 3.
let fragment = DocumentFragment::new(&context_document);
// Step 4.