RESOLVED FIXED 92988
itemType[index] must be undefined for out-of-range index
https://bugs.webkit.org/show_bug.cgi?id=92988
Summary itemType[index] must be undefined for out-of-range index
Arko Saha
Reported 2012-08-02 07:10:52 PDT
Fail- itemType[index] must be undefined for out-of-range index assert_equals: expected (undefined) undefined but got (object) null Sample test: test(function () { assert_equals( makeEl('div',{itemtype:' '}).itemType[0], window.undefined ); }, 'itemType[index] must be undefined for out-of-range index'); Expected result: itemTpye[0] should return undefined. Actual: Returns null. makeEl method creates an element <div> with empty itemtype(0 tokens). According to the spec itemtpye attribute is a space-separated list. http://www.whatwg.org/specs/web-apps/current-work/#attr-itemtype We have defined itemtype attribute as : readonly attribute [Conditional=MICRODATA] DOMSettableTokenList itemType; itemType[index] should return undefined for out-of-range index instead of null. IndexedGetter spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties Same issue can also be observed with following attributes: itemref, itemprop
Attachments
Patch (17.19 KB, patch)
2012-08-03 04:39 PDT, Arko Saha
webkit.review.bot: commit-queue-
Archive of layout-test-results from gce-cr-linux-04 (499.91 KB, application/zip)
2012-08-03 05:41 PDT, WebKit Review Bot
no flags
Patch for review (deleted)
2012-08-03 06:50 PDT, Arko Saha
no flags
Updated patch (24.68 KB, patch)
2012-08-03 08:34 PDT, Arko Saha
haraken: review+
webkit.review.bot: commit-queue-
Patch for landing (24.71 KB, patch)
2012-08-06 21:54 PDT, Arko Saha
arko: commit-queue-
Patch_for_landing_1 (21.60 KB, patch)
2012-08-06 22:27 PDT, Arko Saha
no flags
Arko Saha
Comment 1 2012-08-03 04:39:29 PDT
WebKit Review Bot
Comment 2 2012-08-03 05:41:09 PDT
Comment on attachment 156326 [details] Patch Attachment 156326 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13425636 New failing tests: storage/indexeddb/objectstore-basics-workers.html storage/indexeddb/database-basics.html storage/indexeddb/objectstore-basics.html
WebKit Review Bot
Comment 3 2012-08-03 05:41:13 PDT
Created attachment 156336 [details] Archive of layout-test-results from gce-cr-linux-04 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-04 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Arko Saha
Comment 4 2012-08-03 06:50:51 PDT
Created attachment 156358 [details] Patch for review
Kentaro Hara
Comment 5 2012-08-03 07:08:14 PDT
Comment on attachment 156358 [details] Patch for review View in context: https://bugs.webkit.org/attachment.cgi?id=156358&action=review You change is conformed to the spec, but this will break backward compatibility of WebKit. How are Firefox, Opera, IE behave? (Please add the explanation to ChangeLog.) > Source/WebCore/ChangeLog:9 > + Made changes in IndexedGetter property so that it returns undefined for out-of-range > + index. Please add the spec link (http://www.w3.org/TR/WebIDL/#idl-indexed-properties) to ChangeLog.
Arko Saha
Comment 6 2012-08-03 08:34:41 PDT
Created attachment 156388 [details] Updated patch
Arko Saha
Comment 7 2012-08-03 08:37:40 PDT
(In reply to comment #5) > (From update of attachment 156358 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=156358&action=review > > You change is conformed to the spec, but this will break backward compatibility of WebKit. > > How are Firefox, Opera, IE behave? (Please add the explanation to ChangeLog.) Firefox and Opera's behavior is consistent with the spec. Both returns undefined for out-of-range index. Tested on: Firefox: 11.0 Opera: 12.01 > > Source/WebCore/ChangeLog:9 > > + Made changes in IndexedGetter property so that it returns undefined for out-of-range > > + index. > > Please add the spec link (http://www.w3.org/TR/WebIDL/#idl-indexed-properties) to ChangeLog. Done.
Kentaro Hara
Comment 8 2012-08-03 08:47:34 PDT
Comment on attachment 156388 [details] Updated patch Thank you very much for the clarification. Sounds reasonable to make this change. But let's wait to cq+ it for one more day because someone might have concern about breaking the backward compatibility.
Alexey Proskuryakov
Comment 9 2012-08-03 10:33:12 PDT
> > How are Firefox, Opera, IE behave? (Please add the explanation to ChangeLog.) > > Firefox and Opera's behavior is consistent with the spec. Both returns undefined for out-of-range index. > Tested on: > Firefox: 11.0 > Opera: 12.01 Did you provide an answer about IE?
Arko Saha
Comment 10 2012-08-04 08:43:10 PDT
(In reply to comment #9) > Did you provide an answer about IE? Observed the same behavior in IE. It returns undefined for out-of-range index. Tested on IE9.
Ryosuke Niwa
Comment 11 2012-08-06 14:19:06 PDT
Has this patch been landed?
Arko Saha
Comment 12 2012-08-06 21:29:40 PDT
(In reply to comment #11) > Has this patch been landed? I haven't landed the patch as I was waiting to check if anyone has anymore concern. Looks like its ok to land the patch now.
Kentaro Hara
Comment 13 2012-08-06 21:30:15 PDT
Comment on attachment 156388 [details] Updated patch Yes
WebKit Review Bot
Comment 14 2012-08-06 21:32:27 PDT
Comment on attachment 156388 [details] Updated patch Rejecting attachment 156388 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/13441921
Kentaro Hara
Comment 15 2012-08-06 21:33:54 PDT
Comment on attachment 156388 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=156388&action=review > LayoutTests/ChangeLog:5 > + The "Reviewed by" line is needed here. Would you upload the patch again?
Arko Saha
Comment 16 2012-08-06 21:54:58 PDT
Created attachment 156859 [details] Patch for landing
Arko Saha
Comment 17 2012-08-06 22:17:09 PDT
Comment on attachment 156859 [details] Patch for landing Patch for fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html is incorrect.
Arko Saha
Comment 18 2012-08-06 22:27:53 PDT
Created attachment 156865 [details] Patch_for_landing_1
WebKit Review Bot
Comment 19 2012-08-07 00:00:25 PDT
Comment on attachment 156865 [details] Patch_for_landing_1 Clearing flags on attachment: 156865 Committed r124859: <http://trac.webkit.org/changeset/124859>
WebKit Review Bot
Comment 20 2012-08-07 00:00:31 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.