WebKit Bugzilla
Attachment 358392 Details for
Bug 193162
: [Cocoa] Add SPI to check if a WKWebView has an inspector frontend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
spi-1.patch (text/plain), 2.81 KB, created by
Joseph Pecoraro
on 2019-01-04 16:16:15 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-01-04 16:16:15 PST
Size:
2.81 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4e96899a46e..707b781a0b2 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-04 Joseph Pecoraro <pecoraro@apple.com> >+ >+ [Cocoa] Add SPI to check if a WKWebView has an inspector frontend >+ https://bugs.webkit.org/show_bug.cgi?id=193162 >+ <rdar://problem/24267143> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _hasInspectorFrontend]): >+ * UIProcess/API/Cocoa/WKWebViewPrivate.h: >+ * UIProcess/WebPageProxy.h: >+ (WebKit::WebPageProxy::hasInspectorFrontend const): >+ > 2019-01-04 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Use save sheet instead of dialog where possible >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 3c5bebf27b4..4fd059f0fef 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -6937,6 +6937,11 @@ - (void)_setShareSheetCompletesImmediatelyWithResolutionForTesting:(BOOL)resolve > _resolutionForShareSheetImmediateCompletionForTesting = resolved; > } > >+- (BOOL)_hasInspectorFrontend >+{ >+ return _page && _page->hasInspectorFrontend(); >+} >+ > - (_WKInspector *)_inspector > { > if (auto* inspector = _page->inspector()) >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >index e709409fb4a..00d67fd9f37 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >@@ -528,6 +528,7 @@ typedef NS_OPTIONS(NSUInteger, _WKRectEdge) { > > - (void)_setShareSheetCompletesImmediatelyWithResolutionForTesting:(BOOL)resolved WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > >+@property (nonatomic, readonly) BOOL _hasInspectorFrontend WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > @property (nonatomic, readonly) _WKInspector *_inspector WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > @property (nonatomic, readonly) _WKFrameHandle *_mainFrame WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 18bf8101a0e..2137e135d01 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -389,6 +389,7 @@ public: > > void didChangeInspectorFrontendCount(unsigned count) { m_inspectorFrontendCount = count; } > unsigned inspectorFrontendCount() const { return m_inspectorFrontendCount; } >+ bool hasInspectorFrontend() const { return m_inspectorFrontendCount > 0; } > > bool isControlledByAutomation() const { return m_controlledByAutomation; } > void setControlledByAutomation(bool);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193162
: 358392