Web Inspector: Dock controls are not available in toolbar if Web Inspector window...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Apr 2016 22:48:43 +0000 (22:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Apr 2016 22:48:43 +0000 (22:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=156520
<rdar://problem/22101106>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-12
Reviewed by Timothy Hatcher.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
Be more explicit about the attachment view check. Its intent
was to prevent allowing a 2nd level inspector from attaching
to a 1st level inspector. We can use a stronger check. Also,
remove deprecated pragmas by switching to new value.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

index 62b5066..a07a663 100644 (file)
@@ -1,5 +1,20 @@
 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: Dock controls are not available in toolbar if Web Inspector window leaves fullscreen
+        https://bugs.webkit.org/show_bug.cgi?id=156520
+        <rdar://problem/22101106>
+
+        Reviewed by Timothy Hatcher.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformCanAttach):
+        Be more explicit about the attachment view check. Its intent
+        was to prevent allowing a 2nd level inspector from attaching
+        to a 1st level inspector. We can use a stronger check. Also,
+        remove deprecated pragmas by switching to new value.
+
+2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: Keyboard shortcut for "Inspect Element" only works when Web Inspector is open.
         https://bugs.webkit.org/show_bug.cgi?id=111193
         <rdar://problem/13325889>
index 4812e6f..7f43f03 100644 (file)
@@ -454,14 +454,11 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
 
 bool WebInspectorProxy::platformCanAttach(bool webProcessCanAttach)
 {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    if ([m_inspectorWindow styleMask] & NSFullScreenWindowMask)
+    if ([m_inspectorWindow styleMask] & NSWindowStyleMaskFullScreen)
         return false;
-#pragma clang diagnostic pop
 
     NSView *inspectedView = inspectedPage()->inspectorAttachmentView();
-    if ([inspectedView isKindOfClass:[WKView class]] || [inspectedView isKindOfClass:[WKWebView class]])
+    if ([inspectedView isKindOfClass:[WKWebInspectorWKWebView class]])
         return webProcessCanAttach;
 
     static const float minimumAttachedHeight = 250;