Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Issue 21834002: HTMLSelectElement.item() does not behave according to specification (Closed)

Created:
7 years, 4 months ago by do-not-use
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org, do-not-use, lgombos
Visibility:
Public.

Description

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()). BUG=237739 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155515

Patch Set 1 #

Patch Set 2 : Simplify link tag #

Patch Set 3 : Move test as advised #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -3 lines) Patch
A LayoutTests/fast/dom/HTMLSelectElement/select-element-item-argument.html View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLSelectElement/select-element-item-argument-expected.txt View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
do-not-use
7 years, 4 months ago (2013-08-02 13:05:31 UTC) #1
haraken
LGTM. Needs an approval from an API owner.
7 years, 4 months ago (2013-08-02 13:39:52 UTC) #2
arv (Not doing code reviews)
LGTM You have a typo in the CL description. The argument is mandatory _in_ Firefox
7 years, 4 months ago (2013-08-02 14:03:02 UTC) #3
tkent
lgtm > LayoutTests/fast/html/select-element-item-argument.html It should be in fast/dom/HTMLSelectElement/ or fast/forms/select/.
7 years, 4 months ago (2013-08-04 22:30:11 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@sisa.samsung.com/21834002/11001
7 years, 4 months ago (2013-08-05 06:50:52 UTC) #5
commit-bot: I haz the power
7 years, 4 months ago (2013-08-05 08:17:23 UTC) #6
Message was sent while issue was closed.
Change committed as 155515

Powered by Google App Engine
This is Rietveld 408576698