Bug 71987 - Only HTMLAllCollection needs stateful named item traversal.
Summary: Only HTMLAllCollection needs stateful named item traversal.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 18:22 PST by Andreas Kling
Modified: 2011-11-13 06:54 PST (History)
7 users (show)

See Also:


Attachments
Proposed patch (9.95 KB, patch)
2011-11-09 18:28 PST, Andreas Kling
kling: review-
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Same patch rebased. (9.97 KB, patch)
2011-11-11 07:24 PST, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2011-11-09 18:22:41 PST
Following the removal of the ability to call collections bug 67579, only HTMLAllCollection (document.all) needs the nextNamedItem() mechanism to iterate over all the named items in the collection.

Assuming that we don't intend to reintroduce the removed functionality, we could move this complexity to HTMLAllCollection and simplify both HTMLCollection and HTMLFormCollection.
Comment 1 Andreas Kling 2011-11-09 18:28:38 PST
Created attachment 114416 [details]
Proposed patch
Comment 2 WebKit Review Bot 2011-11-09 18:39:33 PST
Comment on attachment 114416 [details]
Proposed patch

Attachment 114416 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10394182
Comment 3 Andreas Kling 2011-11-09 18:44:18 PST
(In reply to comment #2)
> (From update of attachment 114416 [details])
> Attachment 114416 [details] did not pass chromium-ews (chromium-xvfb):
> Output: http://queues.webkit.org/results/10394182

D'oh, I see Chromium still allows calling any collection. Adding some Google guys to see if they're interested in taking the same direction with the V8 bindings.
Comment 4 Andreas Kling 2011-11-09 18:53:16 PST
Comment on attachment 114416 [details]
Proposed patch

Removing r?, since this obviously can't land with V8 bindings still using HTMLCollection::nextNamedItem().
Comment 5 anton muhin 2011-11-10 01:03:23 PST
I am personally too off the spec related things to provide any meaningful judgement on this.  But if there is a consensus it's a good idea to experiment with, I think all WebKit-based browsers should support this.

Adam, Eric, WDYT?  Should we loop in someone else, say, Dmitry?

(In reply to comment #4)
> (From update of attachment 114416 [details])
> Removing r?, since this obviously can't land with V8 bindings still using HTMLCollection::nextNamedItem().
Comment 6 Adam Barth 2011-11-10 09:04:52 PST
IMHO, V8 should match JSC's new behavior.  The callability of these interfaces is just for compatibility.
Comment 7 Andreas Kling 2011-11-10 12:48:50 PST
(In reply to comment #6)
> IMHO, V8 should match JSC's new behavior.  The callability of these interfaces is just for compatibility.

Righty-o, I filed bug 72045 to remove this from the V8 bindings. :)
Comment 8 Andreas Kling 2011-11-11 07:24:23 PST
Created attachment 114696 [details]
Same patch rebased.

Okay, let's try again now that calling HTMLCollections is no longer possible via V8 bindings.
Comment 9 Antti Koivisto 2011-11-12 04:16:39 PST
Comment on attachment 114696 [details]
Same patch rebased.

r=me
Comment 10 Andreas Kling 2011-11-13 06:54:54 PST
Committed r100090: <http://trac.webkit.org/changeset/100090>