mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
script: Simplify DOMImplementation::CreateHTMLDocument.
This commit is contained in:
parent
d33ee4594d
commit
d1b175d145
1 changed files with 10 additions and 13 deletions
|
@ -155,9 +155,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
||||||
doc_html.AppendChild(&doc_head).unwrap();
|
doc_html.AppendChild(&doc_head).unwrap();
|
||||||
|
|
||||||
// Step 6.
|
// Step 6.
|
||||||
match title {
|
if let Some(title_str) = title {
|
||||||
None => (),
|
|
||||||
Some(title_str) => {
|
|
||||||
// Step 6.1.
|
// Step 6.1.
|
||||||
let doc_title =
|
let doc_title =
|
||||||
Root::upcast::<Node>(HTMLTitleElement::new(local_name!("title"),
|
Root::upcast::<Node>(HTMLTitleElement::new(local_name!("title"),
|
||||||
|
@ -170,7 +168,6 @@ impl DOMImplementationMethods for DOMImplementation {
|
||||||
doc_title.AppendChild(title_text.upcast()).unwrap();
|
doc_title.AppendChild(title_text.upcast()).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Step 7.
|
// Step 7.
|
||||||
let doc_body = HTMLBodyElement::new(local_name!("body"), None, &doc);
|
let doc_body = HTMLBodyElement::new(local_name!("body"), None, &doc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue