Bug 222344

Summary: [Cocoa] Web Inspector: expose the extension host that is used to load _WKInspectorExtension tabs
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1.0
none
Patch v2.0
none
Patch v2.1 none

Description BJ Burg 2021-02-23 21:51:54 PST
.
Comment 1 Radar WebKit Bug Importer 2021-02-23 21:52:08 PST
<rdar://problem/74678778>
Comment 2 BJ Burg 2021-02-23 22:02:19 PST
Created attachment 421384 [details]
Patch v1.0
Comment 3 BJ Burg 2021-02-23 23:20:45 PST
Comment on attachment 421384 [details]
Patch v1.0

Going a different route.
Comment 4 BJ Burg 2021-02-24 16:43:18 PST
Created attachment 421482 [details]
Patch v2.0
Comment 5 BJ Burg 2021-02-24 16:57:26 PST
Created attachment 421483 [details]
Patch v2.1
Comment 6 Devin Rousso 2021-02-24 17:50:19 PST
Comment on attachment 421483 [details]
Patch v2.1

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

r=me

> Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h:66
> +@property (nonatomic, readonly) WKWebView *extensionHostWebView;

NIT: It seems a bit redundant to have `extensionHost` in the name given that this protocol already has that in the name.  If this is ObjC convention tho feel free to ignore :)

Also, seeing as how this is the Web Inspector `WKWebView`, should we maybe just call it as such (e.g. `inspectorWebView`) rather than that being somewhat implicit or explained in the discussion?
Comment 7 BJ Burg 2021-02-24 20:01:05 PST
(In reply to Devin Rousso from comment #6)
> Comment on attachment 421483 [details]
> Patch v2.1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=421483&action=review
> 
> r=me
> 
> > Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h:66
> > +@property (nonatomic, readonly) WKWebView *extensionHostWebView;
> 
> NIT: It seems a bit redundant to have `extensionHost` in the name given that
> this protocol already has that in the name.  If this is ObjC convention tho
> feel free to ignore :)
> 
> Also, seeing as how this is the Web Inspector `WKWebView`, should we maybe
> just call it as such (e.g. `inspectorWebView`) rather than that being
> somewhat implicit or explained in the discussion?

Yes, it's redundant. This is on purpose, to deter folks from doing all kinds of bad things to Inspector's WKWebView subclass because it's easier than adding proper _WKInspectorConfiguartion options or other SPI.
Comment 8 EWS 2021-02-24 22:10:44 PST
Committed r273471: <https://commits.webkit.org/r273471>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 421483 [details].