Closed
Bug 337319
Opened 19 years ago
Closed 19 years ago
Canvas drawing context's strokeStyle attribute contains illegal value
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 333613
People
(Reporter: cputney, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
If the strokeStyle attribute of a canvas drawing context is set to a color that includes an alpha channel, it contains an illegal value when read back. For example, setting the strokeStyle to 'rgba(0, 0, 255, 0.5)' will cause it to be read back as 'rgb(0, 0, 255, 0.50)'. If the strokeStyle is set to this illegal value, it results in a Javascript exception.
Reproducible: Always
Steps to Reproduce:
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.strokeStyle = 'rgba(0, 0, 255, 0.5)';
ctx.strokeStyle = ctx.strokeStyle;
Actual Results:
Recieved the following Javascript exception (using Firebug):
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMCanvasRenderingContext2D.strokeStyle]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: file:///Users/colin/Desktop/canvasbug.html :: <TOP_LEVEL> :: line 16" data: no]
Expected Results:
The strokeStyle should have been read back as the same value that had been set earlier.
Reporter | ||
Comment 1•19 years ago
|
||
This produces the Javascript exception mentioned above.
Comment 2•19 years ago
|
||
WFM in current trunk and 1.8 branch.
Component: Tabbed Browser → Layout: Canvas
Product: Firefox → Core
QA Contact: tabbed.browser → layout.canvas
Version: unspecified → 1.8 Branch
Comment 3•19 years ago
|
||
Vlad fixed this in the patch for bug 333613.
*** This bug has been marked as a duplicate of 333613 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•