mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Normalize NaN in some other font-related lengths etc.
Depends on D104563 Differential Revision: https://phabricator.services.mozilla.com/D104565
This commit is contained in:
parent
db03b2cf8e
commit
3a64fa2006
2 changed files with 2 additions and 2 deletions
|
@ -933,7 +933,7 @@ impl FontSize {
|
|||
// If the parent font was keyword-derived, this is too.
|
||||
// Tack the % onto the factor
|
||||
info = compose_keyword(pc.0);
|
||||
base_size.resolve(context) * pc.0
|
||||
(base_size.resolve(context) * pc.0).normalized()
|
||||
},
|
||||
FontSize::Length(LengthPercentage::Calc(ref calc)) => {
|
||||
let calc = calc.to_computed_value_zoomed(context, base_size);
|
||||
|
|
|
@ -135,7 +135,7 @@ impl FontRelativeLength {
|
|||
base_size: FontBaseSize,
|
||||
) -> computed::Length {
|
||||
let (reference_size, length) = self.reference_font_size_and_length(context, base_size);
|
||||
reference_size * length
|
||||
(reference_size * length).normalized()
|
||||
}
|
||||
|
||||
/// Return reference font size.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue