diff options
author | Anthony Ramine <nox@nox.paris> | 2020-03-29 17:17:00 +0200 |
---|---|---|
committer | Anthony Ramine <nox@nox.paris> | 2020-03-29 17:17:00 +0200 |
commit | e7cfd0c409fdb2af7d80e37fd8c39d3b01cab1b1 (patch) | |
tree | fbb013840e5788727ca757e6320900b142313e9b /components/script/dom/htmlbodyelement.rs | |
parent | 9d337ea013c0f3568e4bd3a23e746ae55922b937 (diff) | |
download | servo-e7cfd0c409fdb2af7d80e37fd8c39d3b01cab1b1.tar.gz servo-e7cfd0c409fdb2af7d80e37fd8c39d3b01cab1b1.zip |
Make HTMLBodyElementLayoutHelpers methods take self
Diffstat (limited to 'components/script/dom/htmlbodyelement.rs')
-rw-r--r-- | components/script/dom/htmlbodyelement.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<RGBA>; - fn get_color(&self) -> Option<RGBA>; - fn get_background(&self) -> Option<ServoUrl>; + fn get_background_color(self) -> Option<RGBA>; + fn get_color(self) -> Option<RGBA>; + fn get_background(self) -> Option<ServoUrl>; } impl HTMLBodyElementLayoutHelpers for LayoutDom<'_, HTMLBodyElement> { #[allow(unsafe_code)] - fn get_background_color(&self) -> Option<RGBA> { + fn get_background_color(self) -> Option<RGBA> { unsafe { (*self.upcast::<Element>().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<RGBA> { + fn get_color(self) -> Option<RGBA> { unsafe { (*self.upcast::<Element>().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<ServoUrl> { + fn get_background(self) -> Option<ServoUrl> { unsafe { (*self.upcast::<Element>().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("background")) |