WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 250835
[WPE][GTK] Remove most webkit_web_view_new_with_*() constructors
https://bugs.webkit.org/show_bug.cgi?id=250835
Summary
[WPE][GTK] Remove most webkit_web_view_new_with_*() constructors
Michael Catanzaro
Reported
2023-01-19 06:28:39 PST
Splitting this from
bug #222366
: """ I'm also considering to remove all (or most of) webkit_web_view_new_with constructors. With all the construct properties we currently have I think most people need to use g_object_new and pass properties. Maybe we can keep with_related_view and add optional parameters to new() for the properties that are expected to be passed (web context, network session and settings, for example) """ I agree.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2023-01-21 11:06:08 PST
Um, actually there is one downside to using optional parameters: it makes it difficult to add any new construct parameters in the future without dooming applications back to using g_object_new() directly again. I have a slightly different proposal that uses variadic arguments instead and just passes them along to g_object_new_valist(), which gives us flexibility to add new construct properties in the future without having to give up on use of webkit_web_view_new(). The downside is using variadic arguments means it can't be introspectable, which previously would not matter since it's a new() function and those aren't used by language bindings anyway, but since we use gi-docgen now it means it can't appear in the API docs. Still, it's worth it IMO. Another downside is I couldn't find a way to make the WPE WebKitWebViewBackend a separate non-variadic parameter as I don't think there's any way to add it to the va_list that gets passed to g_object_new_valist(), so WPE port users have to not forget to pass that.
Michael Catanzaro
Comment 2
2023-01-21 12:55:31 PST
Pull request:
https://github.com/WebKit/WebKit/pull/8926
Michael Catanzaro
Comment 3
2023-01-23 13:00:28 PST
(In reply to Michael Catanzaro from
comment #1
)
> I have a slightly different proposal that uses variadic arguments instead > and just passes them along to g_object_new_valist(), which gives us > flexibility to add new construct properties in the future without having to > give up on use of webkit_web_view_new().
Carlos Garcia did not like this, so I will drop this part of the proposal.
EWS
Comment 4
2023-01-24 09:08:37 PST
Committed
259285@main
(f2357aa30823): <
https://commits.webkit.org/259285@main
> Reviewed commits have been landed. Closing PR #8926 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug