From 214b77c7f52e218453857a8741b0cd29992f4633 Mon Sep 17 00:00:00 2001 From: "glazman%netscape.com" Date: Fri, 20 Sep 2002 08:57:04 +0000 Subject: [PATCH] Fixes a crash when hitting backspace in Composer b=167543, r=timeless, sr=kin --- editor/libeditor/html/nsHTMLEditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index 7a4cbb7e3c2..44fc0172f03 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -2295,8 +2295,8 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, P htmlElement = do_QueryInterface(tmp); // look at parent if the queried color is transparent and if the node to // examine is not the root of the document - } while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && !htmlElement ); - if (htmlElement && aOutColor.Equals(NS_LITERAL_STRING("transparent"))) { + } while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && htmlElement ); + if (!htmlElement && aOutColor.Equals(NS_LITERAL_STRING("transparent"))) { // we have hit the root of the document and the color is still transparent ! // Grumble... Let's look at the default background color because that's the // color we are looking for @@ -2333,7 +2333,7 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, P if (NS_FAILED(res)) return res; nodeToExamine = tmp; htmlElement = do_QueryInterface(tmp); - } while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && !htmlElement ); + } while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && htmlElement ); } return NS_OK; }