[wpt-sync] Sync PR 62494 - [CSS] Handle color-mix() and palette-mix() percentages adding up to zero
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
110.52 KB,
text/plain
|
Details |
Sync web-platform-tests PR 62494 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62494
Details from upstream follow.
Felipe Erias <felipeerias@igalia.com> wrote:
[CSS] Handle color-mix() and palette-mix() percentages adding up to zero
When the two percentages of color-mix() add up to zero, CSS Color 5
specifies a progress percentage of 0.5 and an alpha multiplier of 0,
so the result is transparent.https://www.w3.org/TR/css-color-5/#color-mix-result
https://github.com/w3c/csswg-drafts/issues/14013CSS Fonts 4 applies the same rules to palette-mix().
https://www.w3.org/TR/css-fonts-4/#font-palette-prop
Blink rejected color-mix() and palette-mix() at parse time when both
percentages were literally0%. When the zero sum came from calc()
instead, the values parsed but percentage normalization reported
failure. Then color-mix() went on with a progress percentage of 0,
and palette-mix() was replaced by the normal palette, as if the value
had not been specified.Remove the parse-time rejection. Make
CSSColorMixValue::NormalizePercentages() always produce a progress
percentage and an alpha multiplier, using 0.5 and 0 for a zero sum. Keep
a palette mix with equal endpoints when the alpha multiplier is not 1,
as collapsing it into a single palette would drop the multiplier.Tests:
external/wpt/css/css-color/parsing/color-valid-color-mix-function.html
external/wpt/css/css-color/parsing/color-computed-color-mix-function.html
StyleBuilderConverterTest.ResolveColorValue_ZeroCombinedPercentage
StyleBuilderConverterPageTest.PaletteMix_ZeroCombinedPercentageBug: 445726759
Change-Id: I79682e00f313722a09f3a9a337aac4eabd0cb0c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8337347
Commit-Queue: Felipe Erias \<felipeerias@igalia.com>
Reviewed-by: Anders Hartvoll Ruud \<andruud@chromium.org>
Reviewed-by: Kevin Babbitt \<kbabbitt@microsoft.com>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1693091}
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=0d0508286296fb1aa5dc884438d7e72561e9783d
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 45 tests and 27 subtests
Status Summary
Firefox
OK : 1[GitHub] 45[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: 893[GitHub] 10896[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]
FAIL: 65[GitHub] 1214[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]
Chrome
OK : 1
PASS: 878
FAIL: 80
Safari
OK : 1
PASS: 951
FAIL: 7
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /css/css-color/parsing/color-computed-color-mix-function.html [wpt.fyi]
- Property color value 'color-mix(in srgb, red calc(50% + (sign(100em - 1px) * 10%)), blue)':
FAILlinked bug:Bug 1915985
- Property color value 'color-mix(in srgb, red calc(50% + (sign(100em - 1px) * 10%)), blue)':
(See attachment for full changes)
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/3e44eb48539f
https://hg.mozilla.org/mozilla-central/rev/bf192caee9d6
Description
•