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:
Boris Chiou 2017-07-21 15:38:55 +08:00
parent 191c2a282b
commit 234d2c1b32
13 changed files with 87 additions and 57 deletions

View file

@ -71,7 +71,7 @@ impl ToComputedValue for specified::NoCalcLength {
specified::NoCalcLength::ViewportPercentage(length) =>
length.to_computed_value(context.viewport_size()),
specified::NoCalcLength::ServoCharacterWidth(length) =>
length.to_computed_value(context.style().get_font().clone_font_size()),
length.to_computed_value(context.style().get_font().clone_font_size().0),
#[cfg(feature = "gecko")]
specified::NoCalcLength::Physical(length) =>
length.to_computed_value(context),
@ -265,7 +265,7 @@ impl specified::CalcLengthOrPercentage {
/// Compute font-size or line-height taking into account text-zoom if necessary.
pub fn to_computed_value_zoomed(&self, context: &Context) -> CalcLengthOrPercentage {
self.to_computed_value_with_zoom(context, |abs| context.maybe_zoom_text(abs))
self.to_computed_value_with_zoom(context, |abs| context.maybe_zoom_text(abs.into()).0)
}
}