Bug 1682607 - Normalize NaN in some other font-related lengths etc. r=jfkthame,layout-reviewers

Depends on D104563

Differential Revision: https://phabricator.services.mozilla.com/D104565
This commit is contained in:
Emilio Cobos Álvarez 2021-02-10 15:30:40 +00:00
Родитель fd47e3b3f3
Коммит 1691b8a61c
3 изменённых файлов: 22 добавлений и 2 удалений

Просмотреть файл

@ -925,7 +925,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.

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<style>
CITE::first-letter {
font-size: 0%;
margin-inline-start: 2682182284.200815ch
}
* {
font-size: 4294967295% !important;
}
</style>
</head>
<del>
<button>
<cite></cite>
</button>
</del>
</html>