mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make HTMLTableCellElementLayoutHelpers methods take self
This commit is contained in:
parent
f794feb6f4
commit
09600301c5
1 changed files with 8 additions and 8 deletions
|
@ -98,15 +98,15 @@ impl HTMLTableCellElementMethods for HTMLTableCellElement {
|
|||
}
|
||||
|
||||
pub trait HTMLTableCellElementLayoutHelpers {
|
||||
fn get_background_color(&self) -> Option<RGBA>;
|
||||
fn get_colspan(&self) -> Option<u32>;
|
||||
fn get_rowspan(&self) -> Option<u32>;
|
||||
fn get_width(&self) -> LengthOrPercentageOrAuto;
|
||||
fn get_background_color(self) -> Option<RGBA>;
|
||||
fn get_colspan(self) -> Option<u32>;
|
||||
fn get_rowspan(self) -> Option<u32>;
|
||||
fn get_width(self) -> LengthOrPercentageOrAuto;
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> {
|
||||
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"))
|
||||
|
@ -115,7 +115,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_colspan(&self) -> Option<u32> {
|
||||
fn get_colspan(self) -> Option<u32> {
|
||||
unsafe {
|
||||
(&*self.upcast::<Element>().unsafe_get())
|
||||
.get_attr_for_layout(&ns!(), &local_name!("colspan"))
|
||||
|
@ -123,7 +123,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutDom<'_, HTMLTableCellElement> {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_rowspan(&self) -> Option<u32> {
|
||||
fn get_rowspan(self) -> Option<u32> {
|
||||
unsafe {
|
||||
(&*self.upcast::<Element>().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::<Element>().unsafe_get())
|
||||
.get_attr_for_layout(&ns!(), &local_name!("width"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue