mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +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
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue