Bug 31488

Summary: DOMHTMLOptionsCollection is missing some implementation
Product: WebKit Reporter: Jon Honeycutt <jhoneycutt>
Component: WebKit Misc.Assignee: Jon Honeycutt <jhoneycutt>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
patch mitz: review+, jhoneycutt: commit-queue-

Description Jon Honeycutt 2009-11-13 13:53:09 PST
All of the DOMHTMLOptionsCollection functions are stubs.
Comment 1 Jon Honeycutt 2009-11-13 14:15:03 PST
Created attachment 43199 [details]
patch
Comment 2 mitz 2009-11-14 16:20:54 PST
Comment on attachment 43199 [details]
patch

> +    if (index >= m_collection->length())
> +        return E_FAIL;
> +
> +    *result = DOMNode::createInstance(m_collection->item(index));
> +    return S_OK;

Can you just let HTMLOptionsCollection::item() return 0 and then null-check the result instead of bounds-checking index? It would be more like DOMHTMLCollection::item().

r=me either way
Comment 3 Jon Honeycutt 2009-11-17 15:40:06 PST
I made Dan's change.

Landed in r51091.