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

@ -96,8 +96,8 @@ impl FontBaseSize {
pub fn resolve(&self, context: &Context) -> Au {
match *self {
FontBaseSize::Custom(size) => size,
FontBaseSize::CurrentStyle => Au::from(context.style().get_font().clone_font_size()),
FontBaseSize::InheritedStyle => Au::from(context.style().get_parent_font().clone_font_size()),
FontBaseSize::CurrentStyle => context.style().get_font().clone_font_size().size(),
FontBaseSize::InheritedStyle => context.style().get_parent_font().clone_font_size().size(),
}
}
}

View file

@ -100,7 +100,7 @@ impl ToComputedValue for LineHeight {
GenericLineHeight::Length(ref non_negative_lop) => {
let result = match non_negative_lop.0 {
LengthOrPercentage::Length(NoCalcLength::Absolute(ref abs)) => {
context.maybe_zoom_text(abs.to_computed_value(context))
context.maybe_zoom_text(abs.to_computed_value(context).into()).0
}
LengthOrPercentage::Length(ref length) => {
length.to_computed_value(context)