Bug 169130 - [GTK] Ensure WebKitWebView always have a user content manager
Summary: [GTK] Ensure WebKitWebView always have a user content manager
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: 166680
  Show dependency treegraph
 
Reported: 2017-03-03 05:52 PST by Carlos Garcia Campos
Modified: 2017-03-03 09:23 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.07 KB, patch)
2017-03-03 05:55 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-03-03 05:52:57 PST
User content manager is a construct only property, so if not set by the user the web view doesn't have any. We can create a default one, like we do for settings, when user didn't provide one.
Comment 1 Carlos Garcia Campos 2017-03-03 05:55:39 PST
Created attachment 303315 [details]
Patch

I need this for the new remote inspector, that uses a custom protocol page with user script messages.
Comment 2 WebKit Commit Bot 2017-03-03 05:57:20 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2017-03-03 08:02:05 PST
Comment on attachment 303315 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303315&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:2267
>   * Returns: (transfer none): the #WebKitUserContentManager associated with the view

So it's no longer (transfer none), then. Technically an introspection API break, but breakage should be minimal....
Comment 4 Carlos Garcia Campos 2017-03-03 08:49:24 PST
(In reply to comment #3)
> Comment on attachment 303315 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=303315&action=review
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:2267
> >   * Returns: (transfer none): the #WebKitUserContentManager associated with the view
> 
> So it's no longer (transfer none), then. Technically an introspection API
> break, but breakage should be minimal....

Why not? the default user content manager is also owned by the web view, so this is still transfer none.
Comment 5 Michael Catanzaro 2017-03-03 08:57:53 PST
(In reply to comment #4)
> Why not? the default user content manager is also owned by the web view, so
> this is still transfer none.

Ah, dumb, sorry. I confused (transfer none) with (allow none).
Comment 6 WebKit Commit Bot 2017-03-03 09:23:08 PST
Comment on attachment 303315 [details]
Patch

Clearing flags on attachment: 303315

Committed r213366: <http://trac.webkit.org/changeset/213366>
Comment 7 WebKit Commit Bot 2017-03-03 09:23:12 PST
All reviewed patches have been landed.  Closing bug.