[webkit-reviews] review denied: [Bug 113588] Web Inspector: find dialog does not populate search string from system find pasteboard : [Attachment 397432] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 24 08:56:36 PDT 2020


Brian Burg <bburg at apple.com> has denied Devin Rousso <drousso at apple.com>'s
request for review:
Bug 113588: Web Inspector: find dialog does not populate search string from
system find pasteboard
https://bugs.webkit.org/show_bug.cgi?id=113588

Attachment 397432: Patch

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




--- Comment #4 from Brian Burg <bburg at apple.com> ---
Comment on attachment 397432
  --> https://bugs.webkit.org/attachment.cgi?id=397432
Patch

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

There are some lifetime issues to address in the ObjC parts, but other than
that this patch looks god and is a welcome improvement!

> Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm:240
> +    if (!!_delegate && [_delegate
respondsToSelector:@selector(inspectorViewControllerDidBecomeActive:)])

Nit: respondsToSelector check will return NO if _delegate is nil, so the null
check is not necessary.

> Source/WebKit/UIProcess/Inspector/mac/WKInspectorWKWebView.mm:62
> +	   [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_handleWindowDidBecomeKey:)
name:NSWindowDidBecomeKeyNotification object:nil];

This needs to be unregistered at some point or `self` will be retained forever
by NSNotificationCenter.

> Source/WebKit/UIProcess/Inspector/mac/WKInspectorWKWebView.mm:88
> +- (BOOL)becomeFirstResponder

Does this correctly handle the case when Inspector is attached?

> Source/WebKit/UIProcess/Inspector/mac/WKInspectorWKWebView.mm:95
> +- (void)_handleWindowDidBecomeKey:(NSNotification *)notification

You don't check which window is key, so this would probably fire if Web
Inspector window is not key.


More information about the webkit-reviews mailing list