diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index 0f3a0d51e15..1d9d2dc69b8 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -94,14 +94,14 @@ impl HTMLBodyElementMethods for HTMLBodyElement { } pub trait HTMLBodyElementLayoutHelpers { - fn get_background_color(&self) -> Option; - fn get_color(&self) -> Option; - fn get_background(&self) -> Option; + fn get_background_color(self) -> Option; + fn get_color(self) -> Option; + fn get_background(self) -> Option; } impl HTMLBodyElementLayoutHelpers for LayoutDom<'_, HTMLBodyElement> { #[allow(unsafe_code)] - 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")) @@ -111,7 +111,7 @@ impl HTMLBodyElementLayoutHelpers for LayoutDom<'_, HTMLBodyElement> { } #[allow(unsafe_code)] - fn get_color(&self) -> Option { + fn get_color(self) -> Option { unsafe { (*self.upcast::().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("text")) @@ -121,7 +121,7 @@ impl HTMLBodyElementLayoutHelpers for LayoutDom<'_, HTMLBodyElement> { } #[allow(unsafe_code)] - fn get_background(&self) -> Option { + fn get_background(self) -> Option { unsafe { (*self.upcast::().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("background"))