Bug 187172 - [GTK] web inspector does not work with is-ephemeral set to true
Summary: [GTK] web inspector does not work with is-ephemeral set to true
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2018-06-29 02:39 PDT by Gaute Hope
Modified: 2018-07-11 02:11 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaute Hope 2018-06-29 02:39:37 PDT
Hi,

it seems that the web inspector cannot be attached when is-ephemeral is set to TRUE. The docs only mention that developer-extras must be enabled.
Comment 2 Adrian Perez 2018-06-29 03:50:41 PDT
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.
Comment 3 Gaute Hope 2018-07-10 07:33:50 PDT
Using g_object_new (...) and passing a context generated using ..context_new_ephemeral() as well as settings (not with any is-ephemeral property) works.
Comment 4 Michael Catanzaro 2018-07-11 02:11:20 PDT
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.