mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
cangc fixes in node.rs (#33984)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
3ed778150f
commit
bb4932026c
97 changed files with 1038 additions and 534 deletions
|
@ -59,6 +59,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
qualified_name: DOMString,
|
||||
pubid: DOMString,
|
||||
sysid: DOMString,
|
||||
can_gc: CanGc,
|
||||
) -> Fallible<DomRoot<DocumentType>> {
|
||||
validate_qualified_name(&qualified_name)?;
|
||||
Ok(DocumentType::new(
|
||||
|
@ -66,6 +67,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
Some(pubid),
|
||||
Some(sysid),
|
||||
&self.document,
|
||||
can_gc,
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -165,7 +167,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
{
|
||||
// Step 3.
|
||||
let doc_node = doc.upcast::<Node>();
|
||||
let doc_type = DocumentType::new(DOMString::from("html"), None, None, &doc);
|
||||
let doc_type = DocumentType::new(DOMString::from("html"), None, None, &doc, can_gc);
|
||||
doc_node.AppendChild(doc_type.upcast()).unwrap();
|
||||
}
|
||||
|
||||
|
@ -177,6 +179,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
None,
|
||||
&doc,
|
||||
None,
|
||||
can_gc,
|
||||
));
|
||||
doc_node.AppendChild(&doc_html).expect("Appending failed");
|
||||
|
||||
|
@ -187,6 +190,7 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
None,
|
||||
&doc,
|
||||
None,
|
||||
can_gc,
|
||||
));
|
||||
doc_html.AppendChild(&doc_head).unwrap();
|
||||
|
||||
|
@ -198,17 +202,18 @@ impl DOMImplementationMethods for DOMImplementation {
|
|||
None,
|
||||
&doc,
|
||||
None,
|
||||
can_gc,
|
||||
));
|
||||
doc_head.AppendChild(&doc_title).unwrap();
|
||||
|
||||
// Step 6.2.
|
||||
let title_text = Text::new(title_str, &doc);
|
||||
let title_text = Text::new(title_str, &doc, can_gc);
|
||||
doc_title.AppendChild(title_text.upcast()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
// Step 7.
|
||||
let doc_body = HTMLBodyElement::new(local_name!("body"), None, &doc, None);
|
||||
let doc_body = HTMLBodyElement::new(local_name!("body"), None, &doc, None, can_gc);
|
||||
doc_html.AppendChild(doc_body.upcast()).unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue