Bug 1848131 - Replace computed alpha NaN values with zero r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D185920
This commit is contained in:
Tiaan Louw 2023-08-10 12:58:37 +00:00
parent bc75bd4701
commit d97fe6397d
2 changed files with 2 additions and 6 deletions

View File

@ -872,6 +872,8 @@ impl Color {
color.components = color.components.map(normalize);
}
color.alpha = normalize(color.alpha);
ComputedColor::Absolute(color)
},
Color::LightDark(ref ld) => ld.compute(context?),

View File

@ -1,6 +0,0 @@
[color-computed-rgb.html]
[Property color value 'rgba(0, 0, 0, calc(NaN))' [Alpha channel resolves NaN to zero\]]
expected: FAIL
[Property color value 'rgba(0, 0, 0, calc(0 / 0))' [Alpha channel resolves NaN equivalent calc statements to zero\]]
expected: FAIL