RESOLVED FIXED Bug 220480
[Cocoa] Web Inspector: move browser domain activation methods back to WKWebView and UIDelegate
https://bugs.webkit.org/show_bug.cgi?id=220480
Summary [Cocoa] Web Inspector: move browser domain activation methods back to WKWebVi...
Blaze Burg
Reported 2021-01-08 13:27:22 PST
After some recent cleanups in WKInspectorDelegate and related code, it's no longer necessary to keep these backend methods in an inspector-specific delegate.
Attachments
Patch v1.0 (30.50 KB, patch)
2021-01-08 13:56 PST, Blaze Burg
no flags
Patch v1.1 (30.61 KB, patch)
2021-01-08 15:05 PST, Blaze Burg
no flags
Patch v1.2 (30.54 KB, patch)
2021-01-12 10:47 PST, Blaze Burg
no flags
Blaze Burg
Comment 1 2021-01-08 13:55:13 PST
Blaze Burg
Comment 2 2021-01-08 13:56:52 PST
Created attachment 417301 [details] Patch v1.0
Blaze Burg
Comment 3 2021-01-08 15:05:06 PST
Created attachment 417306 [details] Patch v1.1
Devin Rousso
Comment 4 2021-01-08 16:05:48 PST
Comment on attachment 417306 [details] 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)
Blaze Burg
Comment 5 2021-01-12 10:47:07 PST
Created attachment 417470 [details] Patch v1.2
Blaze Burg
Comment 6 2021-01-12 15:17:56 PST
Comment on attachment 417470 [details] Patch v1.2 Needs to be landed manually with internal changes.
EWS
Comment 7 2021-01-12 16:19:42 PST
Committed r271424: <https://trac.webkit.org/changeset/271424> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417470 [details].
Note You need to log in before you can comment on or make changes to this bug.