RESOLVED FIXED 119722
NodeList.item() does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119722
Summary NodeList.item() does not behave according to specification
Ryosuke Niwa
Reported 2013-08-12 20:52:48 PDT
NodeList.item() does not behave according to specification: http://dom.spec.whatwg.org/#nodelist Namely, we should not throw if the index is negative (meaning we should drop the [IsIndex] extended attribute) and the argument should be mandatory. This behavior is consistent with both IE10 and Firefox. http://crbug.com/237739
Attachments
Patch (6.69 KB, patch)
2013-08-13 03:18 PDT, Chris Dumez
darin: review+
commit-queue: commit-queue-
Patch for landing (6.36 KB, patch)
2013-08-13 09:46 PDT, Chris Dumez
no flags
Ryosuke Niwa
Comment 1 2013-08-12 20:53:20 PDT
https://chromium.googlesource.com/chromium/blink/+/772a8f92ccdcf997ebfbbcf185132a050e8132aa Also see 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()).
Chris Dumez
Comment 2 2013-08-13 03:18:58 PDT
WebKit Commit Bot
Comment 3 2013-08-13 09:14:53 PDT
Comment on attachment 208613 [details] Patch Rejecting attachment 208613 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 208613, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: /git.webkit.org/WebKit 9081187..7340ea8 master -> origin/master Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 154002 = 9081187b8639b6f28cfbdabe2544c85eac8cf3cb r154003 = 7340ea89c2ddbcae7bef8b4b5870187f14bec550 Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: http://webkit-queues.appspot.com/results/1447645
Chris Dumez
Comment 4 2013-08-13 09:46:16 PDT
Created attachment 208645 [details] Patch for landing
WebKit Commit Bot
Comment 5 2013-08-13 10:57:46 PDT
Comment on attachment 208645 [details] Patch for landing Clearing flags on attachment: 208645 Committed r154012: <http://trac.webkit.org/changeset/154012>
WebKit Commit Bot
Comment 6 2013-08-13 10:57:50 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.