You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/05/29 19:27:02 UTC
[jira] Resolved: (XERCESJ-525) HTMLTableRowElement.cloneNode() incorrectly copies _cells
Message:
The following issue has been resolved as FIXED.
Resolver: Michael Glavassevich
Date: Sat, 29 May 2004 10:26 AM
Aaron, thanks for submitting patches for this problem and also for providing a test case which made the patches much easier to assess. I've committed them to CVS.
By the way, there was a small typo in the test case.
HTMLCollection clonedOptions = origSelect.getOptions(); [line 34]
should have been:
HTMLCollection clonedOptions = clonedSelect.getOptions();
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESJ-525
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESJ-525
Summary: HTMLTableRowElement.cloneNode() incorrectly copies _cells
Type: Bug
Status: Resolved
Resolution: FIXED
Project: Xerces2-J
Components:
DOM
Versions:
2.2.0
Assignee: Michael Glavassevich
Reporter: Brett Sutton
Created: Sat, 23 Nov 2002 3:56 AM
Updated: Sat, 29 May 2004 10:26 AM
Environment: Operating System: All
Platform: All
Description:
If you attempt to clone (deep) an existing row the _cells private member
variable is also cloned. The problem is that (provided _cells has been
initialised by a call to getCells()) _cells points to the original row. Any
future calls to getCells() on the new row will return the cell information
from the original row.
Suggested fix:
During the call to cloneNode() _cells should be set to null. The next call to
getCells() will then correctly initialise it.
Implement HTMLTableRowElement.cloneNode(boolean deep) as follows:
public Node HTMLTableRowElement.cloneNode(boolean deep)
{
Node newNode = super.cloneNode(deep);
newNode._cells = null;
return newNode;
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org