Closed Bug 1826672 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 39401 - Revert "Nested calc() expressions need to consume all their tokens"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 39401 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/39401
Details from upstream follow.

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Revert "Nested calc() expressions need to consume all their tokens"

This reverts commit 5a426f9babceea8ffa93d870690634371a79457b.

Reason for revert: Caused crbug.com/1430953

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}

Bug: 1430953,1430413
Change-Id: I866b130615c4328bd4b99716e74e3a045e0f348c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4404759
Bot-Commit: Rubber Stamper \<rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Xiaocheng Hu \<xiaochengh@chromium.org>
Commit-Queue: Rubber Stamper \<rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1126878}

PR 39401 applied with additional changes from upstream: a2f64a335f647849afbb30d470c294ba0d335f57
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7530c10ae4bf [wpt PR 39401] - Revert "Nested calc() expressions need to consume all their tokens", a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.