Closed Bug 1794096 Opened 2 years ago Closed 2 years ago

[COLRv1] Incorrect linear gradient interpolation for pad and color stop range 0

Categories

(Core :: Graphics: Text, defect)

defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: drott, Assigned: jfkthame)

References

Details

Attachments

(3 files)

Attached image offset_50.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Steps to reproduce:

Visit:
https://roettsch.es/var_colrv1.html?filter=extend_mode for

And paste:
offset=51; COL3.value=50+offset; COL2.value=100+offset;COL1.value=150+offset; updateAll();

Then paste:
offset=50; COL3.value=50+offset; COL2.value=100+offset;COL1.value=150+offset; updateAll();

and compare results.

Actual results:

For offset=50, the red green divide in the first linear gradient glyph jumps back left, even though it should almost be the same as 51.

Expected results:

Red green divide should stay in almost the same spot.

I suspect the projection is skipped due to the color line range becoming 0.

Attached image offset_51.png
Assignee: nobody → jfkthame
Blocks: 1740525
Severity: -- → S3
Status: UNCONFIRMED → NEW
Component: Untriaged → Graphics: Text
Ever confirmed: true
Product: Firefox → Core

This is the linear-gradient version of bug 1793611 for radial gradients, and is fixed similarly.
Includes reftest.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ad2fbcab86cb
Fix the rendering of padded linear gradient when the color line is zero-length. r=lsalzman
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: