Summary: | Incorrect behavior for HTMLCollection.prototype.item(someString) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Boris Zbarsky <bzbarsky> | ||||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, ap, arv, japhet, kling, Ms2ger, ojan, rniwa, sam, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Boris Zbarsky
2011-12-13 17:29:47 PST
> Gecko and Presto both get this right. This behavior was implemented in bug 11078 precisely to match Gecko and Presto (and document.all.item(someString) still works in Firefox 8.0.1). It might have gotten unintentionally extended to other versions of item() with code refactorings over the years. We should investigate which versions of item() need to fall back to namedItem(). Yeah, document.all is not an HTMLCollection and has completely different item() behavior in Firefox. Per HTML5 spec, it's an HTMLCollection, though. The spec probably needs fixing. *** Bug 74546 has been marked as a duplicate of this bug. *** Created attachment 123898 [details]
Patch
Comment on attachment 123898 [details]
Patch
This didn't cause any other tests to fail? Do we know the history of this code? Why does WebKit have this behavior?
Comment on attachment 123898 [details]
Patch
Ah, I see that Alexey answered that question above.
Comment on attachment 123898 [details] Patch Clearing flags on attachment: 123898 Committed r105870: <http://trac.webkit.org/changeset/105870> All reviewed patches have been landed. Closing bug. |