Bug 1804802 [wpt PR 37414] - Fix a bug in CSSNumericValue parsing, a=testonly
commit2013d69eb8a955d140250037b0fb9ee69bf3f321
authorXiaocheng Hu <xiaochengh@chromium.org>
Sun, 11 Dec 2022 21:38:36 +0000 (11 21:38 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 12 Dec 2022 11:38:58 +0000 (12 11:38 +0000)
tree385c700aeb230a5ce92984a790ec854eeef36547
parent70223718c1420fb3679268a3879068b5dc33c3a1
Bug 1804802 [wpt PR 37414] - Fix a bug in CSSNumericValue parsing, a=testonly

Automatic update from web-platform-tests
Fix a bug in CSSNumericValue parsing

In CSSNumericValue parsing, there's a part of code that tries to merge
consecutive binary operations (e.g., `a + b + c`) into a variable
Typed OM operation node. The code was written before the introduction
of min/max/clamp, and incorrectly loops into such nodes, and then tries
to convert a min/max/clamp as a binary arithmetic operation.

This patch makes it aware that there are comparison nodes in the
expression tree and therefore fixes the bug.

Fixed: 1395232
Change-Id: Iff12c5f26785effa716b705630c21219935f9861
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4090552
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1081264}

--

wpt-commits: f8579f36b038208e5a7feef1ff1658871643c508
wpt-pr: 37414
testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html