Changeset 154005 in webkit
- Timestamp:
- Aug 13, 2013 9:18:43 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154004 r154005 1 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 HTMLSelectElement.item() does not behave according to specification 4 https://bugs.webkit.org/show_bug.cgi?id=119738 5 6 Reviewed by Darin Adler. 7 8 Add a new layout test to check that the HTMLSelectElement.item() indexed getter's 9 parameter is correctly validated. 10 Also update fast/dom/non-numeric-values-numeric-parameters.html now that the 11 argument is mandatory. 12 13 * fast/dom/HTMLSelectElement/select-element-item-argument-expected.txt: Added. 14 * fast/dom/HTMLSelectElement/select-element-item-argument.html: Added. 15 * fast/dom/non-numeric-values-numeric-parameters-expected.txt: 16 * fast/dom/script-tests/non-numeric-values-numeric-parameters.js: 17 1 18 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 19 -
trunk/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt
r146283 r154005 32 32 PASS nonNumericPolicy('createHTMLOptionsCollection().remove(x)') is 'any type allowed' 33 33 PASS nonNumericPolicy('createHTMLSelectElement().remove(x)') is 'any type allowed' 34 PASS nonNumericPolicy('createHTMLSelectElement().item(x)') is 'any type allowed '34 PASS nonNumericPolicy('createHTMLSelectElement().item(x)') is 'any type allowed (but not omitted)' 35 35 PASS nonNumericPolicy('createHTMLTableElement().insertRow(x)') is 'any type allowed' 36 36 PASS nonNumericPolicy('createHTMLTableElement().deleteRow(x)') is 'any type allowed' -
trunk/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
r145929 r154005 251 251 252 252 shouldBe("nonNumericPolicy('createHTMLSelectElement().remove(x)')", "'any type allowed'"); 253 shouldBe("nonNumericPolicy('createHTMLSelectElement().item(x)')", "'any type allowed '");253 shouldBe("nonNumericPolicy('createHTMLSelectElement().item(x)')", "'any type allowed (but not omitted)'"); 254 254 255 255 // HTMLTableElement -
trunk/Source/WebCore/ChangeLog
r154004 r154005 1 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 HTMLSelectElement.item() does not behave according to specification 4 https://bugs.webkit.org/show_bug.cgi?id=119738 5 6 Reviewed by Darin Adler. 7 8 Make HTMLSelectElement.item() behave according to specification: 9 http://www.w3.org/TR/html51/forms.html#dom-select-item 10 http://dom.spec.whatwg.org/#dom-htmlcollection-item 11 12 Namely, we no longer throw if the offset argument is negative. Also, 13 the argument is now mandatory. 14 15 IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is 16 called with a negative value (as per the specification). 17 18 The argument is mandatory in Firefox and Blink, but optional in IE10 19 (it returns null when called without argument). This looks like a bug 20 in IE because other item() getters' argument is usually mandatory in IE 21 (e.g. NodeList.item()). 22 23 Test: fast/dom/HTMLSelectElement/select-element-item-argument.html 24 25 * html/HTMLSelectElement.idl: 26 1 27 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 28 -
trunk/Source/WebCore/html/HTMLSelectElement.idl
r151714 r154005 40 40 [SetterRaisesException] attribute unsigned long length; 41 41 #endif 42 getter Node item( [IsIndex,Default=Undefined] optionalunsigned long index);42 getter Node item(unsigned long index); 43 43 Node namedItem([Default=Undefined] optional DOMString name); 44 44 [ObjCLegacyUnnamedParameters, RaisesException] void add([Default=Undefined] optional HTMLElement element,
Note: See TracChangeset
for help on using the changeset viewer.