https://github.com/whatwg/html/issues/775 https://github.com/whatwg/html/pull/780 https://html.spec.whatwg.org/multipage/infrastructure.html#the-htmlallcollection-interface (not updated at the time of writing) HTMLAllCollection will change in the spec in response to feedback from the Edge team. It looks like a feasible change, but to play it safe use counters will be added to see if some of the small differences matter.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/69256151c9e821963929cf29a778b5df66027023 commit 69256151c9e821963929cf29a778b5df66027023 Author: philipj <philipj@opera.com> Date: Sun Mar 06 05:08:09 2016 Measure the many aspects of HTMLAllCollection Multiple spec changes to HTMLAllCollection are under discussion: https://github.com/whatwg/html/issues/775 https://github.com/whatwg/html/pull/780 To help inform the discussion and estimate risk, measure some of the aspects that are currently not per spec, as well as a few extra bits for comparison purposes. BUG=591605 Review URL: https://codereview.chromium.org/1756963002 Cr-Commit-Position: refs/heads/master@{#379484} [add] https://crrev.com/69256151c9e821963929cf29a778b5df66027023/third_party/WebKit/LayoutTests/fast/dom/document-all-use-counters.html [modify] https://crrev.com/69256151c9e821963929cf29a778b5df66027023/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLAllCollectionCustom.cpp [modify] https://crrev.com/69256151c9e821963929cf29a778b5df66027023/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/69256151c9e821963929cf29a778b5df66027023/tools/metrics/histograms/histograms.xml
Tests have been added for a number of edge cases: - https://github.com/w3c/web-platform-tests/pull/7254 - http://w3c-test.org/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html The spec at https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#htmlallcollection is all updated these days, BTW.
Unassigning to make it clear I'm not really working on this, and it would be good if someone else did.
I am working on this issue. Thanks!
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9 commit 73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9 Author: Bhagirathi Satpathy <bhagirathi.s@samsung.com> Date: Mon Jan 15 16:52:40 2018 Modify Document |All| namedItem return type from NodeList to HTMLCollection Document |All| namedItem should return HTMLCollection object instead of NodeList as per the specification. https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#the-htmlallcollection-interface Bug: 591605 Change-Id: I12caff08805c04f0ee081dbd69c7097806d58020 Reviewed-on: https://chromium-review.googlesource.com/846560 Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Bhagirathi Satpathy <bhagirathi.s@samsung.com> Cr-Commit-Position: refs/heads/master@{#529298} [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/LayoutTests/external/wpt/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-collections-expected.txt [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/LayoutTests/http/tests/devtools/startup/console/console-format-startup-expected.txt [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/bindings/core/v8/BUILD.gn [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/dom/Document.cpp [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/dom/Document.h [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/BUILD.gn [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/CollectionType.h [add] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/DocumentAllNameCollection.cpp [add] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/DocumentAllNameCollection.h [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/HTMLAllCollection.cpp [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/HTMLAllCollection.h [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/HTMLAllCollection.idl [modify] https://crrev.com/73978ca7f782a3ddde8c31bcc6cc3ea45eea0ee9/third_party/WebKit/Source/core/html/HTMLCollection.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c8b61881673f30d7428164e0f240b4dedadca64f commit c8b61881673f30d7428164e0f240b4dedadca64f Author: Bhagirathi Satpathy <bhagirathi.s@samsung.com> Date: Tue Jan 23 03:49:17 2018 Modified document.all.item method return type to HTMLCollection object This patch contains 1. document.all.item should return null object instead of undefined for invalid name. 2. Modified |item| method return type to HTMLCollection object instead of NodeList as per the specification. https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#the-htmlallcollection-interface Bug: 591605 Change-Id: I9b7c6166a55445f9dac9f0c947cb307efc2d3442 Reviewed-on: https://chromium-review.googlesource.com/875579 Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Bhagirathi Satpathy <bhagirathi.s@samsung.com> Cr-Commit-Position: refs/heads/master@{#531148} [modify] https://crrev.com/c8b61881673f30d7428164e0f240b4dedadca64f/third_party/WebKit/LayoutTests/external/wpt/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt [modify] https://crrev.com/c8b61881673f30d7428164e0f240b4dedadca64f/third_party/WebKit/LayoutTests/fast/dom/collection-null-like-arguments-expected.txt [modify] https://crrev.com/c8b61881673f30d7428164e0f240b4dedadca64f/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLAllCollectionCustom.cpp [modify] https://crrev.com/c8b61881673f30d7428164e0f240b4dedadca64f/third_party/WebKit/Source/core/html/HTMLAllCollection.idl
Comment 1 by bugdroid1@chromium.org
, Mar 6 2016