mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Change LengthOrPercentage to make use of NoCalcLength
This commit is contained in:
parent
377a23df50
commit
590c9579f0
10 changed files with 61 additions and 60 deletions
|
@ -454,18 +454,13 @@ impl LayoutElementHelpers for LayoutJS<Element> {
|
|||
font_family)])))));
|
||||
}
|
||||
|
||||
let font_size = if let Some(this) = self.downcast::<HTMLFontElement>() {
|
||||
this.get_size()
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let font_size = self.downcast::<HTMLFontElement>().and_then(|this| this.get_size());
|
||||
|
||||
if let Some(font_size) = font_size {
|
||||
hints.push(from_declaration(
|
||||
PropertyDeclaration::FontSize(
|
||||
DeclaredValue::Value(
|
||||
font_size::SpecifiedValue(
|
||||
LengthOrPercentage::Length(font_size))))))
|
||||
font_size::SpecifiedValue(font_size.into())))))
|
||||
}
|
||||
|
||||
let cellspacing = if let Some(this) = self.downcast::<HTMLTableElement>() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue