[Webkit-unassigned] [Bug 120279] New: Past named map behavior is inconsistent with the current HTML5 specification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 25 16:28:35 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=120279

           Summary: Past named map behavior is inconsistent with the
                    current HTML5 specification
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: ian at hixie.ch, tkent at chromium.org
        Depends on: 120277


Created an attachment (id=209610)
 --> (https://bugs.webkit.org/attachment.cgi?id=209610&action=review)
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?).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list