[COLRv1] Gradient interpolation for extend mode pad when color stop range is 0
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: drott, Assigned: jfkthame)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Steps to reproduce:
(tested on latest nightly)
https://jfkthame.github.io/test/test-colr1.html
When COL1 set to 0.5, COL2 set to 0 and COL3 set to -0.5 the glyphs for extend mode demonstrating linear gradients are disappearing, even though for extend mode pad it is possible to have a rendering which divides the square into a green and a red part.
Compare this Skia change:
https://skia-review.googlesource.com/c/skia/+/572934 where I am fixing this after this issue was identified by fuzzing.
I think we need an enhancement to the spec to clarify this situation for radial and linear gradients. For sweep we already have "If the ColorLine's extend mode is reflect or repeat and start and end angle are equal, nothing is drawn."
Actual results:
Glyphs disappear.
Expected results:
Linear gradient extend mode tests with color stops in the exact same location should divide the filled area with a left and right colored part.
Assignee | ||
Comment 1•2 years ago
|
||
So for extend-mode:pad, we'd get the simple two-color result, but for repeat/reflect modes, the spec should explicitly say that we draw nothing -- right? That makes sense to me.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D155080
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D155465
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fc292ca682cf Handle a color stop range of zero in COLRv1 gradients. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/9c09be52726f Reftest for gradient when color stop range collapses to zero. r=gfx-reviewers,lsalzman
Comment 5•2 years ago
|
||
Backed out 4 changesets (bug 1786050, bug 1786796) for causing reftest failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/842fcf23f8d1d0f5ddd4788ebcd8a6fe3772040c
Assignee | ||
Comment 6•2 years ago
|
||
Test depends on a variation font, which isn't supported on Win7. Adding a skip-if annotation.
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c80a7f0aee8e Handle a color stop range of zero in COLRv1 gradients. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/97fc4d3e5911 Reftest for gradient when color stop range collapses to zero. r=gfx-reviewers,lsalzman
Comment 8•2 years ago
|
||
Backed out for causing reftest failure at font-error-404-2.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/1f82228e7cc6f7d6a179d3afaf01d947c28fe740
Failure log: https://treeherder.mozilla.org/logviewer?job_id=388486741&repo=autoland&lineNumber=18256
Assignee | ||
Comment 9•2 years ago
•
|
||
Backed out for causing reftest failure at font-error-404-2.html.
And also layout/reftests/font-face/reflow-sanity-1.html.
Sigh. This is a spurious Win7 failure due to the general flakiness of the DirectWrite backend there. The patches in this push would have had no effect whatever on that test, but the addition of a couple of reftests -- even though they're skipped on Win7 -- has changed the chunking, such that these tests that used to be in R2 have moved to R1, and there, they fail. Probably because they're running later in the browser session, and DWrite resources are running out.
I'm going to just annotate them as random on Win7.... this isn't an actual bug, and attempting to work around it in the past has been a never-ending rabbit-hole.
Comment 10•2 years ago
|
||
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/706242b846a9 Handle a color stop range of zero in COLRv1 gradients. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/e70cfab1ee66 Reftest for gradient when color stop range collapses to zero. r=gfx-reviewers,lsalzman
Comment 11•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/706242b846a9
https://hg.mozilla.org/mozilla-central/rev/e70cfab1ee66
Description
•