mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
CanGc changes from fontfaceset.rs (#33920)
* CanGc changes from fontfaceset.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Update components/script/dom/bindings/codegen/Bindings.conf Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: chickenleaf <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
66695d2f7e
commit
9acb25521e
32 changed files with 425 additions and 274 deletions
|
@ -1596,9 +1596,9 @@ impl HTMLImageElementMethods for HTMLImageElement {
|
|||
make_bool_setter!(SetIsMap, "ismap");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-img-width
|
||||
fn Width(&self) -> u32 {
|
||||
fn Width(&self, can_gc: CanGc) -> u32 {
|
||||
let node = self.upcast::<Node>();
|
||||
match node.bounding_content_box() {
|
||||
match node.bounding_content_box(can_gc) {
|
||||
Some(rect) => rect.size.width.to_px() as u32,
|
||||
None => self.NaturalWidth(),
|
||||
}
|
||||
|
@ -1610,9 +1610,9 @@ impl HTMLImageElementMethods for HTMLImageElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-img-height
|
||||
fn Height(&self) -> u32 {
|
||||
fn Height(&self, can_gc: CanGc) -> u32 {
|
||||
let node = self.upcast::<Node>();
|
||||
match node.bounding_content_box() {
|
||||
match node.bounding_content_box(can_gc) {
|
||||
Some(rect) => rect.size.height.to_px() as u32,
|
||||
None => self.NaturalHeight(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue