[wpt-sync] Sync PR 64231 - Keep percent hint of math functions returning a number
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
585.34 KB,
text/plain
|
Details |
Sync web-platform-tests PR 64231 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64231
Details from upstream follow.
Sampath Samaraweera <sampath.samaraweera@codimite.com> wrote:
Keep percent hint of math functions returning a number
Math functions that return a \<number>, like round(), mod(), sign()
or exp(), are typed by their category alone, which can't express a
percent hint. So in e.g. calc(100% / round(100% / 10px)), the fact
that the percentage inside round() resolves against a length was
lost, and the whole expression was categorized as a plain
\<percentage>. CSSPrimitiveValue::ConvertToLength() then resolved it
before layout via ComputePercentage(), which treats every percentage
as a plain number, i.e. as if 100% were always 100px.Per css-values-4, such functions are made consistent with the type
of their arguments, so they keep the arguments' percent hint.
Recover that hint from the operands when computing the CSSMathType
of a \<number> math function, and keep it for the invert node created
for division. The example above is then a \<length-percentage> and is
resolved against the actual percentage basis at layout time.The change is guarded by the CSSNumberMathFunctionPercentHint
runtime flag.Fixed: 562857754
Change-Id: Ia0554fe14dff632357fe33365a63ca7293db7527
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8607729
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Reviewed-by: Fredrik Söderquist \<fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1727822}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| 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=115777
| Assignee | ||
Comment 2•29 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 522 tests and 23 subtests
Status Summary
Firefox
OK : 1[GitHub] 286[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-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 22[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, GitHub] 6307[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 6460[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 6461[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 6473[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]
FAIL: 4100[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 4146[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] 4160[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 4161[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
PASS: 4
FAIL: 18
Safari
OK : 1
PASS: 3
FAIL: 19
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
(See attachment for full changes)
Comment 4•24 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b2081c6bbfc5
https://hg.mozilla.org/mozilla-central/rev/dc1bf9bad398
Description
•