mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
during CloneAttributes, delete all the nodes attached (not half of them); discovered when fixing bug #14750; r=kin@netscape.com
This commit is contained in:
parent
6e77f99f56
commit
e727552d0d
@ -1507,7 +1507,8 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode)
|
||||
// Clear existing attributes
|
||||
for (i = 0; i < destCount; i++)
|
||||
{
|
||||
if( NS_SUCCEEDED(destAttributes->Item(i, &attrNode)) && attrNode)
|
||||
// always remove item number 0 (first item in list)
|
||||
if( NS_SUCCEEDED(destAttributes->Item(0, &attrNode)) && attrNode)
|
||||
{
|
||||
nsCOMPtr<nsIDOMAttr> destAttribute = do_QueryInterface(attrNode);
|
||||
if (destAttribute)
|
||||
|
@ -1507,7 +1507,8 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode)
|
||||
// Clear existing attributes
|
||||
for (i = 0; i < destCount; i++)
|
||||
{
|
||||
if( NS_SUCCEEDED(destAttributes->Item(i, &attrNode)) && attrNode)
|
||||
// always remove item number 0 (first item in list)
|
||||
if( NS_SUCCEEDED(destAttributes->Item(0, &attrNode)) && attrNode)
|
||||
{
|
||||
nsCOMPtr<nsIDOMAttr> destAttribute = do_QueryInterface(attrNode);
|
||||
if (destAttribute)
|
||||
|
Loading…
x
Reference in New Issue
Block a user