[wpt-sync] Sync PR 49311 - Make ConsumeNumberOrPercent() not crash on unresolvable calc().
Categories
(Core :: Layout, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox135 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 49311 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/49311
Details from upstream follow.
Steinar H. Gunderson <sesse@chromium.org> wrote:
Make ConsumeNumberOrPercent() not crash on unresolvable calc().
Instead of calling GetDoubleValue() on percentage calc expressions,
we just return them directly, and then add a new rule saying that
ComputeNumber() on them returns the percentage value divided by 100.
This avoids crashes when we try to force them during parsing.This also takes us halfway towards fixing the opacity-valid.html test;
we no longer convert it into just a double (without surrounding calc()),
but since we don't properly simplify comparison expressions containing
percentages, we don't simplify as much as we should either, so the test
is still broken. (And even after that, we'd probably need to convert
percentages to decimals inside calc for such properties.)Change-Id: I8e0e25c35d3df82da75cfb1cf551d7f25d825696
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6037437
Reviewed-by: Anders Hartvoll Ruud \<andruud@chromium.org>
Commit-Queue: Steinar H Gunderson \<sesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1386209}
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 2 subtests
Status Summary
Firefox
OK : 1
FAIL: 2
Chrome
OK : 1
PASS: 2
Safari
OK : 1
PASS: 2
Links
Details
Firefox-only Failures
- /compat/webkit-gradient-sign.html [wpt.fyi]
- webkit-gradient-sign:
FAIL - webkit-gradient-sign 1:
FAIL
- webkit-gradient-sign:
New Tests That Don't Pass
- /compat/webkit-gradient-sign.html [wpt.fyi]
- webkit-gradient-sign:
FAIL(Chrome:PASS, Safari:PASS) - webkit-gradient-sign 1:
FAIL(Chrome:PASS, Safari:PASS)
- webkit-gradient-sign:
Comment 5•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6ef49a46449c
https://hg.mozilla.org/mozilla-central/rev/34e1a1467ed0
Description
•