[webkit-reviews] review granted: [Bug 220480] [Cocoa] Web Inspector: move browser domain activation methods back to WKWebView and UIDelegate : [Attachment 417306] Patch v1.1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 8 16:05:48 PST 2021
Devin Rousso <drousso at apple.com> has granted BJ Burg <bburg at apple.com>'s
request for review:
Bug 220480: [Cocoa] Web Inspector: move browser domain activation methods back
to WKWebView and UIDelegate
https://bugs.webkit.org/show_bug.cgi?id=220480
Attachment 417306: Patch v1.1
https://bugs.webkit.org/attachment.cgi?id=417306&action=review
--- Comment #4 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 417306
--> https://bugs.webkit.org/attachment.cgi?id=417306
Patch v1.1
View in context: https://bugs.webkit.org/attachment.cgi?id=417306&action=review
r=me
> Source/WebKit/ChangeLog:70
> + Drive-by: rename m_page to m_inspectedPage to emphasize that this
> + class exists as part of Web Inspector's backend, not its frontend.
+1 nice!
> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1660
> +
Style: I'd remove this newline
> Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:1568
> + [(id <WKUIDelegatePrivate>)delegate
_webViewDidEnableInspectorBrowserDomain:m_uiDelegate->m_webView.get().get()];
NIT: I'd do the cast on :1564 so that if `delegate` is needed for other things
it doesn't have to be casted multiple times
> Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:1583
> + [(id <WKUIDelegatePrivate>)delegate
_webViewDidDisableInspectorBrowserDomain:m_uiDelegate->m_webView.get().get()];
ditto (:1568)
> Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp:252
> + if (agent)
NIT: I prefer to use `m_enabledBrowserAgent` for stuff like this in case
there's some funky logic inside `operator=` that prevents the
`m_enabledBrowserAgent` from actually changing
> Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp:260
> + if (auto* browserAgent = enabledBrowserAgent())
NIT: you could just use `m_enabledBrowserAgent`
> Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp:266
> + if (auto* browserAgent = enabledBrowserAgent())
ditto (:260)
More information about the webkit-reviews
mailing list