mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Auto merge of #8296 - notriddle:svg_title_prepend, r=nox
Prepend, rather than append, SVG title elements. Fixes #8164 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8296) <!-- Reviewable:end -->
This commit is contained in:
commit
3c794d0076
2 changed files with 4 additions and 10 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue