Closed Bug 1826551 Opened 3 years ago Closed 3 years ago

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

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Fredrik Söderquist <fs@opera.com> wrote:

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/4400956
WPT-Export-Revision: 37971085c2460e202bbf49c646fd48b58d6c63f4

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/73e55bc14ef6 [wpt PR 39391] - 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.