Bug 1823446 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

New WPT tests (not landed upstream yet) added in patch for Bug 1820412 show that we also don't simplify `min()`/`max()` expressions with `NaN` arguments correctly. Split up from that bug for ease of patching.

Incompatible mixed units should not be simplified, even with `NaN`. Expected examples:
`calc(1 * min(NaN * 1pt, NaN * 1cm))` -> `calc(NaN * 1px)` - compatible mixed, simplify
`calc(1 * min(NaN * 2px, NaN * 4em))` -> `min(NaN * 1px, NaN * 1em)` - incompatible mixed, no simplification
`1 * clamp(NaN * 2em, NaN * 4px, NaN * 8pt)` -> `clamp(NaN * 1em, NaN * 1px, NaN * 1px)` - some compatible, but one incompatible, so no simplification (note unit `pt` goes to canonical `px` still though)
New WPT tests (not landed upstream yet) added in patch for Bug 1820412 show that we also don't simplify `min()`/`max()` expressions with `NaN` arguments correctly. Split up from that bug for ease of patching.

Incompatible mixed units should not be simplified, even with `NaN`. Expected examples:
`calc(1 * min(NaN * 1pt, NaN * 1cm))` -> `calc(NaN * 1px)` - compatible mixed, simplify
`calc(1 * min(NaN * 2px, NaN * 4em))` -> `min(NaN * 1px, NaN * 1em)` - incompatible mixed, no simplification
`calc(1 * clamp(NaN * 2em, NaN * 4px, NaN * 8pt))` -> `clamp(NaN * 1em, NaN * 1px, NaN * 1px)` - some compatible, but one incompatible, so no simplification (note unit `pt` goes to canonical `px` still though)

Back to Bug 1823446 Comment 0