[webkit-reviews] review granted: [Bug 178351] Add a _WKThumbnailView initializer with a WKWebView : [Attachment 323912] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 16 13:53:03 PDT 2017


Tim Horton <thorton at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 178351: Add a _WKThumbnailView initializer with a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=178351

Attachment 323912: Patch

https://bugs.webkit.org/attachment.cgi?id=323912&action=review




--- Comment #2 from Tim Horton <thorton at apple.com> ---
Comment on attachment 323912
  --> https://bugs.webkit.org/attachment.cgi?id=323912
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=323912&action=review

> Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm:86
> +- (instancetype)initWithFrame:(NSRect)frame fromWKWebView:(WKWebView
*)webView

I would also override initWithFrame, put the common things in there, and call
self instead of super in each of these, to reduce duplication.

> Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm:141
> +	   if (_wkView) {

This would all be muuuuuch neater with a WKThumbnailableView (or
WKThumbnailViewDelegate, or...) protocol.


More information about the webkit-reviews mailing list