Closed Bug 293219 Opened 19 years ago Closed 19 years ago

Canvas mixes up RGB order in fillStyle and strokeStyle properties

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: jens.b, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050506 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050506 Firefox/1.0+

In RGB(A) strings, the Red and Blue parts are reversed. This happens regardless
of the syntax used (#FF0000 or rgba(255,...)).

Reproducible: Always

Steps to Reproduce:
1. Load the attached testcase

Actual Results:  
Blue-green-red boxes and a long ice-blue box below it.

Expected Results:  
Red-green-blue boxes and a long orange box below it.
Attached file test case
Keywords: testcase
Just checked in a tiny patchlet for this; should be in tomorrow's build.  Can
you try with that tomorrow and verify?
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Verified using a Beast tinderbox build. Thanks for the quick fix!
Status: RESOLVED → VERIFIED
Could it be possible that this patch only works for opaque colors, and that a
similar patch is needed in the transparency code?
(In reply to comment #4)
> Could it be possible that this patch only works for opaque colors, and that a
> similar patch is needed in the transparency code?

That sounds like bug 293353.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: