aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/documenttype.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/documenttype.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/documenttype.rs')
-rw-r--r--components/script/dom/documenttype.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/components/script/dom/documenttype.rs b/components/script/dom/documenttype.rs
index 7ffd6a948e7..c0384650577 100644
--- a/components/script/dom/documenttype.rs
+++ b/components/script/dom/documenttype.rs
@@ -12,6 +12,7 @@ use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString;
use crate::dom::document::Document;
use crate::dom::node::Node;
+use crate::script_runtime::CanGc;
// https://dom.spec.whatwg.org/#documenttype
/// The `DOCTYPE` tag.
@@ -43,12 +44,14 @@ impl DocumentType {
public_id: Option<DOMString>,
system_id: Option<DOMString>,
document: &Document,
+ can_gc: CanGc,
) -> DomRoot<DocumentType> {
Node::reflect_node(
Box::new(DocumentType::new_inherited(
name, public_id, system_id, document,
)),
document,
+ can_gc,
)
}
@@ -85,18 +88,18 @@ impl DocumentTypeMethods for DocumentType {
}
// https://dom.spec.whatwg.org/#dom-childnode-before
- fn Before(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
- self.upcast::<Node>().before(nodes)
+ fn Before(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> ErrorResult {
+ self.upcast::<Node>().before(nodes, can_gc)
}
// https://dom.spec.whatwg.org/#dom-childnode-after
- fn After(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
- self.upcast::<Node>().after(nodes)
+ fn After(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> ErrorResult {
+ self.upcast::<Node>().after(nodes, can_gc)
}
// https://dom.spec.whatwg.org/#dom-childnode-replacewith
- fn ReplaceWith(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
- self.upcast::<Node>().replace_with(nodes)
+ fn ReplaceWith(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> ErrorResult {
+ self.upcast::<Node>().replace_with(nodes, can_gc)
}
// https://dom.spec.whatwg.org/#dom-childnode-remove