thank heavens i'm paranoid, or i wouldn't have found prob with ancient patch
git-svn-id: svn://10.0.0.236/trunk@86534 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8944a57fe0
commit
f02aa82ffa
@ -2604,14 +2604,16 @@ nsHTMLEditRules::CreateStyleForInsertText(nsISelection *aSelection, nsIDOMDocume
|
||||
res = mHTMLEditor->SplitStyleAbovePoint(address_of(node), &offset, item->tag, &item->attr, address_of(leftNode), address_of(rightNode));
|
||||
if (NS_FAILED(res)) return res;
|
||||
PRBool bIsEmptyNode;
|
||||
mHTMLEditor->IsEmptyNode(leftNode, &bIsEmptyNode, PR_FALSE, PR_TRUE);
|
||||
if (bIsEmptyNode)
|
||||
if (leftNode)
|
||||
{
|
||||
// delete leftNode if it became empty
|
||||
res = mEditor->DeleteNode(leftNode);
|
||||
if (NS_FAILED(res)) return res;
|
||||
mHTMLEditor->IsEmptyNode(leftNode, &bIsEmptyNode, PR_FALSE, PR_TRUE);
|
||||
if (bIsEmptyNode)
|
||||
{
|
||||
// delete leftNode if it became empty
|
||||
res = mEditor->DeleteNode(leftNode);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
}
|
||||
|
||||
if (rightNode)
|
||||
{
|
||||
res = mHTMLEditor->GetLeftmostChild(rightNode, getter_AddRefs(secondSplitParent));
|
||||
|
||||
@ -2604,14 +2604,16 @@ nsHTMLEditRules::CreateStyleForInsertText(nsISelection *aSelection, nsIDOMDocume
|
||||
res = mHTMLEditor->SplitStyleAbovePoint(address_of(node), &offset, item->tag, &item->attr, address_of(leftNode), address_of(rightNode));
|
||||
if (NS_FAILED(res)) return res;
|
||||
PRBool bIsEmptyNode;
|
||||
mHTMLEditor->IsEmptyNode(leftNode, &bIsEmptyNode, PR_FALSE, PR_TRUE);
|
||||
if (bIsEmptyNode)
|
||||
if (leftNode)
|
||||
{
|
||||
// delete leftNode if it became empty
|
||||
res = mEditor->DeleteNode(leftNode);
|
||||
if (NS_FAILED(res)) return res;
|
||||
mHTMLEditor->IsEmptyNode(leftNode, &bIsEmptyNode, PR_FALSE, PR_TRUE);
|
||||
if (bIsEmptyNode)
|
||||
{
|
||||
// delete leftNode if it became empty
|
||||
res = mEditor->DeleteNode(leftNode);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
}
|
||||
|
||||
if (rightNode)
|
||||
{
|
||||
res = mHTMLEditor->GetLeftmostChild(rightNode, getter_AddRefs(secondSplitParent));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user