Warning police.

This commit is contained in:
Josh Matthews 2014-03-14 14:46:30 -04:00 committed by Lars Bergstrom
parent f279abbf9f
commit 64c0de9fe7
44 changed files with 146 additions and 160 deletions

View file

@ -72,18 +72,18 @@ impl DOMImplementation {
{
// Step 3.
let doc_type = DocumentType::new(~"html", None, None, &doc);
doc_node.AppendChild(&mut NodeCast::from(&doc_type));
assert!(doc_node.AppendChild(&mut NodeCast::from(&doc_type)).is_ok());
}
{
// Step 4.
let mut doc_html = NodeCast::from(&HTMLHtmlElement::new(~"html", &doc));
doc_node.AppendChild(&mut doc_html);
assert!(doc_node.AppendChild(&mut doc_html).is_ok());
{
// Step 5.
let mut doc_head = NodeCast::from(&HTMLHeadElement::new(~"head", &doc));
doc_html.AppendChild(&mut doc_head);
assert!(doc_html.AppendChild(&mut doc_head).is_ok());
// Step 6.
match title {
@ -91,18 +91,18 @@ impl DOMImplementation {
Some(title_str) => {
// Step 6.1.
let mut doc_title = NodeCast::from(&HTMLTitleElement::new(~"title", &doc));
doc_head.AppendChild(&mut doc_title);
assert!(doc_head.AppendChild(&mut doc_title).is_ok());
// Step 6.2.
let title_text = Text::new(title_str, &doc);
doc_title.AppendChild(&mut NodeCast::from(&title_text));
assert!(doc_title.AppendChild(&mut NodeCast::from(&title_text)).is_ok());
}
}
}
// Step 7.
let doc_body = HTMLBodyElement::new(~"body", &doc);
doc_html.AppendChild(&mut NodeCast::from(&doc_body));
assert!(doc_html.AppendChild(&mut NodeCast::from(&doc_body)).is_ok());
}
// Step 8.