mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
stylo: Add keyword info to computed value of font-size
This commit is contained in:
parent
5a6b90b14f
commit
c2fcc9ce1a
13 changed files with 141 additions and 52 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue