[webkit-reviews] review granted: [Bug 4309] CSSStyleSheet objects don't get Obj-C DOMCSSStyleSheet wrappers : [Attachment 3246] patch to fix the problem

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sat Sep 17 14:54:55 PDT 2005


Eric Seidel <macdome at opendarwin.org> has granted Darin Adler
<darin at apple.com>'s request for review:
Bug 4309: CSSStyleSheet objects don't get Obj-C DOMCSSStyleSheet wrappers
http://bugzilla.opendarwin.org/show_bug.cgi?id=4309

Attachment 3246: patch to fix the problem
http://bugzilla.opendarwin.org/attachment.cgi?id=3246&action=edit

------- Additional Comments from Eric Seidel <macdome at opendarwin.org>
Looks fine.  I think this is a good change (simplifies code).

I will note however, your current solution may have some rather odd failure
symantics when passed the wrong pointer type to the wrong class.

If you call _CSSStyleSheetWithImpl and pass a DOMStyleSheetImpl, you'll get
back a valid pointer to an Obj-C object, but it will be a DOMStyleSheet *. 
Likewise if you call _DOMStyleSheetWithImpl and pass a DOMCSSStyleSheetImpl *,
you'll get back a DOMCSSStyleSheet * instead of the expected DOMStyleSheet * 
In an ideal world, at least the first case (passing a DOMStyleSheetImpl * to
the DOMCSSStyleSheet creation method) should return nil instead of a
DOMStyleSheet *.  But hopefully all this code will be going away in the next 6
months anyway (to be replaced by autogeneration).

r=me.



More information about the webkit-reviews mailing list