[wpt-sync] Sync PR 33662 - EvaluateOperator() should return NaN if operands has NaN value
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 33662 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/33662
Details from upstream follow.
Seokho Song <seokho@chromium.org> wrote:
EvaluateOperator() should return NaN if operands has NaN value
According to spec [1], 'Any operation with at least one NaN argument produces NaN'
However, the compare expression results are false so possibly return the number for std::max and std::min.
e.g. ( "( param1 \< param2)? param1 : param2" ) - if param1 is NaN, it will always return param2.
Therefore, check NaN existence in operands before the actual operation is consumed.
[1] https://drafts.csswg.org/css-values/#calc-type-checking
Bug: 1313012
Change-Id: I28e977adf233ffca99aa8d7d61cd95a509805f15
Reviewed-on: https://chromium-review.googlesource.com/3586615
WPT-Export-Revision: 04b5c25373b619e1ac36cc97515d7bf0d06a3d62
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=2382878f5565139f71d0a2195162b9c7eb496f8d
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/464d0d8e7af3 [wpt PR 33662] - EvaluateOperator() should return NaN if operands has NaN value, a=testonly https://hg.mozilla.org/integration/autoland/rev/e676adb01d75 [wpt PR 33662] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/464d0d8e7af3
https://hg.mozilla.org/mozilla-central/rev/e676adb01d75
Description
•