Title: [239691] trunk/Source/WebKit
- Revision
- 239691
- Author
- [email protected]
- Date
- 2019-01-07 12:20:42 -0800 (Mon, 07 Jan 2019)
Log Message
[Cocoa] Add SPI to check if a WKWebView has an inspector frontend
https://bugs.webkit.org/show_bug.cgi?id=193162
<rdar://problem/24267143>
Patch by Joseph Pecoraro <[email protected]> on 2019-01-07
Reviewed by Alex Christensen.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hasInspectorFrontend]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::hasInspectorFrontend const):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (239690 => 239691)
--- trunk/Source/WebKit/ChangeLog 2019-01-07 20:20:17 UTC (rev 239690)
+++ trunk/Source/WebKit/ChangeLog 2019-01-07 20:20:42 UTC (rev 239691)
@@ -1,3 +1,17 @@
+2019-01-07 Joseph Pecoraro <[email protected]>
+
+ [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 Alex Christensen.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _hasInspectorFrontend]):
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::hasInspectorFrontend const):
+
2019-01-07 Antti Koivisto <[email protected]>
UI process side scrollbars for UI side compositing on Mac
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (239690 => 239691)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-01-07 20:20:17 UTC (rev 239690)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-01-07 20:20:42 UTC (rev 239691)
@@ -6957,6 +6957,11 @@
_resolutionForShareSheetImmediateCompletionForTesting = resolved;
}
+- (BOOL)_hasInspectorFrontend
+{
+ return _page && _page->hasInspectorFrontend();
+}
+
- (_WKInspector *)_inspector
{
if (auto* inspector = _page->inspector())
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (239690 => 239691)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2019-01-07 20:20:17 UTC (rev 239690)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2019-01-07 20:20:42 UTC (rev 239691)
@@ -532,6 +532,7 @@
- (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));
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (239690 => 239691)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2019-01-07 20:20:17 UTC (rev 239690)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2019-01-07 20:20:42 UTC (rev 239691)
@@ -389,6 +389,7 @@
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);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes