Bug 154949

Summary: HTMLFormElement's named property getter does not return a RadioNodelist
Product: WebKit Reporter: Frank Olivier <frankolivier>
Component: FormsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, koivisto, rniwa, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://html.spec.whatwg.org/multipage/forms.html#the-form-element
Attachments:
Description Flags
Patch none

Description Frank Olivier 2016-03-02 19:30:56 PST
See https://jsfiddle.net/mjba21mk/5/

<form name="f">
 <input type="radio" name="r" value="value1" />
 <input type="radio" name="r" value="value2" checked />
</form>

document.f.r.value is undefined - as document.f.r is a NodeList
document.f.r.value should be “value2” - as document.f.r should be a RadioNodeList

Relevant spec https://w3c.github.io/html/single-page.html#the-htmlformcontrolscollection-interface

Works in latest Chrome, Firefox; will be fixed soon in Edge


This bug might be covered by https://bugs.webkit.org/show_bug.cgi?id=150957

Seen on https://www.washingtonpost.com/news/the-fix/wp/2015/10/06/hey-lets-all-make-our-own-donald-trump-hats/
User can’t create a white-and-gold hat in the MAKE A HAT GREAT AGAIN section
Comment 1 Chris Dumez 2016-03-02 21:29:32 PST
Did not mean to close this yet.
Comment 2 Chris Dumez 2016-03-02 21:54:21 PST
Actually, based on the test case, the issue is with HTMLFormElement's named property getter.
Comment 3 Chris Dumez 2016-03-02 22:28:50 PST
Created attachment 272732 [details]
Patch
Comment 4 WebKit Commit Bot 2016-03-02 23:43:52 PST
Comment on attachment 272732 [details]
Patch

Clearing flags on attachment: 272732

Committed r197497: <http://trac.webkit.org/changeset/197497>
Comment 5 WebKit Commit Bot 2016-03-02 23:43:58 PST
All reviewed patches have been landed.  Closing bug.