| Summary: | [WPE][GTK] Remove most webkit_web_view_new_with_*() constructors | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 210100 | ||
|
Description
Michael Catanzaro
2023-01-19 06:28:39 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. Pull request: https://github.com/WebKit/WebKit/pull/8926 (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. Committed 259285@main (f2357aa30823): <https://commits.webkit.org/259285@main> Reviewed commits have been landed. Closing PR #8926 and removing active labels. |