From 47d1310c5e599710586d6ffeaade8d0c2db6c3bc Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 18 Jun 2013 22:15:20 +0000 Subject: [PATCH] [giow] (3) Be even more explicit about the supported property names of a
. Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22159 Affected topics: DOM APIs git-svn-id: http://svn.whatwg.org/webapps@7986 340c8d12-0b0e-0410-8428-c7bf67bfef74 --- complete.html | 72 +++++++++++++++++++++++++++++++++--------- index | 72 +++++++++++++++++++++++++++++++++--------- source | 86 +++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 185 insertions(+), 45 deletions(-) diff --git a/complete.html b/complete.html index 11fb1c4e291..b089f5e4c24 100644 --- a/complete.html +++ b/complete.html @@ -44457,25 +44457,69 @@

4.10.2 Categories


Each form element has a mapping of names to elements called the past names map. It is used to persist names of controls even when they change names.

-

The supported property names consist of:

+

The supported property names consist of the names obtained from the following + algorithm, in the order obtained from this algorithm:

-

The values must be listed in tree order, with id - attributes preceding name attributes preceding entries from the - past names map when the same element has more than one, and with multiple entries in - the past names map for the same element being ordered chronologically by when they - were added to the map, and in all cases ignoring later duplicates.

+
  • Return the list of names from sourced names, maintaining their + relative order.

  • -

    When a form element is indexed for named property +

    When a form element is indexed for named property retrieval, the user agent must run the following steps:

    1. Let candidates be a live RadioNodeList diff --git a/index b/index index 11fb1c4e291..b089f5e4c24 100644 --- a/index +++ b/index @@ -44457,25 +44457,69 @@ interface HTMLFormElement : H


      Each form element has a mapping of names to elements called the past names map. It is used to persist names of controls even when they change names.

      -

      The supported property names consist of:

      +

      The supported property names consist of the names obtained from the following + algorithm, in the order obtained from this algorithm:

      -
      • The values of all the id and name attributes of all the listed - elements whose form owner is the form element, with the - exception of input elements whose type - attribute is in the Image Button state, and
      • +
        1. Let sourced names be an initially empty ordered list of tuples + consisting of a string, an element, a source, where the source is either id, name, + or past, and, if the source is past, an age.

        2. -
        3. The values of all the id and name attributes of all the img elements that are - descendants of the form element, and
        4. +
        5. + +

          For each listed element candidate + whose form owner is the form element, with the exception of any + input elements whose type attribute is in the + Image Button state, run these substeps:

          + +
          1. If candidate has an id attribute, add + an entry to sourced names with that id + attribute's value as the string, candidate as the element, and id as + the source.

          2. + +
          3. If candidate has a name attribute, + add an entry to sourced names with that name attribute's value as the string, candidate + as the element, and name as the source.

          4. + +
        6. + +
        7. + +

          For each img element candidate that is a descendant of the + form element, run these substeps:

          + +
          1. If candidate has an id attribute, add + an entry to sourced names with that id + attribute's value as the string, candidate as the element, and id as + the source.

          2. + +
          3. If candidate has a name attribute, + add an entry to sourced names with that name attribute's value as the string, candidate + as the element, and name as the source.

          4. + +
        8. + +
        9. + +

          For each entry past entry in the past names map add an entry + to sourced names with the past entry's name as the + string, past entry's element as the element, past as the source, and + the length of time past entry has been in the past names map as + the age.

          + +
        10. + +
        11. Sort sourced names by tree order of the element entry of + each tuple, sorting entries with the same element by putting entries whose source is id + first, then entries whose source is name, and finally entries whose source is past, + and sorting entries with the same element and source by their age, oldest first.

        12. -
        13. All the names currently in the past names map.
        14. +
        15. Remove any entries in sourced names that have the same name as an + earlier entry in the map.

        16. -

      The values must be listed in tree order, with id - attributes preceding name attributes preceding entries from the - past names map when the same element has more than one, and with multiple entries in - the past names map for the same element being ordered chronologically by when they - were added to the map, and in all cases ignoring later duplicates.

      +
    2. Return the list of names from sourced names, maintaining their + relative order.

    3. -

      When a form element is indexed for named property +

    When a form element is indexed for named property retrieval, the user agent must run the following steps:

    1. Let candidates be a live RadioNodeList diff --git a/source b/source index 2b487939b0b..9ba6d3554b7 100644 --- a/source +++ b/source @@ -48681,29 +48681,81 @@ interface HTMLFormElement : HTMLElement {

      Each form element has a mapping of names to elements called the past names map. It is used to persist names of controls even when they change names.

      -

      The supported property names consist of:

      +

      The supported property names consist of the names obtained from the following + algorithm, in the order obtained from this algorithm:

      -
        +
          -
        1. The values of all the id and name attributes of all the listed - elements whose form owner is the form element, with the - exception of input elements whose type - attribute is in the Image Button state, and
        2. +
        3. Let sourced names be an initially empty ordered list of tuples + consisting of a string, an element, a source, where the source is either id, name, + or past, and, if the source is past, an age.

        4. -
        5. The values of all the id and name attributes of all the img elements that are - descendants of the form element, and
        6. +
        7. -
        8. All the names currently in the past names map.
        9. +

          For each listed element candidate + whose form owner is the form element, with the exception of any + input elements whose type attribute is in the + Image Button state, run these substeps:

          -
      +
        + +
      1. If candidate has an id attribute, add + an entry to sourced names with that id + attribute's value as the string, candidate as the element, and id as + the source.

      2. + +
      3. If candidate has a name attribute, + add an entry to sourced names with that name attribute's value as the string, candidate + as the element, and name as the source.

      4. + +
      + +
    2. + +
    3. + +

      For each img element candidate that is a descendant of the + form element, run these substeps:

      + +
        -

        The values must be listed in tree order, with id - attributes preceding name attributes preceding entries from the - past names map when the same element has more than one, and with multiple entries in - the past names map for the same element being ordered chronologically by when they - were added to the map, and in all cases ignoring later duplicates.

        +
      1. If candidate has an id attribute, add + an entry to sourced names with that id + attribute's value as the string, candidate as the element, and id as + the source.

      2. + +
      3. If candidate has a name attribute, + add an entry to sourced names with that name attribute's value as the string, candidate + as the element, and name as the source.

      4. + +
      + +
    4. + +
    5. + +

      For each entry past entry in the past names map add an entry + to sourced names with the past entry's name as the + string, past entry's element as the element, past as the source, and + the length of time past entry has been in the past names map as + the age.

      + +
    6. + +
    7. Sort sourced names by tree order of the element entry of + each tuple, sorting entries with the same element by putting entries whose source is id + first, then entries whose source is name, and finally entries whose source is past, + and sorting entries with the same element and source by their age, oldest first.

    8. + +
    9. Remove any entries in sourced names that have the same name as an + earlier entry in the map.

    10. + +
    11. Return the list of names from sourced names, maintaining their + relative order.

    12. + +

    When a form element is indexed for named property retrieval, the user agent must run the following steps: