stylo: Add keyword info to computed value of font-size

This commit is contained in:
Manish Goregaokar 2017-09-12 13:53:39 -07:00 committed by Manish Goregaokar
parent 5a6b90b14f
commit c2fcc9ce1a
13 changed files with 141 additions and 52 deletions

View file

@ -35,7 +35,7 @@ impl ToComputedValue for specified::NoCalcLength {
specified::NoCalcLength::ViewportPercentage(length) =>
length.to_computed_value(context.viewport_size_for_viewport_unit_resolution()),
specified::NoCalcLength::ServoCharacterWidth(length) =>
length.to_computed_value(Au::from(context.style().get_font().clone_font_size())),
length.to_computed_value(context.style().get_font().clone_font_size().size()),
#[cfg(feature = "gecko")]
specified::NoCalcLength::Physical(length) =>
length.to_computed_value(context),
@ -269,7 +269,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, base_size: FontBaseSize) -> CalcLengthOrPercentage {
self.to_computed_value_with_zoom(context, |abs| context.maybe_zoom_text(abs), base_size)
self.to_computed_value_with_zoom(context, |abs| context.maybe_zoom_text(abs.into()).0, base_size)
}
}