Bug 39031

Summary: CSSParser::parseColor() shouldn't alter 'color' unless passed a valid color string.
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: CLOSED FIXED    
Severity: Normal CC: benjamin, commit-queue, darin, hausmann, laszlo.gombos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 35784    
Attachments:
Description Flags
Proposed patch
none
Proposed patch v2 none

Description Andreas Kling 2010-05-12 15:54:14 PDT
So says the comment above the function:

// color will only be changed when string contains a valid css color, making it
// possible to set up a default color.
Comment 1 Andreas Kling 2010-05-12 16:03:22 PDT
Created attachment 55910 [details]
Proposed patch
Comment 2 Andreas Kling 2010-05-12 16:26:16 PDT
I can't think of a good way to LayoutTest this, but it doesn't break any existing tests and is obviously correct (famous last words..)
Comment 3 Darin Adler 2010-05-12 18:21:59 PDT
Comment on attachment 55910 [details]
Proposed patch

How did you check all the call sites to make sure that none were depending on the old behavior?
Comment 4 Andreas Kling 2010-05-12 18:45:37 PDT
Created attachment 55927 [details]
Proposed patch v2

By insufficient grepping, apparently. :(
Updated patch to remove dependency on old behavior.
Comment 5 Darin Adler 2010-05-12 22:33:14 PDT
Comment on attachment 55927 [details]
Proposed patch v2

Looks OK. r=me
Comment 6 WebKit Commit Bot 2010-05-14 07:47:22 PDT
Comment on attachment 55927 [details]
Proposed patch v2

Clearing flags on attachment: 55927

Committed r59473: <http://trac.webkit.org/changeset/59473>
Comment 7 WebKit Commit Bot 2010-05-14 07:47:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Simon Hausmann 2010-05-14 08:40:04 PDT
Revision r59473 cherry-picked into qtwebkit-2.0 with commit 2b20c8dabe7670fe4c99b83156cdd5f4544c8c30