mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +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
|
@ -15,6 +15,7 @@ use crate::dom::document::Document;
|
|||
use crate::dom::element::Element;
|
||||
use crate::dom::node::{window_from_node, Node};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct SVGElement {
|
||||
|
@ -48,11 +49,13 @@ impl SVGElement {
|
|||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
proto: Option<HandleObject>,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<SVGElement> {
|
||||
Node::reflect_node_with_proto(
|
||||
Box::new(SVGElement::new_inherited(tag_name, prefix, document)),
|
||||
document,
|
||||
proto,
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -83,8 +86,8 @@ impl SVGElementMethods for SVGElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fe-autofocus
|
||||
fn SetAutofocus(&self, autofocus: bool) {
|
||||
fn SetAutofocus(&self, autofocus: bool, can_gc: CanGc) {
|
||||
self.element
|
||||
.set_bool_attribute(&local_name!("autofocus"), autofocus);
|
||||
.set_bool_attribute(&local_name!("autofocus"), autofocus, can_gc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue