mirror of
https://github.com/servo/servo.git
synced 2025-06-13 02:44:29 +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();
|
||||
|
||||
// Step 6.
|
||||
match title {
|
||||
None => (),
|
||||
Some(title_str) => {
|
||||
if let Some(title_str) = title {
|
||||
// Step 6.1.
|
||||
let doc_title =
|
||||
Root::upcast::<Node>(HTMLTitleElement::new(local_name!("title"),
|
||||
|
@ -170,7 +168,6 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
doc_title.AppendChild(title_text.upcast()).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Step 7.
|
||||
let doc_body = HTMLBodyElement::new(local_name!("body"), None, &doc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue