-
ch.dumez@sisa.samsung.com authored
https://bugs.webkit.org/show_bug.cgi?id=119738 Reviewed by Darin Adler. Source/WebCore: Make HTMLSelectElement.item() 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 no longer throw if the offset argument is negative. Also, the argument is now mandatory. IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is called with a negative value (as per the specification). The argument is mandatory in Firefox and Blink, 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()). Test: fast/dom/HTMLSelectElement/select-element-item-argument.html * html/HTMLSelectElement.idl: LayoutTests: Add a new layout test to check that the HTMLSelectElement.item() indexed getter's parameter is correctly validated. Also update fast/dom/non-numeric-values-numeric-parameters.html now that the argument is mandatory. * fast/dom/HTMLSelectElement/select-element-item-argument-expected.txt: Added. * fast/dom/HTMLSelectElement/select-element-item-argument.html: Added. * fast/dom/non-numeric-values-numeric-parameters-expected.txt: * fast/dom/script-tests/non-numeric-values-numeric-parameters.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
64a2fa50