Provide a way for clients to check if an NSWindow is a Web Inspector window Currently these are just NSWindows without any reliable way to identify that they are Web Inspector windows.
<rdar://problem/36332865>
Created attachment 330630 [details] [PATCH] Proposed Fix
Created attachment 330631 [details] [PATCH] Proposed Fix Sorted the Xcode project.
Comment on attachment 330631 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=330631&action=review > Source/WebKit/ChangeLog:15 > + (-[NSWindow _web_isWebInspectorWindow]): > + Method to determing if a window is being used for Web Inspector content. I used a category for its convenience, but there could be some arguments against this: - This doesn't take into account WebKitLegacy NSWindows. - This can just be a isWebInspectorWindow(NSWindow*) utility function exported somewhere instead of a category on NSWindow. Reviewers, let me know if you think another approach would be preferred.
<rdar://problem/36333041>
Comment on attachment 330631 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=330631&action=review > Source/WebKit/Shared/API/Cocoa/_WKNSWindowExtras.h:34 > +- (BOOL)_web_isWebInspectorWindow; "web" was our prefix in Legacy WebKit. For Modern WebKit, our prefix is "WK". So maybe this should be _WK_isWebInspectorWindow?
(In reply to Darin Adler from comment #6) > Comment on attachment 330631 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=330631&action=review > > > Source/WebKit/Shared/API/Cocoa/_WKNSWindowExtras.h:34 > > +- (BOOL)_web_isWebInspectorWindow; > > "web" was our prefix in Legacy WebKit. > > For Modern WebKit, our prefix is "WK". So maybe this should be > _WK_isWebInspectorWindow? We seem to continue to use the "_web_" prefix in the Modern WebKit API. For all NS* categories we use "_web_". While there are instances of "_wk_" they appear to only be on our own WK* classes. I closed matched these: Shared/Cocoa/WKNSURLExtras.h > @interface NSURL (WKExtras) > + (instancetype)_web_URLWithWTFString:(const String&)string; > + (instancetype)_web_URLWithWTFString:(const String&)string relativeToURL:(NSURL *)baseURL; > - (String)_web_originalDataAsWTFString; > @end Shared/API/Cocoa/_WKNSFileManagerExtras.h > @interface NSFileManager (WKExtras) > + (NSString *)_web_createTemporaryFileForQuickLook:(NSString *)fileName; > @end
Comment on attachment 330631 [details] [PATCH] Proposed Fix Clearing flags on attachment: 330631 Committed r226536: <https://trac.webkit.org/changeset/226536>
All reviewed patches have been landed. Closing bug.
Comment on attachment 330631 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=330631&action=review >>> Source/WebKit/Shared/API/Cocoa/_WKNSWindowExtras.h:34 >>> +- (BOOL)_web_isWebInspectorWindow; >> >> "web" was our prefix in Legacy WebKit. >> >> For Modern WebKit, our prefix is "WK". So maybe this should be _WK_isWebInspectorWindow? > > We seem to continue to use the "_web_" prefix in the Modern WebKit API. For all NS* categories we use "_web_". While there are instances of "_wk_" they appear to only be on our own WK* classes. > > I closed matched these: > > Shared/Cocoa/WKNSURLExtras.h This declaration is missing an availability annotation.