Navigation Menu

Skip to content

Commit

Permalink
stylo: Handle text-zoom for line-height
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Aug 2, 2017
1 parent 613012d commit fb107d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/style/values/specified/text.rs
Expand Up @@ -95,15 +95,15 @@ impl ToComputedValue for LineHeight {
GenericLineHeight::Number(number.to_computed_value(context))
},
GenericLineHeight::Length(LengthOrPercentage::Length(ref length)) => {
GenericLineHeight::Length(length.to_computed_value(context))
GenericLineHeight::Length(context.maybe_zoom_text(length.to_computed_value(context)))
},
GenericLineHeight::Length(LengthOrPercentage::Percentage(p)) => {
let font_relative_length =
Length::NoCalc(NoCalcLength::FontRelative(FontRelativeLength::Em(p.0)));
GenericLineHeight::Length(font_relative_length.to_computed_value(context))
},
GenericLineHeight::Length(LengthOrPercentage::Calc(ref calc)) => {
let computed_calc = calc.to_computed_value(context);
let computed_calc = calc.to_computed_value_zoomed(context);
let font_relative_length =
Length::NoCalc(NoCalcLength::FontRelative(FontRelativeLength::Em(computed_calc.percentage())));
let absolute_length = computed_calc.unclamped_length();
Expand Down

0 comments on commit fb107d8

Please sign in to comment.