Bug 27242

Summary: JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 27133    
Bug Blocks: 27088    
Attachments:
Description Flags
patch mitz: review+

Description Eric Seidel (no email) 2009-07-13 17:55:04 PDT
JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor

The time has come for this buggy custom binding to die! :)
Comment 1 Sam Weinig 2009-07-21 19:36:40 PDT
Created attachment 33235 [details]
patch
Comment 2 Sam Weinig 2009-07-21 21:27:57 PDT
Fixed in r46211.
Comment 3 Eric Seidel (no email) 2009-07-22 00:02:43 PDT
Comment on attachment 33235 [details]
patch

 646 RGBColor* CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const

and 

+RGBColor* SVGColor::rgbColor() const

Look like they're leaking, no?

They're returning raw pointers to RGBColor object which have a ref count of 1.
Comment 4 Eric Seidel (no email) 2009-07-22 00:03:25 PDT
It seems we eventually want RGBColor to be a wrapper around Color instead of unsigned.  That way the red/green/blue/alpha accessors are already written for us (instead of having to re-write the << code.
Comment 5 Eric Seidel (no email) 2009-07-22 00:04:00 PDT
I'm very glad you did this though.  I tried and ran into Obj-C issues which I didn't really want to deal with. ;)