Changeset 130026 in webkit


Ignore:
Timestamp:
Oct 1, 2012 3:45:12 AM (12 years ago)
Author:
arko@motorola.com
Message:

Microdata: names.item() must return null for out of range indexes.
https://bugs.webkit.org/show_bug.cgi?id=97898

Reviewed by Kentaro Hara.

Source/WebCore:

DOMStringList.item() must return null for an invalid index.
Spec: http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList
Removed [IsIndex] extended IDL attribute from item() method's index
parameter in DOMStringList interface.
Firefox and Opera's behavior is consistent with the spec. Both
returns null for invalid index.

Test: fast/dom/MicroData/names-item-out-of-range-index.html

  • dom/DOMStringList.idl:

LayoutTests:

Added test case to ensure names.item() behavior for out of range indexes.

  • fast/dom/MicroData/names-item-out-of-range-index-expected.txt: Added.
  • fast/dom/MicroData/names-item-out-of-range-index.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r130024 r130026  
     12012-10-01  Arko Saha  <arko@motorola.com>
     2
     3        Microdata: names.item() must return null for out of range indexes.
     4        https://bugs.webkit.org/show_bug.cgi?id=97898
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Added test case to ensure names.item() behavior for out of range indexes.
     9
     10        * fast/dom/MicroData/names-item-out-of-range-index-expected.txt: Added.
     11        * fast/dom/MicroData/names-item-out-of-range-index.html: Added.
     12
    1132012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r130024 r130026  
     12012-10-01  Arko Saha  <arko@motorola.com>
     2
     3        Microdata: names.item() must return null for out of range indexes.
     4        https://bugs.webkit.org/show_bug.cgi?id=97898
     5
     6        Reviewed by Kentaro Hara.
     7
     8        DOMStringList.item() must return null for an invalid index.
     9        Spec: http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList
     10        Removed [IsIndex] extended IDL attribute from item() method's index
     11        parameter in DOMStringList interface.
     12        Firefox and Opera's behavior is consistent with the spec. Both
     13        returns null for invalid index.
     14
     15        Test: fast/dom/MicroData/names-item-out-of-range-index.html
     16
     17        * dom/DOMStringList.idl:
     18
    1192012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
    220
  • trunk/Source/WebCore/dom/DOMStringList.idl

    r120260 r130026  
    3131    ] DOMStringList {
    3232        readonly attribute unsigned long length;
    33         [TreatReturnedNullStringAs=Null] DOMString item(in [IsIndex,Optional=DefaultIsUndefined] unsigned long index);
     33        [TreatReturnedNullStringAs=Null] DOMString item(in [Optional=DefaultIsUndefined] unsigned long index);
    3434        boolean contains(in [Optional=DefaultIsUndefined] DOMString string);
    3535    };
Note: See TracChangeset for help on using the changeset viewer.