[webkit-reviews] review denied: [Bug 99251] Make subclassing of WKView safer by namespacing methods and eliminating its use as an observer and delegate : [Attachment 168730] Patch, revised based on feedback from Anders and Maciej

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 15 16:06:14 PDT 2012


Darin Adler <darin at apple.com> has denied Darin Adler <darin at apple.com>'s
request for review:
Bug 99251: Make subclassing of WKView safer by namespacing methods and
eliminating its use as an observer and delegate
https://bugs.webkit.org/show_bug.cgi?id=99251

Attachment 168730: Patch, revised based on feedback from Anders and Maciej
https://bugs.webkit.org/attachment.cgi?id=168730&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=168730&action=review


> Source/WebKit2/UIProcess/API/mac/WKView.mm:1889
> +    #define ADD_OBSERVER(selectorName, notificationName, notificationObject)
\
> +	   [[NSNotificationCenter defaultCenter] addObserver:_data
selector:@selector(selectorName:) \
> +	       name:notificationName object:notificationObject]

Anders asked me to not use the WKViewData as the observer, because he plans to
eliminate that object entirely in the future, once we can take advantage of the
more modern Objective-C feature where we can add data without touching the
header file. So I’ll use the block form of observer instead.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2538
> +	   _data->_lastToolTipTag = [self addToolTipRect:wideOpenRect
owner:_data userData:NULL];

Similarly, Anders asked me not to use the WKViewData as the owner of the
tooltip, so I’ll create a separate object just for that.


More information about the webkit-reviews mailing list