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 bu...@apache.org on 2003/04/07 01:53:13 UTC
DO NOT REPLY [Bug 18744] New: -
HTMLTableElementImpl.deleteRow will only delete the zeroth row.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18744>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18744
HTMLTableElementImpl.deleteRow will only delete the zeroth row.
Summary: HTMLTableElementImpl.deleteRow will only delete the
zeroth row.
Product: Xerces2-J
Version: 2.4.0
Platform: All
OS/Version: Other
Status: NEW
Severity: Major
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: bsutton@noojee.com.au
The implementation of TableElementImpl seems to have lost a single line which
is responsible for decrementing the passed index until the correct row has
been found. The result is that only the first (index = 0) row can be deleted.
Attempts to delete any other row silently fail.
The suggested fix is:
source: org.apache.html.dom.HTMLTableElementImpl
public synchronized void deleteRow( int index )
{
Node child;
child = getFirstChild();
while ( child != null )
{
if ( child instanceof HTMLTableRowElement )
{
if ( index == 0 )
{
removeChild ( child );
return;
}
// This is the bug fix. Existing version has omitted this line.
index--;
}
else
if ( child instanceof HTMLTableSectionElementImpl )
{
index = ( (HTMLTableSectionElementImpl) child ).deleteRowX(
index );
if ( index < 0 )
return;
}
child = child.getNextSibling();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org