[wpt-sync] Sync PR 40397 - Serialize and compute non-finite color channels
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 40397 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/40397
Details from upstream follow.
Aaron Krajeski <aaronhk@chromium.org> wrote:
Serialize and compute non-finite color channels
http://github.com/w3c/csswg-drafts/issues/8629
http://github.com/web-platform-tests/wpt/pull/39137/files
http://wpt.fyi/results/css/css-color/parsingColor parsing is a part of Interop 2023. Handling non-finite inputs
to color channels is a bit tricky. At parse timecalc(NaN)and
calc(infinity)(and their equivalents) are valid CSS numerical inputs,
and should get re-serialized as such so that they round-trip.Per-spec,
calc(NaN)should become 0 at computed value time.
calc(infinity)should remaincalc(infinity), except in cases where it represents a clamped color channel, such as lightness or chroma.
Unfortunately, blink had previously made no distinction between parsed
and computed colors, hence the creation of
blink::Color::ResolveNonFiniteValues (called from
TextLinkColors::ColorFromCSSValue) in this CL.Before CSS Color 4, color functions were less exposed to things like
calcfunctions, so this problem went unnoticed.Bug: 1428845
Change-Id: Id385405008a33759c67b8b9ffb62f100856f590dReviewed-on: https://chromium-review.googlesource.com/4575281
WPT-Export-Revision: ed38f1250390ba6f23e00db484d4340a38b7d185
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
| Assignee | ||
Comment 3•3 years ago
|
||
| Assignee | ||
Comment 5•3 years ago
|
||
Comment 6•3 years ago
|
||
| bugherder | ||
Description
•