Bug 1826551 [wpt PR 39391] - Nested calc() expressions need to consume all their...
commit3184a053e871a67cdb397ddd78ed8de50256b297
authorFredrik Söderquist <fs@opera.com>
Thu, 13 Apr 2023 04:32:29 +0000 (13 04:32 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 14 Apr 2023 11:15:58 +0000 (14 11:15 +0000)
tree3fbf17f3a3339213b8c93fd13c78a3eb2db2f191
parent578add58e528213a66e12f5422f75270be26bb5d
Bug 1826551 [wpt PR 39391] - Nested calc() expressions need to consume all their tokens, a=testonly

Automatic update from web-platform-tests
Nested calc() expressions need to consume all their tokens

When parsing a nested calc() expression that had a valid first part
(term) that was followed by an invalid operator the parsed part was
returned to the caller - which had already consumed the tokens within
the sub-expression. The caller only checked that an expression node was
returned, which meant that the sub-expression was considered valid.

Require that all tokens that are part of the sub-expression have been
consumed after parsing has completed to fail the parsing in such a case.

Fixed: 1430413
Change-Id: I3072e22e2a7b81296510173266814a18fb6bfc37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4400956
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126635}

--

wpt-commits: a2f64a335f647849afbb30d470c294ba0d335f57
wpt-pr: 39391
testing/web-platform/tests/css/css-values/calc-invalid-parsing.html [new file with mode: 0644]