Changeset 256114 in webkit


Ignore:
Timestamp:
Feb 10, 2020, 3:21:37 AM (6 years ago)
Author:
Adrian Perez de Castro
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().

Location:
trunk/Source/WebKit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r256113 r256114  
     12020-02-10  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [GTK][WebInspector] Do not make Web Inspector windows transient
     4        https://bugs.webkit.org/show_bug.cgi?id=207455
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Stop setting Web Inspector windows as transient for the window
     9        containing the web view being inspected, to allow changing their
     10        relative stacking order. No changes are needed for inspector windows
     11        to continue being destroyed correctly when the corresponding web view
     12        is destroyed because code for handling that was already present in
     13        WebInspectorProxyGtk.cpp.
     14
     15        No new tests needed.
     16
     17        * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp:
     18        (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
     19        Do not pass a parent window parameter to webkitInspectorWindowNew().
     20        * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp:
     21        (WebKit::WebInspectorProxy::platformCreateFrontendWindow): Remove code
     22        to obtain the top level window of the WebKitWebView, which no longer
     23        needs being passed to webkitInspectorWindowNew().
     24        * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp:
     25        (webkitInspectorWindowNew): Do not set the GtkWindow.transient-for
     26        property for the Web Inspector window. Remove the parent window
     27        parameter.
     28        * UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Remove the parent
     29        window parameter for webkitInspectorWindowNew().
     30
    1312020-02-10  Enrique Ocaña González  <eocanha@igalia.com>
    232
  • trunk/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp

    r256086 r256114  
    7272    g_object_add_weak_pointer(G_OBJECT(m_webView), reinterpret_cast<void**>(&m_webView));
    7373
    74     m_window = webkitInspectorWindowNew(nullptr);
     74    m_window = webkitInspectorWindowNew();
    7575    gtk_container_add(GTK_CONTAINER(m_window), m_webView);
    7676    gtk_widget_show(m_webView);
  • trunk/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp

    r256112 r256114  
    262262        return;
    263263
    264     GtkWidget* inspectedViewParent = gtk_widget_get_toplevel(inspectedPage()->viewWidget());
    265     if (!WebCore::widgetIsOnscreenToplevelWindow(inspectedViewParent))
    266         inspectedViewParent = nullptr;
    267 
    268264    ASSERT(!m_inspectorWindow);
    269     m_inspectorWindow = webkitInspectorWindowNew(inspectedViewParent ? GTK_WINDOW(inspectedViewParent) : nullptr);
     265    m_inspectorWindow = webkitInspectorWindowNew();
    270266    gtk_container_add(GTK_CONTAINER(m_inspectorWindow), m_inspectorView);
    271267    gtk_widget_show(m_inspectorView);
  • trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp

    r255214 r256114  
    5858}
    5959
    60 GtkWidget* webkitInspectorWindowNew(GtkWindow* parent)
     60GtkWidget* webkitInspectorWindowNew()
    6161{
    62     return GTK_WIDGET(g_object_new(WEBKIT_TYPE_INSPECTOR_WINDOW, "type", GTK_WINDOW_TOPLEVEL, "transient-for", parent,
     62    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_INSPECTOR_WINDOW, "type", GTK_WINDOW_TOPLEVEL,
    6363        "default-width", WebInspectorProxy::initialWindowWidth, "default-height", WebInspectorProxy::initialWindowHeight, nullptr));
    6464}
  • trunk/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.h

    r255214 r256114  
    4242GType webkit_inspector_window_get_type(void);
    4343
    44 GtkWidget* webkitInspectorWindowNew(GtkWindow* parent);
     44GtkWidget* webkitInspectorWindowNew();
    4545void webkitInspectorWindowSetSubtitle(WebKitInspectorWindow*, const char* subtitle);
    4646
Note: See TracChangeset for help on using the changeset viewer.