diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs index aa3db5733bc..6aa9b466602 100644 --- a/components/script/dom/htmltablecellelement.rs +++ b/components/script/dom/htmltablecellelement.rs @@ -98,15 +98,15 @@ impl HTMLTableCellElementMethods for HTMLTableCellElement { } pub trait HTMLTableCellElementLayoutHelpers { - fn get_background_color(&self) -> Option; - fn get_colspan(&self) -> Option; - fn get_rowspan(&self) -> Option; - fn get_width(&self) -> LengthOrPercentageOrAuto; + fn get_background_color(self) -> Option; + fn get_colspan(self) -> Option; + fn get_rowspan(self) -> Option; + fn get_width(self) -> LengthOrPercentageOrAuto; } #[allow(unsafe_code)] impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> { - fn get_background_color(&self) -> Option { + fn get_background_color(self) -> Option { unsafe { (&*self.upcast::().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("bgcolor")) @@ -115,7 +115,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> { } } - fn get_colspan(&self) -> Option { + fn get_colspan(self) -> Option { unsafe { (&*self.upcast::().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("colspan")) @@ -123,7 +123,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> { } } - fn get_rowspan(&self) -> Option { + fn get_rowspan(self) -> Option { unsafe { (&*self.upcast::().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("rowspan")) @@ -131,7 +131,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> { } } - fn get_width(&self) -> LengthOrPercentageOrAuto { + fn get_width(self) -> LengthOrPercentageOrAuto { unsafe { (&*self.upcast::().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("width"))