Bug 1827463 [wpt PR 39476] - Reland "Nested calc() expressions need to consume all...
commitc6b2883ec327fdaee55d23fb6845bf6975c75d0e
authorFredrik Söderquist <fs@opera.com>
Thu, 13 Apr 2023 08:38:31 +0000 (13 08:38 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 14 Apr 2023 11:16:38 +0000 (14 11:16 +0000)
treee764836d67c84418640dad081731403eb228874c
parentf3ebc7700c503d8773c1e40d29aa6fb572bd230b
Bug 1827463 [wpt PR 39476] - Reland "Nested calc() expressions need to consume all their tokens", a=testonly

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

This is a reland of commit 5a426f9babceea8ffa93d870690634371a79457b

crbug.com/1430953 fixed in crrev.com/c/4414717

Original change's description:
> 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}

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

--

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