Bug 169130

Summary: [GTK] Ensure WebKitWebView always have a user content manager
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, commit-queue, gns, mcatanzaro, mrobinson
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 166680    
Attachments:
Description Flags
Patch none

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.