Bug 27242 - JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor
Summary: JSC bindings should use an auto-bound RGBColor class instead of hand-rolled J...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 27133
Blocks: 27088
  Show dependency treegraph
 
Reported: 2009-07-13 17:55 PDT by Eric Seidel (no email)
Modified: 2009-07-22 00:04 PDT (History)
1 user (show)

See Also:


Attachments
patch (47.57 KB, patch)
2009-07-21 19:36 PDT, Sam Weinig
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ;)