repeating-linear-gradient doesn't repeat when it contains OKLCH colors
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox125 | --- | unaffected |
firefox126 | + | fixed |
firefox127 | + | fixed |
People
(Reporter: mail, Assigned: ahale)
References
(Regression)
Details
(Keywords: regression)
Attachments
(6 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Steps to reproduce:
Visit the attached HTML page with a CSS repeating-linear-gradient using OKLCH colors
Actual results:
In Firefox 126 and 127, the repeating-linear-gradient doesn't repeat when it contains OKLCH, OKLAB, LCH, or LAB colors
Named colors, HSL, and hex colors all seem to work fine
Expected results:
The repeating gradient should repeat
Reporter | ||
Comment 1•1 month ago
|
||
Reporter | ||
Comment 2•1 month ago
|
||
I noticed that the built-in screenshot tool in Firefox (Ctrl-Shift-S) actually doesn't reproduce the bug with the gradient... I have to use Windows 11 built-in screenshot tool (Win-Shift-S) in order to capture it correctly.
Maybe that would be useful for helping to figure out where the gradient render is failing.
Comment 3•1 month ago
|
||
I can reproduce the issue on Nightly127.0a1 Windows11.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c4be4674be1b97309e8fd79c9787dbaeebf4cb56&tochange=a65ef2dc959b5fe431d3fcaa757b423aeec2677b
Updated•1 month ago
|
Comment 4•1 month ago
|
||
:ahale, since you are the author of the regressor, bug 1885716, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 5•1 month ago
|
||
:gw pinging as triage owner, could this be triaged for severity?
Next week is the final week of beta for Fx126 so we don't have long left for fixes.
Assignee | ||
Comment 6•1 month ago
•
|
||
I'll look into this tomorrow, I am not sure how repeating gradients interact with the hue longer fix I made in bug 1885716, so I'll need to try out these test cases - speaking of which, we don't appear to have test coverage for this case, so I'll make a WPT test as part of fixing this (like how I made a WPT test for hue longer).
Comment 7•1 month ago
|
||
Tracking since this is was triaged as an S2
Assignee | ||
Comment 8•1 month ago
|
||
I wasn't able to make much progress on this today but I will get a fix ready over the weekend.
Assignee | ||
Comment 9•1 month ago
|
||
Assignee | ||
Comment 10•1 month ago
|
||
Adding a WPT test first before I fix the code.
Assignee | ||
Comment 11•1 month ago
|
||
Assignee | ||
Comment 12•1 month ago
|
||
In terms of minimally invasive fixes, this should address the problem, however it would be good to check if it is a non-repeating gradient as well, because this logic could still misbehave on a repeating gradient with longer hue interpolation, I expect that to be a far more obscure issue in terms of user impact.
Assignee | ||
Comment 13•1 month ago
|
||
Assignee | ||
Comment 14•1 month ago
|
||
Third patch fixes the one remaining corner case (CSS repeating gradient with longer hue), which is probably rare, but now the logic always does what it is meant to do.
Updated•1 month ago
|
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Updated•1 month ago
|
Comment 15•1 month ago
|
||
Pushed by ahale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e212a42ac4d Fix repeating oklch gradients r=gfx-reviewers,lsalzman
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45975 for changes under testing/web-platform/tests
Comment 17•1 month ago
|
||
bugherder |
Comment 18•1 month ago
|
||
The patch landed in nightly and beta is affected.
:ahale, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox126
towontfix
.
For more information, please visit BugBot documentation.
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot
Assignee | ||
Comment 21•1 month ago
|
||
Looks like the fix has landed in nightly. Will request uplift on it.
Assignee | ||
Comment 22•1 month ago
|
||
Comment on attachment 9399274 [details]
Bug 1892653 - Fix repeating oklch gradients r?#gfx-reviewers
Beta/Release Uplift Approval Request
- User impact if declined: CSS gradients that are repeating type do not work in non-sRGB colorspaces, such as HSL and OKLCH. Non-repeating ones look fine. Repeating gradients are mostly used to make stripe patterns on web pages, sometimes as a background fill, though it is not clear how often they are in non-sRGB colorspaces.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce: View first attachment https://bugzilla.mozilla.org/attachment.cgi?id=9397785 , before the fix there is only a single stripe at the top of each example, after the fix it correctly looks like a stripe pattern with alternating color stripes on each of the two examples.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Simplified logic that should be more robust, only a single very specific case that will use the gradient extending logic (the one case it was meant to fix - longer hue on a non-repeating gradient such as OKLCH space).
- String changes made/needed:
- Is Android affected?: Yes
Comment 23•1 month ago
|
||
Comment on attachment 9399274 [details]
Bug 1892653 - Fix repeating oklch gradients r?#gfx-reviewers
Approved for 126.0b9
Comment 24•1 month ago
|
||
uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/c64dbda3f942
Updated•1 month ago
|
Updated•17 days ago
|
Description
•