Title: [181927] trunk/Source/WebKit2
Revision
181927
Author
[email protected]
Date
2015-03-24 19:37:00 -0700 (Tue, 24 Mar 2015)

Log Message

Inspector doesn't get focused when opened in dock mode
https://bugs.webkit.org/show_bug.cgi?id=143030

Reviewed by Anders Carlsson.

The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformAttach):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (181926 => 181927)


--- trunk/Source/WebKit2/ChangeLog	2015-03-25 02:18:10 UTC (rev 181926)
+++ trunk/Source/WebKit2/ChangeLog	2015-03-25 02:37:00 UTC (rev 181927)
@@ -1,3 +1,18 @@
+2015-03-24  Ryosuke Niwa  <[email protected]>
+
+        Inspector doesn't get focused when opened in dock mode
+        https://bugs.webkit.org/show_bug.cgi?id=143030
+
+        Reviewed by Anders Carlsson.
+
+        The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
+        which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
+        subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformBringToFront):
+        (WebKit::WebInspectorProxy::platformAttach):
+
 2015-03-24  Chris Dumez  <[email protected]>
 
         [WK2] Responses with 302 HTTP Status Code should not be cached

Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (181926 => 181927)


--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2015-03-25 02:18:10 UTC (rev 181926)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2015-03-25 02:37:00 UTC (rev 181927)
@@ -651,7 +651,7 @@
 
     // FIXME <rdar://problem/10937688>: this will not bring a background tab in Safari to the front, only its window.
     [m_inspectorView.get().window makeKeyAndOrderFront:nil];
-    [m_inspectorView.get().window makeFirstResponder:m_inspectorView.get()];
+    [m_inspectorView.get().window makeFirstResponder:m_inspectorView->_page->wkView()];
 }
 
 bool WebInspectorProxy::platformIsFront()
@@ -860,8 +860,7 @@
     inspectedViewFrameDidChange(currentDimension);
 
     [[inspectedView superview] addSubview:m_inspectorView.get() positioned:NSWindowBelow relativeTo:inspectedView];
-
-    [[inspectedView window] makeFirstResponder:m_inspectorView.get()];
+    [m_inspectorView.get().window makeFirstResponder:m_inspectorView->_page->wkView()];
 }
 
 void WebInspectorProxy::platformDetach()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to