diff options
Diffstat (limited to 'components/script/dom/htmlimageelement.rs')
-rw-r--r-- | components/script/dom/htmlimageelement.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 6280f4b32b8..33f907d9985 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -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(), } |