Title: [224575] trunk/Source/WebKit
Revision
224575
Author
[email protected]
Date
2017-11-08 04:55:22 -0800 (Wed, 08 Nov 2017)

Log Message

REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right after open-window
https://bugs.webkit.org/show_bug.cgi?id=179365

Reviewed by Michael Catanzaro.

In the GTK+ API, open-window already implies presenting the window to bring it to the front, so it's not
expected that bring-to-front is emitted on open. This is happening since r223773 that moved common code from
platform specific inspector files to the main file, but in the case of open the mac implementation was not
exactly the same as the GTK+ one. This broke /webkit2/WebKitWebInspector/default and
/webkit2/WebKitWebInspector/manual-attach-detach.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::open): Set m_isOpening for the scope of the function.
* UIProcess/WebInspectorProxy.h: Add m_isOpening.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformBringToFront): Return early if m_isOpening is true.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (224574 => 224575)


--- trunk/Source/WebKit/ChangeLog	2017-11-08 09:49:03 UTC (rev 224574)
+++ trunk/Source/WebKit/ChangeLog	2017-11-08 12:55:22 UTC (rev 224575)
@@ -1,3 +1,22 @@
+2017-11-08  Carlos Garcia Campos  <[email protected]>
+
+        REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right after open-window
+        https://bugs.webkit.org/show_bug.cgi?id=179365
+
+        Reviewed by Michael Catanzaro.
+
+        In the GTK+ API, open-window already implies presenting the window to bring it to the front, so it's not
+        expected that bring-to-front is emitted on open. This is happening since r223773 that moved common code from
+        platform specific inspector files to the main file, but in the case of open the mac implementation was not
+        exactly the same as the GTK+ one. This broke /webkit2/WebKitWebInspector/default and
+        /webkit2/WebKitWebInspector/manual-attach-detach.
+
+        * UIProcess/WebInspectorProxy.cpp:
+        (WebKit::WebInspectorProxy::open): Set m_isOpening for the scope of the function.
+        * UIProcess/WebInspectorProxy.h: Add m_isOpening.
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::platformBringToFront): Return early if m_isOpening is true.
+
 2017-11-07  Carlos Garcia Campos  <[email protected]>
 
         REGRESSION(r224179): [GTK] Several WebViewEditor tests are failing since r224179

Modified: trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp (224574 => 224575)


--- trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp	2017-11-08 09:49:03 UTC (rev 224574)
+++ trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp	2017-11-08 12:55:22 UTC (rev 224575)
@@ -40,6 +40,7 @@
 #include "WebProcessPool.h"
 #include "WebProcessProxy.h"
 #include <WebCore/NotImplemented.h>
+#include <wtf/SetForScope.h>
 
 #if PLATFORM(GTK)
 #include "WebInspectorProxyClient.h"
@@ -393,6 +394,7 @@
     if (!m_inspectorPage)
         return;
 
+    SetForScope<bool> isOpening(m_isOpening, true);
     m_isVisible = true;
     m_inspectorPage->process().send(Messages::WebInspectorUI::SetIsVisible(m_isVisible), m_inspectorPage->pageID());
 

Modified: trunk/Source/WebKit/UIProcess/WebInspectorProxy.h (224574 => 224575)


--- trunk/Source/WebKit/UIProcess/WebInspectorProxy.h	2017-11-08 09:49:03 UTC (rev 224574)
+++ trunk/Source/WebKit/UIProcess/WebInspectorProxy.h	2017-11-08 12:55:22 UTC (rev 224575)
@@ -225,6 +225,7 @@
     bool m_ignoreFirstBringToFront { false };
     bool m_elementSelectionActive { false };
     bool m_ignoreElementSelectionChange { false };
+    bool m_isOpening { false };
 
     IPC::Attachment m_connectionIdentifier;
 

Modified: trunk/Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp (224574 => 224575)


--- trunk/Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp	2017-11-08 09:49:03 UTC (rev 224574)
+++ trunk/Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp	2017-11-08 12:55:22 UTC (rev 224575)
@@ -302,6 +302,9 @@
 
 void WebInspectorProxy::platformBringToFront()
 {
+    if (m_isOpening)
+        return;
+
     if (m_client && m_client->bringToFront(*this))
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to