From 47730b5d52fbe92e4a656d6a75970ca70411c949 Mon Sep 17 00:00:00 2001 From: "jfrancis%netscape.com" Date: Fri, 18 Feb 2000 01:10:21 +0000 Subject: [PATCH] fix for: 26624 - lists and inline style dont get along r=sfraser; a=rickg git-svn-id: svn://10.0.0.236/trunk@61265 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsHTMLEditRules.cpp | 15 +++++++++++---- mozilla/editor/libeditor/html/nsHTMLEditRules.cpp | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/mozilla/editor/base/nsHTMLEditRules.cpp b/mozilla/editor/base/nsHTMLEditRules.cpp index 78fb07f2186..3b55b712736 100644 --- a/mozilla/editor/base/nsHTMLEditRules.cpp +++ b/mozilla/editor/base/nsHTMLEditRules.cpp @@ -1675,11 +1675,18 @@ nsHTMLEditRules::IsEmptyNode( nsIDOMNode *aNode, // is it the node we are iterating over? if (node.get() == aNode) break; // is it a moz-BR and did the caller ask us not to consider those relevant? - if (!(aMozBRDoesntCount && nsHTMLEditUtils::IsMozBR(node))) + if (!(aMozBRDoesntCount && nsHTMLEditUtils::IsMozBR(node))) { - // otherwise it ain't empty - *outIsEmptyNode = PR_FALSE; - break; + // is it an empty node of some sort? + PRBool isEmptyNode; + res = IsEmptyNode(node, &isEmptyNode, aMozBRDoesntCount, aListItemsNotEmpty); + if (NS_FAILED(res)) return res; + if (!isEmptyNode) + { + // otherwise it ain't empty + *outIsEmptyNode = PR_FALSE; + break; + } } } } diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index 78fb07f2186..3b55b712736 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -1675,11 +1675,18 @@ nsHTMLEditRules::IsEmptyNode( nsIDOMNode *aNode, // is it the node we are iterating over? if (node.get() == aNode) break; // is it a moz-BR and did the caller ask us not to consider those relevant? - if (!(aMozBRDoesntCount && nsHTMLEditUtils::IsMozBR(node))) + if (!(aMozBRDoesntCount && nsHTMLEditUtils::IsMozBR(node))) { - // otherwise it ain't empty - *outIsEmptyNode = PR_FALSE; - break; + // is it an empty node of some sort? + PRBool isEmptyNode; + res = IsEmptyNode(node, &isEmptyNode, aMozBRDoesntCount, aListItemsNotEmpty); + if (NS_FAILED(res)) return res; + if (!isEmptyNode) + { + // otherwise it ain't empty + *outIsEmptyNode = PR_FALSE; + break; + } } } }