Bug 204300

Summary: [Cocoa] Add WKUIDelegate SPI to inform clients when a _WKInspector attaches to a WKWebView
Product: WebKit Reporter: Blaze Burg <bburg>
Component: WebKit APIAssignee: Blaze Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bburg, hi, joepeck, thorton, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch hi: review+

Blaze Burg
Reported 2019-11-18 09:46:18 PST
,
Attachments
Patch (11.92 KB, patch)
2019-11-18 16:07 PST, Blaze Burg
hi: review+
Blaze Burg
Comment 1 2019-11-18 09:47:50 PST
Blaze Burg
Comment 2 2019-11-18 16:07:24 PST
Devin Rousso
Comment 3 2019-11-18 17:10:36 PST
Comment on attachment 383799 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383799&action=review r=me > Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:240 > +- (void)_webView:(WKWebView *)webView didAttachInspector:(_WKInspector *)inspector WK_API_AVAILABLE(macos(WK_MAC_TBA)); > +#endif // !TARGET_OS_IPHONE Wouldn't it be more accurate to have this be in its own `#if TARGET_OS_MAC`?
Joseph Pecoraro
Comment 4 2019-11-18 17:32:08 PST
(In reply to Devin Rousso from comment #3) > Comment on attachment 383799 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=383799&action=review > > r=me > > > Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:240 > > +- (void)_webView:(WKWebView *)webView didAttachInspector:(_WKInspector *)inspector WK_API_AVAILABLE(macos(WK_MAC_TBA)); > > +#endif // !TARGET_OS_IPHONE > > Wouldn't it be more accurate to have this be in its own `#if TARGET_OS_MAC`? • TARGET_OS_MAC is more like DARWIN, it includes "everything" macOS, iOS, tvOS, watchOS etc • TARGET_OS_IPHONE is more like IOS_FAMILY or EMBEDDED for us. It includes iOS, tvOS, watchOS, etc. TARGET_OS_OSX is the thing that only targets directly macOS, however we don't use that anywhere in WebKit yet (I assume for compatibility when building on older OSes). The norm in WebKit is to use !TARGET_OS_IPHONE right now.
Blaze Burg
Comment 5 2019-11-19 09:11:56 PST
Note You need to log in before you can comment on or make changes to this bug.