aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domimplementation.rs
diff options
context:
space:
mode:
authorchickenleaf <lashwinib@gmail.com>2024-10-24 04:14:50 +0530
committerGitHub <noreply@github.com>2024-10-23 22:44:50 +0000
commitbb4932026cef55aefd95a5a627a944e1ad26c6f2 (patch)
tree1bcdd4a258beb01c3eb788d94d3698e4d3ebb2b9 /components/script/dom/domimplementation.rs
parent3ed778150fbaa2656d38e4cda8325797d14d27c1 (diff)
downloadservo-bb4932026cef55aefd95a5a627a944e1ad26c6f2.tar.gz
servo-bb4932026cef55aefd95a5a627a944e1ad26c6f2.zip
cangc fixes in node.rs (#33984)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Diffstat (limited to 'components/script/dom/domimplementation.rs')
-rw-r--r--components/script/dom/domimplementation.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs
index 9266445ef17..7a75fce1ae4 100644
--- a/components/script/dom/domimplementation.rs
+++ b/components/script/dom/domimplementation.rs
@@ -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();
}