<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>250835</bug_id>
          
          <creation_ts>2023-01-19 06:28:39 -0800</creation_ts>
          <short_desc>[WPE][GTK] Remove most webkit_web_view_new_with_*() constructors</short_desc>
          <delta_ts>2023-01-24 09:08:41 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>210100</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1926595</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-19 06:28:39 -0800</bug_when>
    <thetext>Splitting this from bug #222366:

&quot;&quot;&quot;
I&apos;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)
&quot;&quot;&quot;

I agree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927131</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-21 11:06:08 -0800</bug_when>
    <thetext>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&apos;t be introspectable, which previously would not matter since it&apos;s a new() function and those aren&apos;t used by language bindings anyway, but since we use gi-docgen now it means it can&apos;t appear in the API docs. Still, it&apos;s worth it IMO. Another downside is I couldn&apos;t find a way to make the WPE WebKitWebViewBackend a separate non-variadic parameter as I don&apos;t think there&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927141</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-21 12:55:31 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/8926</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927551</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-23 13:00:28 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; I have a slightly different proposal that uses variadic arguments instead
&gt; and just passes them along to g_object_new_valist(), which gives us
&gt; flexibility to add new construct properties in the future without having to
&gt; give up on use of webkit_web_view_new().

Carlos Garcia did not like this, so I will drop this part of the proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927833</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-01-24 09:08:37 -0800</bug_when>
    <thetext>Committed 259285@main (f2357aa30823): &lt;https://commits.webkit.org/259285@main&gt;

Reviewed commits have been landed. Closing PR #8926 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>