зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
5227869544
Коммит
b97748c3a1
|
@ -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
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче