Make HTMLTableSectionElementLayoutHelpers methods take self

This commit is contained in:
Anthony Ramine 2020-03-29 17:23:52 +02:00
parent 5d3274c181
commit 56793f24da

View file

@ -84,12 +84,12 @@ impl HTMLTableSectionElementMethods for HTMLTableSectionElement {
} }
pub trait HTMLTableSectionElementLayoutHelpers { pub trait HTMLTableSectionElementLayoutHelpers {
fn get_background_color(&self) -> Option<RGBA>; fn get_background_color(self) -> Option<RGBA>;
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
impl HTMLTableSectionElementLayoutHelpers for LayoutDom<'_, HTMLTableSectionElement> { impl HTMLTableSectionElementLayoutHelpers for LayoutDom<'_, HTMLTableSectionElement> {
fn get_background_color(&self) -> Option<RGBA> { fn get_background_color(self) -> Option<RGBA> {
unsafe { unsafe {
(&*self.upcast::<Element>().unsafe_get()) (&*self.upcast::<Element>().unsafe_get())
.get_attr_for_layout(&ns!(), &local_name!("bgcolor")) .get_attr_for_layout(&ns!(), &local_name!("bgcolor"))