Title: [87275] trunk/Source/WebKit2
Revision
87275
Author
timo...@apple.com
Date
2011-05-24 23:37:42 -0700 (Tue, 24 May 2011)

Log Message

Make the Web Inspector bring the right window to the front when docked.

rdar://problem/9464685
https://webkit.org/b/61420

Reviewed by Brian Weinstein.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformBringToFront): Order front the parent window of the Inspector's WKView.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformBringToFront): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (87274 => 87275)


--- trunk/Source/WebKit2/ChangeLog	2011-05-25 06:03:09 UTC (rev 87274)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-25 06:37:42 UTC (rev 87275)
@@ -1,3 +1,17 @@
+2011-05-24  Timothy Hatcher  <timo...@apple.com>
+
+        Make the Web Inspector bring the right window to the front when docked.
+
+        rdar://problem/9464685
+        https://webkit.org/b/61420
+
+        Reviewed by Brian Weinstein.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformBringToFront): Order front the parent window of the Inspector's WKView.
+        * UIProcess/win/WebInspectorProxyWin.cpp:
+        (WebKit::WebInspectorProxy::platformBringToFront): Ditto.
+
 2011-05-24  Keishi Hattori  <kei...@webkit.org>
 
         Reviewed by Kent Tamura.

Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (87274 => 87275)


--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2011-05-25 06:03:09 UTC (rev 87274)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2011-05-25 06:37:42 UTC (rev 87275)
@@ -154,9 +154,8 @@
 
 void WebInspectorProxy::platformBringToFront()
 {
-    // FIXME: support bring to front in docked mode here.
-
-    [m_inspectorWindow.get() makeKeyAndOrderFront:nil];
+    // FIXME: this will not bring a background tab in Safari to the front, only its window.
+    [m_inspectorView.get().window makeKeyAndOrderFront:nil];
 }
 
 void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)

Modified: trunk/Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp (87274 => 87275)


--- trunk/Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp	2011-05-25 06:03:09 UTC (rev 87274)
+++ trunk/Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp	2011-05-25 06:37:42 UTC (rev 87275)
@@ -227,13 +227,13 @@
 
 void WebInspectorProxy::platformBringToFront()
 {
-    // FIXME: support bring to front in docked mode here.
-
-    if (!m_inspectorWindow)
+    // FIXME: this will not bring a background tab in Safari to the front, only its window.
+    HWND parentWindow = m_isAttached ? ::GetAncestor(m_page->nativeWindow(), GA_ROOT) : m_inspectorWindow;
+    if (!parentWindow)
         return;
 
-    ASSERT(::IsWindow(m_inspectorWindow));
-    ::SetWindowPos(m_inspectorWindow, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
+    ASSERT(::IsWindow(parentWindow));
+    ::SetWindowPos(parentWindow, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
 }
 
 void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to