Closed Bug 1040273 Opened 10 years ago Closed 9 years ago

Repeated 0 and 1 radial gradient stops don't behave to spec on OS X

Categories

(Core :: Graphics: Canvas2D, defect)

26 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: milan, Assigned: milan)

References

Details

Attachments

(3 files, 1 obsolete file)

This came up during the investigation of bug 1038277, but better to keep it separate.  Based on the spec: http://www.w3.org/TR/2dcontext/#dom-canvasgradient-addcolorstop, these two radial gradients should be "almost the same":
g1.addColorStop(0, '#0f0');
g1.addColorStop(0.01, '#f00');
g1.addColorStop(0.5, '#00f');
g1.addColorStop(0.99, '#ff0');
g1.addColorStop(1, '#0f0');

and

g2.addColorStop(0, '#0f0');
g2.addColorStop(0, '#f00');
g2.addColorStop(0.5, '#00f');
g2.addColorStop(1, '#ff0');
g2.addColorStop(1, '#0f0');

They are not.
Just to clarify - "the same" really means inside of the inner circle, and outside of the outer circle.  As long as those are green, we're OK.  We're really bad on OS X with CoreGraphics, better on Windows, good on Linux:

(good) Linux = the inside is green (good), the outside is green (good)
(bad) OS X + CoreGraphics = the inside is *missing* (really bad), the outside is yellow (bad)
(bad) OS X + Skia = the inside is red (bad), the outside is yellow (bad)
(bad) Windows 7 = the inside is green (good), the outside is yellow (bad)

Other browsers:

(bad) Chrome & Safari = the inside is red (bad), the outside is yellow (bad)
(good) Windows 7 IE = the inside is green (good), the outside is green (good)
Is it worth it, or should we just live with this CG bug? It only came up because we're kludging a canvas test content/canvas/test/test_2d.gradient.radial.outside3.html to not repeat the zero radial gradient stop.

But this hack is just working around that, so that we can say we follow the standard, creates extra radial gradients, etc.
Attachment #8460509 - Flags: feedback?(jmuizelaar)
Assignee: nobody → milan
Blocks: 1038277
Summary: Repeated 0 and 1 radial gradient stops don't behave to spec → Repeated 0 and 1 radial gradient stops don't behave to spec on OS X
Is complicating this code in order to hit the standard worth the effort?
Flags: needinfo?(jmuizelaar)
(In reply to Milan Sreckovic [:milan] from comment #5)
> Is complicating this code in order to hit the standard worth the effort?

Nope.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jmuizelaar)
Resolution: --- → WONTFIX
Attachment #8470314 - Flags: review?(jmuizelaar)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: