mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
thank heavens i'm paranoid, or i wouldn't have found prob with ancient patch
This commit is contained in:
parent
9af01acf22
commit
dd6f59dd19
@ -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…
Reference in New Issue
Block a user