mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use generics for the line-height property
This commit is contained in:
parent
cf71a0cd96
commit
5c6987a50d
12 changed files with 234 additions and 213 deletions
|
@ -38,8 +38,9 @@ use shared_lock::StylesheetGuards;
|
|||
use style_traits::{HasViewportPercentage, ToCss};
|
||||
use stylesheets::{CssRuleType, MallocSizeOf, MallocSizeOfFn, Origin, UrlExtraData};
|
||||
#[cfg(feature = "servo")] use values::Either;
|
||||
use values::specified::Color;
|
||||
use values::generics::text::LineHeight;
|
||||
use values::computed;
|
||||
use values::specified::Color;
|
||||
use cascade_info::CascadeInfo;
|
||||
use rule_tree::{CascadeLevel, StrongRuleNode};
|
||||
use style_adjuster::StyleAdjuster;
|
||||
|
@ -1262,11 +1263,9 @@ impl PropertyDeclaration {
|
|||
}
|
||||
|
||||
/// Is it the default value of line-height?
|
||||
///
|
||||
/// (using match because it generates less code than)
|
||||
pub fn is_default_line_height(&self) -> bool {
|
||||
match *self {
|
||||
PropertyDeclaration::LineHeight(longhands::line_height::SpecifiedValue::Normal) => true,
|
||||
PropertyDeclaration::LineHeight(LineHeight::Normal) => true,
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue