Closed Bug 1890488 Opened 1 year ago Closed 10 months ago

[css-color] Servo_InterpolateColor produces colors in reverse

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1934203

People

(Reporter: tlouw, Assigned: tlouw)

References

Details

Attachments

(1 obsolete file)

https://searchfox.org/mozilla-central/rev/c09764753ea40725eb50decad2c51edecbd33308/servo/ports/geckolib/glue.rs#8814

This function should reverse the progress as the interpolation is weight based, which is the reverse of a lerp:

       hue      left        hue     right
       0.0       0.0,     180.0       1.0 ==     180.0
       0.0       0.1,     180.0       0.9 ==     162.0
       0.0       0.2,     180.0       0.8 ==     144.0
       0.0       0.3,     180.0       0.7 ==     126.0
       0.0       0.4,     180.0       0.6 ==     108.0
       0.0       0.5,     180.0       0.5 ==      90.0
       0.0       0.6,     180.0       0.4 ==      72.0
       0.0       0.7,     180.0       0.3 ==      54.0
       0.0       0.8,     180.0       0.2 ==      36.0
       0.0       0.9,     180.0       0.1 ==      18.0

The parameter is called progress, which suggests progress from left to
right, because the internal interpolations functions uses weights, the
"progress" is in reverse.

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:tlouw, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(tlouw)
Flags: needinfo?(ahale)
Attachment #9395715 - Attachment is obsolete: true
Flags: needinfo?(ahale)

This was addressed by jkew while making changes to gradient calculations in Bug 1934203.

Status: NEW → RESOLVED
Closed: 10 months ago
Duplicate of bug: 1934203
Flags: needinfo?(tlouw)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: