mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -24,6 +24,7 @@ use crate::dom::element::{Element, LayoutElementHelpers};
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLFontElement {
|
||||
|
@ -47,11 +48,13 @@ impl HTMLFontElement {
|
|||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
proto: Option<HandleObject>,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<HTMLFontElement> {
|
||||
Node::reflect_node_with_proto(
|
||||
Box::new(HTMLFontElement::new_inherited(local_name, prefix, document)),
|
||||
document,
|
||||
proto,
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -104,9 +107,9 @@ impl HTMLFontElementMethods for HTMLFontElement {
|
|||
make_getter!(Size, "size");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-font-size
|
||||
fn SetSize(&self, value: DOMString) {
|
||||
fn SetSize(&self, value: DOMString, can_gc: CanGc) {
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_attribute(&local_name!("size"), parse_size(&value));
|
||||
element.set_attribute(&local_name!("size"), parse_size(&value), can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue