[Webkit-unassigned] [Bug 9508] JavaScript Comparing a form element group to itself returns false.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 31 23:56:19 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=9508





------- Comment #14 from darin at apple.com  2007-01-31 23:56 PDT -------
(In reply to comment #13)
> I started working on a new patch based on your suggestions. I understood most
> of what you said, but one thing I'm not completely clear on is that the
> DOMNamedNodesCollection should hold a refptr to the node which created it. How
> would I be able to access that in JSHTMLCollection::getNamedItems given that it
> can be called either via the nameGetter or from JSHTMLFormElement? In the
> latter case, the JSHTMLCollection created is just a temp object. 

I see what you mean. I think what I really meant is a RefPtr to the
HTMLCollection, and use that as part of the key rather than the first node
pointer.

> And even then, I'm not quite sure why that would be needed to prevent aliasing.
> The individual nodes that make up the form element group won't be destroyed
> throughout the life of the document, correct?

Someone could change the nodes around with JavaScript DOM operations. For
example, the name attribute of an element could be changed or it could be
removed from the document or moved into another form.

I think we need to test how the other browsers behave in cases like that. Does
the collection automatically change to reflect changes to the document? Or
what?

> It could have hashed just the Node pointer to the first element,
> and that would be that.

Maybe we can get away with just hashing the node pointer to the first element.
I think it depends on the results of the testing I'm suggesting above.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list