Summary: | [GTK] web inspector does not work with is-ephemeral set to true | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gaute Hope <eg> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | aperez, bugs-noreply, calvaris, cgarcia, mcatanzaro |
Priority: | P3 | Keywords: | Gtk |
Version: | WebKit Nightly Build | ||
Hardware: | PC | ||
OS: | Linux |
Description
Gaute Hope
2018-06-29 02:39:37 PDT
Relevant code: https://github.com/gauteh/astroid/blob/41acfc5a6b800120e82fad5a6d02e17a604fc63f/src/modes/thread_view/thread_view.cc#L87 Epiphany's incognito windows use ephemeral web contexts, and the inspector works fine there. I am not sure whether this would be the reason, but one difference between the code you linked from Astroid and Epiphany is: - Epiphany uses g_object_new() to pass *both* the WebKitWebContext and the WebKitSettings objects at construction time. - Astroid uses webkit_web_view_new_with_context(), which sets the WebKitWebContext only at construction time. After the WebKitWebView has been constructed, later on it uses webkit_web_view_set_settings(). Could it be that for some reason some settings cannot are not being applied correctly when the WebKitSettings is changed after construction and the WebKitWebContext is ephemeral? If there is something inside WebKit that prevents the second usage pattern, we should at least add some notes to the API documentation. I am adding Carlos GarcĂa and Michael Catanzaro on CC, because they might have some idea about this. Using g_object_new (...) and passing a context generated using ..context_new_ephemeral() as well as settings (not with any is-ephemeral property) works. You're trying to set the is-ephemeral property of WebKitWebSettings, which does not exist. I'm surprised there is no nasty runtime warning about this. is-ephemeral is a construct-only property of WebKitWebView and WebKitWebsiteDataManager. It's not a WebKitWebSettings property. The property cannot be changed after construct time. |