Bug 160456

Summary: HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, dbates, esprehn+autocc, gyuyoung.kim, koivisto, rniwa, sam
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2016-08-02 10:33:17 PDT
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.
Attachments
Patch (5.05 KB, patch)
2016-08-02 10:41 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-08-02 10:41:42 PDT
Chris Dumez
Comment 2 2016-08-02 10:50:17 PDT
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
Chris Dumez
Comment 3 2016-08-02 12:15:02 PDT
Comment on attachment 285119 [details] Patch Clearing flags on attachment: 285119 Committed r204034: <http://trac.webkit.org/changeset/204034>
Chris Dumez
Comment 4 2016-08-02 12:15:08 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.