aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlimageelement.rs
diff options
context:
space:
mode:
authorchickenleaf <lashwinib@gmail.com>2024-10-21 17:58:56 +0530
committerGitHub <noreply@github.com>2024-10-21 12:28:56 +0000
commit9acb25521e433bdea49866e4ecb6a9f4e90b0663 (patch)
tree96c99cdf3e5f4c157dbfb08eff8240d9dff55bfc /components/script/dom/htmlimageelement.rs
parent66695d2f7ee25782d3edfca32b74ff14bc9faa84 (diff)
downloadservo-9acb25521e433bdea49866e4ecb6a9f4e90b0663.tar.gz
servo-9acb25521e433bdea49866e4ecb6a9f4e90b0663.zip
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>
Diffstat (limited to 'components/script/dom/htmlimageelement.rs')
-rw-r--r--components/script/dom/htmlimageelement.rs8
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(),
}