mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Bug 1374233 - Part 3: Use NonNegativeAu as computed values for font-size related properties.
For font-size and font-size-adjust. MozReview-Commit-ID: 5rrfVSzB7WF
This commit is contained in:
parent
191c2a282b
commit
234d2c1b32
13 changed files with 87 additions and 57 deletions
|
@ -92,8 +92,8 @@ impl FontBaseSize {
|
|||
pub fn resolve(&self, context: &Context) -> Au {
|
||||
match *self {
|
||||
FontBaseSize::Custom(size) => size,
|
||||
FontBaseSize::CurrentStyle => context.style().get_font().clone_font_size(),
|
||||
FontBaseSize::InheritedStyle => context.style().get_parent_font().clone_font_size(),
|
||||
FontBaseSize::CurrentStyle => context.style().get_font().clone_font_size().0,
|
||||
FontBaseSize::InheritedStyle => context.style().get_parent_font().clone_font_size().0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ impl ToComputedValue for LineHeight {
|
|||
GenericLineHeight::Number(number.to_computed_value(context))
|
||||
},
|
||||
GenericLineHeight::Length(LengthOrPercentage::Length(ref length)) => {
|
||||
GenericLineHeight::Length(context.maybe_zoom_text(length.to_computed_value(context)))
|
||||
GenericLineHeight::Length(context.maybe_zoom_text(length.to_computed_value(context).into()).0)
|
||||
},
|
||||
GenericLineHeight::Length(LengthOrPercentage::Percentage(p)) => {
|
||||
let font_relative_length =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue