mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix namespaces of elements created in XML documents
This commit is contained in:
parent
7ae9c96467
commit
bef86cbf36
5 changed files with 18 additions and 15 deletions
|
@ -2772,7 +2772,14 @@ impl DocumentMethods for Document {
|
|||
if self.is_html_document {
|
||||
local_name.make_ascii_lowercase();
|
||||
}
|
||||
let name = QualName::new(ns!(html), LocalName::from(local_name));
|
||||
|
||||
let ns = if self.is_html_document || self.content_type == "application/xhtml+xml" {
|
||||
ns!(html)
|
||||
} else {
|
||||
ns!()
|
||||
};
|
||||
|
||||
let name = QualName::new(ns, LocalName::from(local_name));
|
||||
Ok(Element::create(name, None, self, ElementCreator::ScriptCreated))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue