Bug 19759 - Needs test: ChildNodeList for an attribute node is not properly invalidated after appending a child.
Summary: Needs test: ChildNodeList for an attribute node is not properly invalidated a...
Status: RESOLVED DUPLICATE of bug 33850
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.4
: P4 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 18:14 PDT by Chris Brichford
Modified: 2010-06-18 17:16 PDT (History)
1 user (show)

See Also:


Attachments
Test case (520 bytes, text/html)
2008-06-24 18:15 PDT, Chris Brichford
no flags Details
Improved test case (638 bytes, text/html)
2008-06-24 18:19 PDT, Chris Brichford
no flags Details
Another version of the test case (927 bytes, text/html)
2008-06-24 20:41 PDT, Chris Brichford
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Brichford 2008-06-24 18:14:20 PDT
The length property of a ChildNodeList for an attribute node does not change after append a new text node to the attribute node.
Comment 1 Chris Brichford 2008-06-24 18:15:17 PDT
Created attachment 21919 [details]
Test case
Comment 2 Chris Brichford 2008-06-24 18:19:06 PDT
Created attachment 21920 [details]
Improved test case
Comment 3 Chris Brichford 2008-06-24 18:21:37 PDT
FireFox ( v2 and v3) throws an exception when appendChild on the attribute node in the attached test case.
Comment 4 Chris Brichford 2008-06-24 20:41:43 PDT
Created attachment 21921 [details]
Another version of the test case

This test case demonstrates that accessing the length property of the ChildNodeList before the call to appendChild changes the value of the length property after the call to appendChild.
Comment 5 Alexey Proskuryakov 2008-06-25 02:51:02 PDT
Confirming, because this is formally a bug, but it seems to be quite low priority, given that there is now known content affected, that Firefox doesn't support this, and that there are talks of deprecating attribute nodes in HTML DOM altogether.
Comment 6 Chris Brichford 2008-06-25 09:28:25 PDT
(In reply to comment #5)
> Confirming, because this is formally a bug, but it seems to be quite low
> priority, given that there is now known content affected, that Firefox doesn't
> support this, and that there are talks of deprecating attribute nodes in HTML
> DOM altogether.
> 

Fair enough.  I entered this bug because one our internal unit tests was failing.
Comment 7 Alexey Proskuryakov 2010-06-17 11:47:18 PDT
This was fixed in bug 33850, but it would be nice to land this version of test case.
Comment 8 Alexey Proskuryakov 2010-06-18 17:16:55 PDT
Landed the test in <http://trac.webkit.org/changeset/61457>.

*** This bug has been marked as a duplicate of bug 33850 ***