Backout previous checkin/fix for 46209 & 22227 since in some instances
the frame data it relies on does not contain valid info. This causes data loss in some cases like when making text bold. a=granrose git-svn-id: svn://10.0.0.236/trunk@74816 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -7160,6 +7160,7 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode,
|
||||
nsCOMPtr<nsIDOMCharacterData>nodeAsText;
|
||||
nodeAsText = do_QueryInterface(node);
|
||||
nodeAsText->GetLength(&length);
|
||||
#ifdef NOT_QUITE_READY_FOR_PRIMETIME
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
res = GetSelectionController(getter_AddRefs(selCon));
|
||||
if (NS_FAILED(res)) return res;
|
||||
@@ -7177,6 +7178,9 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode,
|
||||
*outIsEmptyNode = PR_FALSE;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (length) *outIsEmptyNode = PR_FALSE;
|
||||
#endif
|
||||
}
|
||||
else // an editable, non-text node. we aren't an empty block
|
||||
{
|
||||
|
||||
@@ -7160,6 +7160,7 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode,
|
||||
nsCOMPtr<nsIDOMCharacterData>nodeAsText;
|
||||
nodeAsText = do_QueryInterface(node);
|
||||
nodeAsText->GetLength(&length);
|
||||
#ifdef NOT_QUITE_READY_FOR_PRIMETIME
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
res = GetSelectionController(getter_AddRefs(selCon));
|
||||
if (NS_FAILED(res)) return res;
|
||||
@@ -7177,6 +7178,9 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode,
|
||||
*outIsEmptyNode = PR_FALSE;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (length) *outIsEmptyNode = PR_FALSE;
|
||||
#endif
|
||||
}
|
||||
else // an editable, non-text node. we aren't an empty block
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user