Closed Bug 1921766 Opened 5 months ago Closed 2 months ago

[css-color] When resolving relative colors there should be no gamut mapping/clipping.

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: tlouw, Assigned: tlouw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When converting from an out of gamut origin color, there should be no clipping or mapping. Example:

color(from color(display-p3 1 0 0) srgb r g b) should not resolve to color(srgb 1 0 0), which is clipped. The result should be color(srgb 1.09 -0.22 -0.15).

This should also solve issues will converting to origins and back, e.g. color(from rgb(from color(xyz-d50 0.99 0.88 0.77) r g b) xyz-d50 x y z).

No longer blocks: 1917714
No longer blocks: 1893966

When the result of a resolved relative color is in the color(srgb ..)
syntax, make sure not to clamp the components during the calculations.

Assignee: nobody → tlouw
Attachment #9444047 - Attachment description: WIP: Bug 1921766 - Keep colors in non-legacy style before using it as an origin color. r=#layout → Bug 1921766 - Keep colors in non-legacy style before using it as an origin color. r=#layout
Status: NEW → ASSIGNED
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06c31a8cdcd0 Keep colors in non-legacy style before using it as an origin color. r=layout-reviewers,dshin,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Blocks: 1938119
Blocks: 1895330
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: