- a/Source/WebKit/ChangeLog +30 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2020-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 NOBODY (OOPS!).
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
1
2020-02-09  Lauro Moura  <lmoura@igalia.com>
31
2020-02-09  Lauro Moura  <lmoura@igalia.com>
2
32
3
        [GTK][WPE] Expose allowTopNavigationToDataURL
33
        [GTK][WPE] Expose allowTopNavigationToDataURL
- a/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp -1 / +1 lines
Lines 71-77 WebPageProxy* RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow() a/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp_sec1
71
    g_signal_connect_swapped(m_webView, "destroy", G_CALLBACK(remoteInspectorViewDestroyed), this);
71
    g_signal_connect_swapped(m_webView, "destroy", G_CALLBACK(remoteInspectorViewDestroyed), this);
72
    g_object_add_weak_pointer(G_OBJECT(m_webView), reinterpret_cast<void**>(&m_webView));
72
    g_object_add_weak_pointer(G_OBJECT(m_webView), reinterpret_cast<void**>(&m_webView));
73
73
74
    m_window = webkitInspectorWindowNew(nullptr);
74
    m_window = webkitInspectorWindowNew();
75
    gtk_container_add(GTK_CONTAINER(m_window), m_webView);
75
    gtk_container_add(GTK_CONTAINER(m_window), m_webView);
76
    gtk_widget_show(m_webView);
76
    gtk_widget_show(m_webView);
77
77
- a/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp -5 / +1 lines
Lines 260-271 void WebInspectorProxy::platformCreateFrontendWindow() a/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp_sec1
260
    if (m_client && m_client->openWindow(*this))
260
    if (m_client && m_client->openWindow(*this))
261
        return;
261
        return;
262
262
263
    GtkWidget* inspectedViewParent = gtk_widget_get_toplevel(inspectedPage()->viewWidget());
264
    if (!WebCore::widgetIsOnscreenToplevelWindow(inspectedViewParent))
265
        inspectedViewParent = nullptr;
266
267
    ASSERT(!m_inspectorWindow);
263
    ASSERT(!m_inspectorWindow);
268
    m_inspectorWindow = webkitInspectorWindowNew(inspectedViewParent ? GTK_WINDOW(inspectedViewParent) : nullptr);
264
    m_inspectorWindow = webkitInspectorWindowNew();
269
    gtk_container_add(GTK_CONTAINER(m_inspectorWindow), m_inspectorView);
265
    gtk_container_add(GTK_CONTAINER(m_inspectorWindow), m_inspectorView);
270
    gtk_widget_show(m_inspectorView);
266
    gtk_widget_show(m_inspectorView);
271
267
- a/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp -2 / +2 lines
Lines 57-65 static void webkit_inspector_window_init(WebKitInspectorWindow* window) a/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp_sec1
57
    gtk_widget_show(window->headerBar);
57
    gtk_widget_show(window->headerBar);
58
}
58
}
59
59
60
GtkWidget* webkitInspectorWindowNew(GtkWindow* parent)
60
GtkWidget* webkitInspectorWindowNew()
61
{
61
{
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,
63
        "default-width", WebInspectorProxy::initialWindowWidth, "default-height", WebInspectorProxy::initialWindowHeight, nullptr));
63
        "default-width", WebInspectorProxy::initialWindowWidth, "default-height", WebInspectorProxy::initialWindowHeight, nullptr));
64
}
64
}
65
65
- a/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.h -1 / +1 lines
Lines 41-47 typedef struct _WebKitInspectorWindowClass WebKitInspectorWindowClass; a/Source/WebKit/UIProcess/Inspector/gtk/WebKitInspectorWindow.h_sec1
41
41
42
GType webkit_inspector_window_get_type(void);
42
GType webkit_inspector_window_get_type(void);
43
43
44
GtkWidget* webkitInspectorWindowNew(GtkWindow* parent);
44
GtkWidget* webkitInspectorWindowNew();
45
void webkitInspectorWindowSetSubtitle(WebKitInspectorWindow*, const char* subtitle);
45
void webkitInspectorWindowSetSubtitle(WebKitInspectorWindow*, const char* subtitle);
46
46
47
G_END_DECLS
47
G_END_DECLS

Return to Bug 207455