Prepend, rather than append, SVG title elements.

Fixes #8164
This commit is contained in:
Michael Howell 2015-10-31 14:38:16 -07:00
parent dc159d055c
commit 71c5d1764a
2 changed files with 4 additions and 10 deletions

View file

@ -1740,8 +1740,10 @@ impl DocumentMethods for Document {
let name = QualName::new(ns!(SVG), atom!("title")); let name = QualName::new(ns!(SVG), atom!("title"));
let elem = Element::create(name, None, self, let elem = Element::create(name, None, self,
ElementCreator::ScriptCreated); ElementCreator::ScriptCreated);
root.upcast::<Node>() let parent = root.upcast::<Node>();
.AppendChild(elem.upcast()) let child = elem.upcast::<Node>();
parent
.InsertBefore(child, parent.GetFirstChild().r())
.unwrap() .unwrap()
} }
} }

View file

@ -1,8 +0,0 @@
[document.title-09.html]
type: testharness
[No title element in SVG document]
expected: FAIL
[Title element not child of SVG root]
expected: FAIL