[wpt-sync] Sync PR 63209 - Disallow percentage in calc() for <length>
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
586.77 KB,
text/plain
|
Details |
Sync web-platform-tests PR 63209 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63209
Details from upstream follow.
Rune Lillesveen <futhark@chromium.org> wrote:
Disallow percentage in calc() for <length>
We should not allow values such as calc(4px * sign(10%)) as a valid
\<length>.Adjusted test_invalid_length() tests lacking a calc() wrapper which
made them incorrectly pass without the changes here.This CL also disallows percentage in \<length> for these cases:
calc(4px * sign(10% / 10%)
calc(4px * (10% / 10%))There are open issues against the spec:
https://github.com/w3c/csswg-drafts/issues/14300
https://github.com/w3c/csswg-drafts/issues/12204
https://github.com/w3c/csswg-drafts/issues/10017The two latter aligns with the current Firefox Nightly.
It should be noted that we already disallowed percentages for other
value types such as \<angle> and \<resolution>.Fixes a UAF issue where CalcHandles() are accessed from multiple
threads computing length values in a canvas worker thread.Turn DCHECK() into CHECK() for IsMainThread() to crash instead of
doing cross thread access to CalcHandles().Bug: 416644951, 567611695
Change-Id: I1e4be23733b3139d16986e3848323a99248f72f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8482545
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Reviewed-by: David Baron \<dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1709882}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=99858
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 545 tests and 23 subtests
Status Summary
Firefox
OK : 1[GitHub] 279[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 308[Gecko-linux2404-64-debug] 309[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 23[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 54[GitHub] 6198[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 6362[Gecko-android-em-14-x86_64-debug-geckoview] 6363[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 6380[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 4106[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 4152[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 4167[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 1
Chrome
OK : 1
PASS : 50
CRASH : 1
FAIL : 3
Safari
OK : 1
PASS : 52
FAIL : 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
(See attachment for full changes)
https://hg.mozilla.org/mozilla-central/rev/7bb242aab6a1
https://hg.mozilla.org/mozilla-central/rev/0fc4861f6cb5
Description
•