Bug 50797

Summary: canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-6.html fails
Product: WebKit Reporter: Mihai Parparita <mihaip>
Component: CSSAssignee: Sudarsana Nagineni (babu) <naginenis>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cmarcelo, gyuyoung.kim, kling, koivisto, macpherson, mdelaney7, menard, naginenis, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Mihai Parparita 2010-12-09 18:40:22 PST
This tests checks that we don't allow the invalid color value "rgba(255, 0, 0, 1.)" to be used as fillStyle. We actually allow this, even though 1. is not a valid CSS <alphavalue> (which is a <number>, which is defined as "A <number> can either be an <integer>, or it can be zero or more digits followed by a dot (.) followed by one or more digits." at http://www.w3.org/TR/css3-values/#numbers).

Since this would involve making our CSS color parser stricter, I'm not sure that this is worth fixing.
Comment 1 Sudarsana Nagineni (babu) 2012-08-09 08:56:00 PDT
*** Bug 93493 has been marked as a duplicate of this bug. ***
Comment 2 Sudarsana Nagineni (babu) 2012-08-09 09:00:29 PDT
Created attachment 157462 [details]
Patch
Comment 3 Andreas Kling 2012-08-14 07:02:54 PDT
(In reply to comment #0)
> Since this would involve making our CSS color parser stricter, I'm not sure that this is worth fixing.

Indeed, I wonder the same thing. What are other browsers doing?
Comment 4 Sudarsana Nagineni (babu) 2012-08-14 09:11:05 PDT
(In reply to comment #3)
> Indeed, I wonder the same thing. What are other browsers doing?

Looks like other browsers (FireFox and Opera) are treating 1. is an invalid CSS alpha value, so the test is passing. Full parser doing the same in our case also. The issue is only with the fast-path color parser.
Comment 5 Sudarsana Nagineni (babu) 2012-08-21 04:02:13 PDT
Kling, could you please have a look at this bug again?
Comment 6 Andreas Kling 2012-08-21 08:32:58 PDT
Comment on attachment 157462 [details]
Patch

Okay.
Comment 7 WebKit Review Bot 2012-08-21 15:01:49 PDT
Comment on attachment 157462 [details]
Patch

Clearing flags on attachment: 157462

Committed r126192: <http://trac.webkit.org/changeset/126192>
Comment 8 WebKit Review Bot 2012-08-21 15:01:56 PDT
All reviewed patches have been landed.  Closing bug.