diff options
author | Anthony Ramine <nox@nox.paris> | 2020-03-29 17:22:47 +0200 |
---|---|---|
committer | Anthony Ramine <nox@nox.paris> | 2020-03-29 17:22:47 +0200 |
commit | 83045c7e6889097b15831da2b475fa5c0ed571c9 (patch) | |
tree | e73c648a53ac9716afb673350408c5b89e24febf /components/script/dom/htmltableelement.rs | |
parent | 09600301c522ce1217750a15404dcf1b47c806af (diff) | |
download | servo-83045c7e6889097b15831da2b475fa5c0ed571c9.tar.gz servo-83045c7e6889097b15831da2b475fa5c0ed571c9.zip |
Make HTMLTableElementLayoutHelpers methods take self
Diffstat (limited to 'components/script/dom/htmltableelement.rs')
-rw-r--r-- | components/script/dom/htmltableelement.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index 5bdb7f75281..4473746367a 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -406,15 +406,15 @@ impl HTMLTableElementMethods for HTMLTableElement { } pub trait HTMLTableElementLayoutHelpers { - fn get_background_color(&self) -> Option<RGBA>; - fn get_border(&self) -> Option<u32>; - fn get_cellspacing(&self) -> Option<u32>; - fn get_width(&self) -> LengthOrPercentageOrAuto; + fn get_background_color(self) -> Option<RGBA>; + fn get_border(self) -> Option<u32>; + fn get_cellspacing(self) -> Option<u32>; + fn get_width(self) -> LengthOrPercentageOrAuto; } impl HTMLTableElementLayoutHelpers for LayoutDom<'_, HTMLTableElement> { #[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")) @@ -424,17 +424,17 @@ impl HTMLTableElementLayoutHelpers for LayoutDom<'_, HTMLTableElement> { } #[allow(unsafe_code)] - fn get_border(&self) -> Option<u32> { + fn get_border(self) -> Option<u32> { unsafe { (*self.unsafe_get()).border.get() } } #[allow(unsafe_code)] - fn get_cellspacing(&self) -> Option<u32> { + fn get_cellspacing(self) -> Option<u32> { unsafe { (*self.unsafe_get()).cellspacing.get() } } #[allow(unsafe_code)] - fn get_width(&self) -> LengthOrPercentageOrAuto { + fn get_width(self) -> LengthOrPercentageOrAuto { unsafe { (*self.upcast::<Element>().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("width")) |