diff options
Diffstat (limited to 'components/script/dom/htmlimageelement.rs')
-rw-r--r-- | components/script/dom/htmlimageelement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 5afbb4f0535..626f23b69f8 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -22,7 +22,7 @@ use crate::dom::document::Document; use crate::dom::element::{cors_setting_for_element, referrer_policy_for_element}; use crate::dom::element::{reflect_cross_origin_attribute, set_cross_origin_attribute}; use crate::dom::element::{ - AttributeMutation, CustomElementCreationMode, Element, ElementCreator, RawLayoutElementHelpers, + AttributeMutation, CustomElementCreationMode, Element, ElementCreator, LayoutElementHelpers, }; use crate::dom::event::Event; use crate::dom::eventtarget::EventTarget; @@ -1418,7 +1418,7 @@ impl LayoutHTMLImageElementHelpers for LayoutDom<'_, HTMLImageElement> { #[allow(unsafe_code)] fn get_width(self) -> LengthOrPercentageOrAuto { unsafe { - (*self.upcast::<Element>().unsafe_get()) + self.upcast::<Element>() .get_attr_for_layout(&ns!(), &local_name!("width")) .map(AttrValue::as_dimension) .cloned() @@ -1429,7 +1429,7 @@ impl LayoutHTMLImageElementHelpers for LayoutDom<'_, HTMLImageElement> { #[allow(unsafe_code)] fn get_height(self) -> LengthOrPercentageOrAuto { unsafe { - (*self.upcast::<Element>().unsafe_get()) + self.upcast::<Element>() .get_attr_for_layout(&ns!(), &local_name!("height")) .map(AttrValue::as_dimension) .cloned() |