aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmloptionelement.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/htmloptionelement.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/htmloptionelement.rs')
-rw-r--r--components/script/dom/htmloptionelement.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs
index 6b475017bed..649d35a50d8 100644
--- a/components/script/dom/htmloptionelement.rs
+++ b/components/script/dom/htmloptionelement.rs
@@ -72,6 +72,7 @@ impl HTMLOptionElement {
prefix: Option<Prefix>,
document: &Document,
proto: Option<HandleObject>,
+ can_gc: CanGc,
) -> DomRoot<HTMLOptionElement> {
Node::reflect_node_with_proto(
Box::new(HTMLOptionElement::new_inherited(
@@ -79,6 +80,7 @@ impl HTMLOptionElement {
)),
document,
proto,
+ can_gc,
)
}
@@ -196,7 +198,7 @@ impl HTMLOptionElementMethods for HTMLOptionElement {
let option = DomRoot::downcast::<HTMLOptionElement>(element).unwrap();
if !text.is_empty() {
- option.upcast::<Node>().SetTextContent(Some(text))
+ option.upcast::<Node>().SetTextContent(Some(text), can_gc)
}
if let Some(val) = value {
@@ -223,8 +225,8 @@ impl HTMLOptionElementMethods for HTMLOptionElement {
}
// https://html.spec.whatwg.org/multipage/#dom-option-text
- fn SetText(&self, value: DOMString) {
- self.upcast::<Node>().SetTextContent(Some(value))
+ fn SetText(&self, value: DOMString, can_gc: CanGc) {
+ self.upcast::<Node>().SetTextContent(Some(value), can_gc)
}
// https://html.spec.whatwg.org/multipage/#dom-option-form