mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add support for cellpadding attribute (#31201)
This commit is contained in:
parent
091653417a
commit
7d1b19c865
17 changed files with 58 additions and 68 deletions
|
@ -989,6 +989,32 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
|
|||
PropertyDeclaration::BorderRightWidth(width_value),
|
||||
));
|
||||
}
|
||||
|
||||
if let Some(cellpadding) = self
|
||||
.downcast::<HTMLTableCellElement>()
|
||||
.and_then(|this| this.get_table())
|
||||
.and_then(|table| table.get_cellpadding())
|
||||
{
|
||||
let cellpadding = NonNegative(specified::LengthPercentage::Length(
|
||||
specified::NoCalcLength::from_px(cellpadding as f32),
|
||||
));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::PaddingTop(cellpadding.clone()),
|
||||
));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::PaddingLeft(cellpadding.clone()),
|
||||
));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::PaddingBottom(cellpadding.clone()),
|
||||
));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::PaddingRight(cellpadding),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
fn get_colspan(self) -> u32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue