From 4554a01d45f7ac119bb1d16ad05e1deda4eb368f Mon Sep 17 00:00:00 2001 From: "kin%netscape.com" Date: Wed, 26 Jul 2000 18:52:59 +0000 Subject: [PATCH] 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 --- mozilla/editor/base/nsHTMLEditor.cpp | 4 ++++ mozilla/editor/libeditor/html/nsHTMLEditor.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mozilla/editor/base/nsHTMLEditor.cpp b/mozilla/editor/base/nsHTMLEditor.cpp index 0cb79b4b6ae..0701409ee0e 100644 --- a/mozilla/editor/base/nsHTMLEditor.cpp +++ b/mozilla/editor/base/nsHTMLEditor.cpp @@ -7160,6 +7160,7 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode, nsCOMPtrnodeAsText; nodeAsText = do_QueryInterface(node); nodeAsText->GetLength(&length); +#ifdef NOT_QUITE_READY_FOR_PRIMETIME nsCOMPtr 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 { diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp index 0cb79b4b6ae..0701409ee0e 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp @@ -7160,6 +7160,7 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode, nsCOMPtrnodeAsText; nodeAsText = do_QueryInterface(node); nodeAsText->GetLength(&length); +#ifdef NOT_QUITE_READY_FOR_PRIMETIME nsCOMPtr 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 {