RESOLVED FIXED 181126
REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called, otherwise inspector does not close
https://bugs.webkit.org/show_bug.cgi?id=181126
Summary REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called...
Cédric Bellegarde
Reported 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) Exemple: #!/usr/bin/python from gi.repository import WebKit2 from gi.repository import Gtk def close(window): Gtk.main_quit() def main(): Gtk.init() view = WebKit2.WebView() settings = view.get_settings() settings.set_property("enable-developer-extras", True) view.load_uri("http://google.fr") window = Gtk.Window() window.add(view) window.connect("destroy", close) window.show_all() Gtk.main() main()
Attachments
Patch (1.58 KB, patch)
2018-03-07 00:44 PST, Carlos Garcia Campos
clopez: review+
Michael Catanzaro
Comment 1 2017-12-22 12:25:52 PST
This one, I can reproduce. 2.18.3 is fine, trunk is not.
Michael Catanzaro
Comment 2 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.
Carlos Garcia Campos
Comment 3 2018-01-02 05:10:50 PST
I can't reproduce this.
Michael Catanzaro
Comment 4 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.
Carlos Garcia Campos
Comment 5 2018-03-07 00:39:34 PST
I broke this in r218089
Carlos Garcia Campos
Comment 6 2018-03-07 00:44:07 PST
Adrian Perez
Comment 7 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.
Carlos Garcia Campos
Comment 8 2018-03-07 22:37:52 PST
Radar WebKit Bug Importer
Comment 9 2018-03-08 09:28:05 PST
Radar WebKit Bug Importer
Comment 10 2018-03-08 09:28:06 PST
Note You need to log in before you can comment on or make changes to this bug.