DynamicNodeList and HTMLCollection implement very similar features. We should be able to share more code between two classes.
Actually, they don't share no code at the moment :(
http://trac.webkit.org/changeset/123281 completed this work.