Fixes a crash when hitting backspace in Composer

b=167543, r=timeless, sr=kin
This commit is contained in:
glazman%netscape.com 2002-09-20 08:57:04 +00:00
Родитель 35c402e98b
Коммит 214b77c7f5
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2295,8 +2295,8 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, P
htmlElement = do_QueryInterface(tmp); htmlElement = do_QueryInterface(tmp);
// look at parent if the queried color is transparent and if the node to // look at parent if the queried color is transparent and if the node to
// examine is not the root of the document // examine is not the root of the document
} while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && !htmlElement ); } while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && htmlElement );
if (htmlElement && aOutColor.Equals(NS_LITERAL_STRING("transparent"))) { if (!htmlElement && aOutColor.Equals(NS_LITERAL_STRING("transparent"))) {
// we have hit the root of the document and the color is still 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 // Grumble... Let's look at the default background color because that's the
// color we are looking for // color we are looking for
@ -2333,7 +2333,7 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, P
if (NS_FAILED(res)) return res; if (NS_FAILED(res)) return res;
nodeToExamine = tmp; nodeToExamine = tmp;
htmlElement = do_QueryInterface(tmp); htmlElement = do_QueryInterface(tmp);
} while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && !htmlElement ); } while ( aOutColor.Equals(NS_LITERAL_STRING("transparent")) && htmlElement );
} }
return NS_OK; return NS_OK;
} }