WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120279
Elements in a node list of the form element's name getter should not be added to the past names map
https://bugs.webkit.org/show_bug.cgi?id=120279
Summary
Elements in a node list of the form element's name getter should not be added...
Ryosuke Niwa
Reported
2013-08-25 16:28:01 PDT
Created
attachment 209610
[details]
Test case The current HTML5 specification
http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-nameditem
says: 1. Let candidates be a live RadioNodeList object containing all the listed elements whose form owner is the form element that have either an id attribute or a name attribute equal to name, with the exception of input elements whose type attribute is in the Image Button state, in tree order. 2. If candidates is empty, let candidates be a live RadioNodeList object containing all the img elements that are descendants of the form element and that have either an id attribute or a name attribute equal to name, in tree order. 3. If candidates is empty, name is the name of one of the entries in the form element's past names map: return the object associated with name in that map. 4. If candidates contains more than one node, return candidates and abort these steps. 5. Otherwise, candidates contains exactly one node. Add a mapping from name to the node in candidates in the form element's past names map, replacing the previous entry with the same name, if any. 6. Return the node in candidates. Steps 4-5 indicate that we should NOT be adding anything to the past names map when there are multiple elements found in steps 1-3. However, this is not what WebKit or Gekko does. At least both of these engines DO add the first element of those found in steps 1-3 to the past names map even when there are multiple elements at step 4. We need to figure out whether this is a bug in the specification, or we need to change our behavior due to some backward compatibility issues (maybe this is the Trident behavior?).
Attachments
Test case
(768 bytes, text/html)
2013-08-25 16:28 PDT
,
Ryosuke Niwa
no flags
Details
Fixes the bug
(4.67 KB, patch)
2013-08-26 15:37 PDT
,
Ryosuke Niwa
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-08-26 12:12:32 PDT
Confirmed. The specification matches IE10's behavior.
Kent Tamura
Comment 2
2013-08-26 15:30:21 PDT
Oh, I didn't know this behavior was standardized. So, Blink
r156140
[1] was wrong. My test for IE10/IE11 might have been incorrect. [1]
http://src.chromium.org/viewvc/blink?view=revision&revision=156140
Ryosuke Niwa
Comment 3
2013-08-26 15:37:15 PDT
(In reply to
comment #2
)
> Oh, I didn't know this behavior was standardized. > So, Blink
r156140
[1] was wrong. My test for IE10/IE11 might have been incorrect. > > [1]
http://src.chromium.org/viewvc/blink?view=revision&revision=156140
Indeed. It'll be really nice to be able to remove this feature but I don't think we can :( We can at least limit the scope. See my latest post on WHATWG:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
Ryosuke Niwa
Comment 4
2013-08-26 15:37:19 PDT
Created
attachment 209683
[details]
Fixes the bug
Ryosuke Niwa
Comment 5
2013-08-26 20:45:31 PDT
Committed
r154662
: <
http://trac.webkit.org/changeset/154662
>
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