Open Bug 1509396 Opened 6 years ago Updated 2 years ago

Transparent gradient stop does not honor color with HWA enabled

Categories

(Core :: Graphics, defect, P2)

61 Branch
x86_64
Windows 10
defect

Tracking

()

Tracking Status
firefox-esr60 --- unaffected
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fix-optional

People

(Reporter: ccprog, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

This came up in https://stackoverflow.com/questions/53431154 The expected behavior of a gradient <radialGradient id="grad1" cx="50%" cy="50%" r="50%"> <stop offset="0%" style="stop-color:rgb(255,0,0);stop-opacity:1" /> <stop offset="100%" style="stop-color:rgb(0,255,0);stop-opacity:0" /> </radialGradient> would be to interpolate linearily from rgba(255,0,0,1) to rgba(0,255,0,0), treating each channel (including opacity) independently. Firefox/Linux and Firefox/OSX behave accordingly. Firefox/Windows seems to interpolate from rgba(255,0,0,1) to rgba(255,0,0,0) (see screenshot in the stackoverflow post, which seems to be what the original poster has also seen on his system.) First, correct screenshot was taken on Pentium Dual Core E 5300, LMDE 3 Cindy, Linux 4.9.0-8-amd64, 60.2.2esr (64-Bit). Second, faulty screenshot was taken on Core i3-3217U, Windows 10 Home 1803, build 17134.407, 63.03 (64 Bit).
I was just able to test on a Windows 10 32-bit system, and the error does not appear with 63.0.3 (32-bit).
Fine on a Mac too. What happens if you turn hardware acceleration off? https://support.mozilla.org/en-US/kb/performance-settings?as=u&utm_source=inproduct Is this a regression? I.e. Does it work on older Firefox versions. If so https://mozilla.github.io/mozregression/ can track down when it broke. If it is a regression and you can find a regression range that's often very helpful.
Keywords: regression
Summary: Transparent gradient stop does not honor color → Transparent gradient stop does not honor color with HWA enabled
Version: 63 Branch → 61 Branch
Attached file standalone html
Attachment #9027106 - Attachment filename: file_1509396.txt → file_1509396.html
Attachment #9027106 - Attachment mime type: text/plain → text/html
Regression window: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=d9515d63a7cf34382ef0f3670084e7b77fa218c0&tochange=f212d89048ecdd6f15006f368322a2d2e156432b Regressed by: f212d89048ec Bas Schouten — Bug 1427063: Have D2D interpret colors in premultiplied space. As it says is its default. r=rhunt @:bas, Can you please look into this?
Blocks: 1427063
Status: UNCONFIRMED → NEW
Component: SVG → Graphics
Ever confirmed: true
Flags: needinfo?(bas)
FWIW, It works as expected on Nightly65.0a1 Windows10 if forcibly WebRender enabled.
Priority: -- → P2
(In reply to Alice0775 White from comment #4) > Regression window: > https://hg.mozilla.org/integration/mozilla-inbound/ > pushloghtml?fromchange=d9515d63a7cf34382ef0f3670084e7b77fa218c0&tochange=f212 > d89048ecdd6f15006f368322a2d2e156432b > > Regressed by: f212d89048ec Bas Schouten — Bug 1427063: Have D2D interpret > colors in premultiplied space. As it says is its default. r=rhunt > > @:bas, > Can you please look into this? This is a known issue. This is a dupe of some existing bug, although I can't find it.
Flags: needinfo?(bas)
Perhaps whether or not we want this should be passed from nsCSSRenderingGradients.cpp as some kind of flag similar to aExtendMode. With SVG it should be controlled by the CSS colorInterpolation property (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/color-interpolation). We currently only support different color-interpolation values for SVG mask elements I believe.
Happy to take a patch in nightly; if it seems low risk enough please feel free to request uplift to 65 beta.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: