Bug 181126 - REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called, otherwise inspector does not close
Summary: REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2017-12-22 07:41 PST by Cédric Bellegarde
Modified: 2018-03-08 09:28 PST (History)
7 users (show)

See Also:

Patch (1.58 KB, patch)
2018-03-07 00:44 PST, Carlos Garcia Campos
clopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cédric Bellegarde 2017-12-22 07:41:12 PST
When enabling inspector with "developer-extras", the inspector window opened from default webkit menu can't be closed.

Adding a webkit_web_view_get_inspector() call fixes the issue. (Was not present in 2.16)

from gi.repository import WebKit2
from gi.repository import Gtk

def close(window):

def main():

        view = WebKit2.WebView()
        settings = view.get_settings()
        settings.set_property("enable-developer-extras", True)
        window = Gtk.Window()
        window.connect("destroy", close)


Comment 1 Michael Catanzaro 2017-12-22 12:25:52 PST
This one, I can reproduce. 2.18.3 is fine, trunk is not.
Comment 2 Michael Catanzaro 2017-12-22 12:43:19 PST
We could probably fix it by calling webkitWebInspectorCreate during WebKitWebView construction, instead of doing it lazily, but there's probably a better way, if we could figure out what changed here.
Comment 3 Carlos Garcia Campos 2018-01-02 05:10:50 PST
I can't reproduce this.
Comment 4 Michael Catanzaro 2018-03-05 12:22:31 PST
(In reply to Carlos Garcia Campos from comment #3)
> I can't reproduce this.

Did you try the example in the first comment? MiniBrowser and epiphany both calls webkit_web_view_get_inspector(), which avoids the problem, so you won't be able to reproduce there.
Comment 5 Carlos Garcia Campos 2018-03-07 00:39:34 PST
I broke this in r218089
Comment 6 Carlos Garcia Campos 2018-03-07 00:44:07 PST
Created attachment 335176 [details]
Comment 7 Adrian Perez 2018-03-07 00:58:03 PST
I can reproduce this with Dinghy (https://github.com/aperezdc/dinghy),
which is is a WPE launcher/browser. It can be built with against
WebKitGTK+ as well passing “-DDY_USE_WEBKITGTK=ON” to CMake. The issue
is present in both ports.
Comment 8 Carlos Garcia Campos 2018-03-07 22:37:52 PST
Committed r229396: <https://trac.webkit.org/changeset/229396>
Comment 9 Radar WebKit Bug Importer 2018-03-08 09:28:05 PST
Comment 10 Radar WebKit Bug Importer 2018-03-08 09:28:06 PST