Title: [256114] trunk/Source/WebKit
Revision
256114
Author
[email protected]
Date
2020-02-10 03:21:37 -0800 (Mon, 10 Feb 2020)

Log Message

[GTK][WebInspector] Do not make Web Inspector windows transient
https://bugs.webkit.org/show_bug.cgi?id=207455

Reviewed by Carlos Garcia Campos.

Stop setting Web Inspector windows as transient for the window
containing the web view being inspected, to allow changing their
relative stacking order. No changes are needed for inspector windows
to continue being destroyed correctly when the corresponding web view
is destroyed because code for handling that was already present in
WebInspectorProxyGtk.cpp.

No new tests needed.

* UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp:
(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
Do not pass a parent window parameter to webkitInspectorWindowNew().
* UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateFrontendWindow): Remove code
to obtain the top level window of the WebKitWebView, which no longer
needs being passed to webkitInspectorWindowNew().
* UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp:
(webkitInspectorWindowNew): Do not set the GtkWindow.transient-for
property for the Web Inspector window. Remove the parent window
parameter.
* UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Remove the parent
window parameter for webkitInspectorWindowNew().

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (256113 => 256114)


--- trunk/Source/WebKit/ChangeLog	2020-02-10 10:13:38 UTC (rev 256113)
+++ trunk/Source/WebKit/ChangeLog	2020-02-10 11:21:37 UTC (rev 256114)
@@ -1,3 +1,33 @@
+2020-02-10  Adrian Perez de Castro  <[email protected]>
+
+        [GTK][WebInspector] Do not make Web Inspector windows transient
+        https://bugs.webkit.org/show_bug.cgi?id=207455
+
+        Reviewed by Carlos Garcia Campos.
+
+        Stop setting Web Inspector windows as transient for the window
+        containing the web view being inspected, to allow changing their
+        relative stacking order. No changes are needed for inspector windows
+        to continue being destroyed correctly when the corresponding web view
+        is destroyed because code for handling that was already present in
+        WebInspectorProxyGtk.cpp.
+
+        No new tests needed.
+
+        * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp:
+        (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
+        Do not pass a parent window parameter to webkitInspectorWindowNew().
+        * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::platformCreateFrontendWindow): Remove code
+        to obtain the top level window of the WebKitWebView, which no longer
+        needs being passed to webkitInspectorWindowNew().
+        * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp:
+        (webkitInspectorWindowNew): Do not set the GtkWindow.transient-for
+        property for the Web Inspector window. Remove the parent window
+        parameter.
+        * UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Remove the parent
+        window parameter for webkitInspectorWindowNew().
+
 2020-02-10  Enrique Ocaña González  <[email protected]>
 
         [GTK] Mouse pointer no longer hidden during fullscreen video playback

Modified: trunk/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp (256113 => 256114)


--- trunk/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp	2020-02-10 10:13:38 UTC (rev 256113)
+++ trunk/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp	2020-02-10 11:21:37 UTC (rev 256114)
@@ -71,7 +71,7 @@
     g_signal_connect_swapped(m_webView, "destroy", G_CALLBACK(remoteInspectorViewDestroyed), this);
     g_object_add_weak_pointer(G_OBJECT(m_webView), reinterpret_cast<void**>(&m_webView));
 
-    m_window = webkitInspectorWindowNew(nullptr);
+    m_window = webkitInspectorWindowNew();
     gtk_container_add(GTK_CONTAINER(m_window), m_webView);
     gtk_widget_show(m_webView);
 

Modified: trunk/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp (256113 => 256114)


--- trunk/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp	2020-02-10 10:13:38 UTC (rev 256113)
+++ trunk/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp	2020-02-10 11:21:37 UTC (rev 256114)
@@ -261,12 +261,8 @@
     if (m_client && m_client->openWindow(*this))
         return;
 
-    GtkWidget* inspectedViewParent = gtk_widget_get_toplevel(inspectedPage()->viewWidget());
-    if (!WebCore::widgetIsOnscreenToplevelWindow(inspectedViewParent))
-        inspectedViewParent = nullptr;
-
     ASSERT(!m_inspectorWindow);
-    m_inspectorWindow = webkitInspectorWindowNew(inspectedViewParent ? GTK_WINDOW(inspectedViewParent) : nullptr);
+    m_inspectorWindow = webkitInspectorWindowNew();
     gtk_container_add(GTK_CONTAINER(m_inspectorWindow), m_inspectorView);
     gtk_widget_show(m_inspectorView);
 

Modified: trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp (256113 => 256114)


--- trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp	2020-02-10 10:13:38 UTC (rev 256113)
+++ trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp	2020-02-10 11:21:37 UTC (rev 256114)
@@ -57,9 +57,9 @@
     gtk_widget_show(window->headerBar);
 }
 
-GtkWidget* webkitInspectorWindowNew(GtkWindow* parent)
+GtkWidget* webkitInspectorWindowNew()
 {
-    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_INSPECTOR_WINDOW, "type", GTK_WINDOW_TOPLEVEL, "transient-for", parent,
+    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_INSPECTOR_WINDOW, "type", GTK_WINDOW_TOPLEVEL,
         "default-width", WebInspectorProxy::initialWindowWidth, "default-height", WebInspectorProxy::initialWindowHeight, nullptr));
 }
 

Modified: trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.h (256113 => 256114)


--- trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.h	2020-02-10 10:13:38 UTC (rev 256113)
+++ trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.h	2020-02-10 11:21:37 UTC (rev 256114)
@@ -41,7 +41,7 @@
 
 GType webkit_inspector_window_get_type(void);
 
-GtkWidget* webkitInspectorWindowNew(GtkWindow* parent);
+GtkWidget* webkitInspectorWindowNew();
 void webkitInspectorWindowSetSubtitle(WebKitInspectorWindow*, const char* subtitle);
 
 G_END_DECLS
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to