Files
sousa-gecko/testing/web-platform/tests/css/css-flexbox/balance/flex-line-count-computed.html
T
Fredrik Söderquist 1f32c3dda1 Bug 2041370 [wpt PR 60050] - Move NaN censoring into CSSMathFunctionValue::ClampToPermittedRange, a=testonly
Automatic update from web-platform-tests
Move NaN censoring into CSSMathFunctionValue::ClampToPermittedRange

A NaN would not be modified by ClampToPermittedRange(), so any later
censoring would produce an incorrect result for the kPositiveInteger
value range.

Perform the censoring as a first step in ClampToPermittedRange(),
before applying the value range.

Remove a few of the censoring operations in callers since they will be
redundant.

Add the censoring operation as CensorNaNToZero() to
CSSValueClampingUtils, and also convert CSSValueClampingUtils to use it.

Fixed: 509964638
Change-Id: I33786a5a5b8c887e15247f4107aa2182ab1053aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7862886
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1634196}

--

wpt-commits: 74df1f2b9f187ba810f6d2207e33a5092f09484d
wpt-pr: 60050
2026-05-27 07:27:16 +00:00

16 lines
555 B
HTML

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-flexbox-2/#flex-line-count-property">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<body>
<div id="target"></div>
<script>
test_computed_value("flex-line-count", "1");
test_computed_value("flex-line-count", "2");
test_computed_value("flex-line-count", "round(up, calc(7/2))", "4");
test_computed_value("flex-line-count", "calc(NaN)", "1");
</script>
</body>
</html>