<?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>258870</bug_id>
          
          <creation_ts>2023-07-05 01:42:35 -0700</creation_ts>
          <short_desc>ElementInternals.setFormValue(&lt;nullish value&gt;) doesn&apos;t clear submission value</short_desc>
          <delta_ts>2023-07-18 07:31:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/41090</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>154907</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>fayti1703</reporter>
          <assigned_to name="Alexey Shvayka">ashvayka</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>ashvayka</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1965075</commentid>
    <comment_count>0</comment_count>
      <attachid>466930</attachid>
    <who name="">fayti1703</who>
    <bug_when>2023-07-05 01:42:35 -0700</bug_when>
    <thetext>Created attachment 466930
Testcase

Trying to remove a form-associated custom element&apos;s value via `.internals.setFormValue(null)` fails silently -- the old value appears during form submission and `FormData` construction on the parent form.

I&apos;ve attached a test-case to demonstrate the issue. (Firefox 114 and Chrome 114 pass)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965177</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2023-07-05 12:05:53 -0700</bug_when>
    <thetext>(In reply to fayti1703 from comment #0)
&gt; Created attachment 466930 [details]
&gt; Testcase
&gt; 
&gt; Trying to remove a form-associated custom element&apos;s value via
&gt; `.internals.setFormValue(null)` fails silently -- the old value appears
&gt; during form submission and `FormData` construction on the parent form.
&gt; 
&gt; I&apos;ve attached a test-case to demonstrate the issue. (Firefox 114 and Chrome
&gt; 114 pass)

Thank you for the test case, I will take a look today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965180</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-07-05 12:18:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/111802198&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965182</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2023-07-05 12:43:40 -0700</bug_when>
    <thetext>Oh it seems with current bindings generator implementation, for `optional FormValue? state`, we can&apos;t differentiate between explicit `null` / `undefined` and a missing argument.

I am aware the bug is about first parameter, `value`, yet this fact ^^ affects the approach on how to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1966190</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2023-07-11 07:38:56 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15741</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1967172</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-07-18 07:31:21 -0700</bug_when>
    <thetext>Committed 266126@main (b691e0b9a450): &lt;https://commits.webkit.org/266126@main&gt;

Reviewed commits have been landed. Closing PR #15741 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>466930</attachid>
            <date>2023-07-05 01:42:35 -0700</date>
            <delta_ts>2023-07-05 01:51:50 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>file_258870.txt</filename>
            <type>text/html</type>
            <size>785</size>
            <attacher>fayti1703</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbD48aGVhZD4NCgk8c2NyaXB0Pg0KCQljdXN0b21FbGVtZW50
cy5kZWZpbmUoInRlc3QtZm9ybS1lbGVtZW50IiwgY2xhc3MgZXh0ZW5kcyBIVE1MRWxlbWVudCB7
DQoJCQlzdGF0aWMgZm9ybUFzc29jaWF0ZWQgPSB0cnVlOw0KCQkJY29uc3RydWN0b3IoKSB7DQoJ
CQkJc3VwZXIoKTsNCgkJCQl0aGlzLmludGVybmFscyA9IHRoaXMuYXR0YWNoSW50ZXJuYWxzKCk7
DQoJCQl9DQoJCX0pOw0KCTwvc2NyaXB0Pg0KPC9oZWFkPjxib2R5Pg0KCTxmb3JtIGlkPSJmb3Jt
Ij4NCgkJPHRlc3QtZm9ybS1lbGVtZW50IGlkPSJpbnB1dCIgbmFtZT0iaW5wdXQiPjwvdGVzdC1m
b3JtLWVsZW1lbnQ+DQoJPC9mb3JtPg0KCTxzY3JpcHQ+DQoJICAoKCkgPT4gew0KCSAgICBjb25z
dCBpbnB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJpbnB1dCIpOw0KCSAgICBpZighKCJz
ZXRGb3JtVmFsdWUiIGluIGlucHV0LmludGVybmFscykpIHsNCgkJICAgIGFsZXJ0KCIhUFJFIik7
DQoJICAgICAgcmV0dXJuOw0KICAgICAgfQ0KCSAgICBpbnB1dC5pbnRlcm5hbHMuc2V0Rm9ybVZh
bHVlKCJmYWlsIik7DQoJICAgIGlucHV0LmludGVybmFscy5zZXRGb3JtVmFsdWUobnVsbCk7DQoJ
ICAgIGNvbnN0IGZvcm1EYXRhID0gbmV3IEZvcm1EYXRhKGRvY3VtZW50LmdldEVsZW1lbnRCeUlk
KCJmb3JtIikpOw0KCSAgICBhbGVydChmb3JtRGF0YS5oYXMoImlucHV0IikgPyAiRkFJTCIgOiAi
UEFTUyIpDQoJICB9KSgpOw0KCTwvc2NyaXB0Pg0KPC9ib2R5PjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>