[Webkit-unassigned] [Bug 92988] New: itemType[index] must be undefined for out-of-range index

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 2 07:10:51 PDT 2012


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

           Summary: itemType[index] must be undefined for out-of-range
                    index
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: arko at motorola.com
            Blocks: 92986


Fail- itemType[index] must be undefined for out-of-range index assert_equals: expected (undefined) undefined but got (object) null

Sample test:
test(function () {
    assert_equals( makeEl('div',{itemtype:' '}).itemType[0], window.undefined );
}, 'itemType[index] must be undefined for out-of-range index');


Expected result: itemTpye[0] should return undefined.
Actual: Returns null.

makeEl method creates an element <div> with empty itemtype(0 tokens).

According to the spec itemtpye attribute is a space-separated list. http://www.whatwg.org/specs/web-apps/current-work/#attr-itemtype
We have defined itemtype attribute as :
readonly attribute [Conditional=MICRODATA] DOMSettableTokenList itemType;

itemType[index] should return undefined for out-of-range index instead of null.

IndexedGetter spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties

Same issue can also be observed with following attributes:
itemref,
itemprop

-- 
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