Bug 119738 - HTMLSelectElement.item() does not behave according to specification
Summary: HTMLSelectElement.item() does not behave according to specification
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: BlinkMergeCandidate, WebExposed
Depends on:
Blocks:
 
Reported: 2013-08-13 03:21 PDT by Chris Dumez
Modified: 2013-08-13 09:17 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.80 KB, patch)
2013-08-13 03:43 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2013-08-13 03:21:14 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/33a9622c83dd9d85a7bd91b936bb2a31bd34f74b

HTMLSelectElement.item() does not behave according to specification

HTMLSelectElement.item() does not behave according to specification:
http://www.w3.org/TR/html51/forms.html#dom-select-item
http://dom.spec.whatwg.org/#dom-htmlcollection-item

Namely, we should not throw if the offset argument is negative. Also,
the argument should be mandatory.

IE10 and Firefox do not throw when HTMLSelectElement.item() is called
with a negative value (as per the specification).

The argument is mandatory in Firefox but optional in IE10 (it returns
null when called without argument). This looks like a bug in IE because
other item() getters' argument is usually mandatory in IE (e.g.
NodeList.item()).
Comment 1 Chris Dumez 2013-08-13 03:43:27 PDT
Created attachment 208615 [details]
Patch
Comment 2 WebKit Commit Bot 2013-08-13 09:17:36 PDT
Comment on attachment 208615 [details]
Patch

Clearing flags on attachment: 208615

Committed r154005: <http://trac.webkit.org/changeset/154005>
Comment 3 WebKit Commit Bot 2013-08-13 09:17:39 PDT
All reviewed patches have been landed.  Closing bug.