Title: [239798] branches/safari-607-branch/Source/WebKit
Revision
239798
Author
alanc...@apple.com
Date
2019-01-09 17:38:02 -0800 (Wed, 09 Jan 2019)

Log Message

Cherry-pick r239691. rdar://problem/47158674

    [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 <pecor...@apple.com> 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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (239797 => 239798)


--- branches/safari-607-branch/Source/WebKit/ChangeLog	2019-01-10 01:37:59 UTC (rev 239797)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog	2019-01-10 01:38:02 UTC (rev 239798)
@@ -1,5 +1,38 @@
 2019-01-09  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r239691. rdar://problem/47158674
+
+    [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 <pecor...@apple.com> 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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-07  Joseph Pecoraro  <pecor...@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 Alex Christensen.
+
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (-[WKWebView _hasInspectorFrontend]):
+            * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+            * UIProcess/WebPageProxy.h:
+            (WebKit::WebPageProxy::hasInspectorFrontend const):
+
+2019-01-09  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r239686. rdar://problem/47158659
 
     Unwanted page navigation after showing & dismissing contextual menu with control-click

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (239797 => 239798)


--- branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-01-10 01:37:59 UTC (rev 239797)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-01-10 01:38:02 UTC (rev 239798)
@@ -6957,6 +6957,11 @@
     _resolutionForShareSheetImmediateCompletionForTesting = resolved;
 }
 
+- (BOOL)_hasInspectorFrontend
+{
+    return _page && _page->hasInspectorFrontend();
+}
+
 - (_WKInspector *)_inspector
 {
     if (auto* inspector = _page->inspector())

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (239797 => 239798)


--- branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2019-01-10 01:37:59 UTC (rev 239797)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2019-01-10 01:38:02 UTC (rev 239798)
@@ -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: branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.h (239797 => 239798)


--- branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.h	2019-01-10 01:37:59 UTC (rev 239797)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.h	2019-01-10 01:38:02 UTC (rev 239798)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to