HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements: - https://dom.spec.whatwg.org/#dom-htmlcollection-nameditem Our slow path which relies on HTMLCollection::updateNamedElementCache() does the right thing. However, we have a fast path in CachedHTMLCollection<HTMLCollectionClass, traversalType>::namedItem() that is missing a check. Firefox and Chrome both behave correctly here.
Created attachment 285119 [details] Patch
Comment on attachment 285119 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285119&action=review > LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-getElementsByTagName-expected.txt:11 > +FAIL hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames assert_true: desc.configurable expected true got false This is due to https://bugs.webkit.org/show_bug.cgi?id=160457
Comment on attachment 285119 [details] Patch Clearing flags on attachment: 285119 Committed r204034: <http://trac.webkit.org/changeset/204034>
All reviewed patches have been landed. Closing bug.