bug 454502: prbool issues in html parser. r+sr=mrbkap

This commit is contained in:
Taras Glek 2008-09-09 17:42:04 -07:00
parent e8ffa77fe0
commit 15ba12b39c
4 changed files with 6 additions and 6 deletions

View File

@ -2245,7 +2245,7 @@ CNavDTD::CanPropagate(eHTMLTags aParent, eHTMLTags aChild,
result = PR_FALSE;
}
} else {
result = aParentContains;
result = !!aParentContains;
}

View File

@ -182,7 +182,7 @@ Driver_HandleStartDoctypeDecl(void *aUserData,
NS_ASSERTION(aUserData, "expat driver should exist");
if (aUserData) {
static_cast<nsExpatDriver*>(aUserData)->
HandleStartDoctypeDecl(aDoctypeName, aSysid, aPubid, aHasInternalSubset);
HandleStartDoctypeDecl(aDoctypeName, aSysid, aPubid, !!aHasInternalSubset);
}
}

View File

@ -561,7 +561,7 @@ nsHTMLTokenizer::ConsumeTag(PRUnichar aChar,
// XML allows non ASCII tag names, consume this as an end tag. This
// is needed to make XML view source work
PRBool isXML = mFlags & NS_IPARSER_FLAG_XML;
PRBool isXML = !!(mFlags & NS_IPARSER_FLAG_XML);
if (nsCRT::IsAsciiAlpha(theNextChar) ||
kGreaterThan == theNextChar ||
(isXML && !nsCRT::IsAscii(theNextChar))) {
@ -597,7 +597,7 @@ nsHTMLTokenizer::ConsumeTag(PRUnichar aChar,
default:
// XML allows non ASCII tag names, consume this as a start tag.
PRBool isXML = mFlags & NS_IPARSER_FLAG_XML;
PRBool isXML = !!(mFlags & NS_IPARSER_FLAG_XML);
if (nsCRT::IsAsciiAlpha(aChar) ||
(isXML && !nsCRT::IsAscii(aChar))) {
// Get the original "<" (we've already seen it with a Peek)

View File

@ -86,11 +86,11 @@ public:
PRBool IsXMLLetter(PRUnichar aChar)
{
return MOZ_XMLIsLetter(reinterpret_cast<const char*>(&aChar));
return !!MOZ_XMLIsLetter(reinterpret_cast<const char*>(&aChar));
}
PRBool IsXMLNCNameChar(PRUnichar aChar)
{
return MOZ_XMLIsNCNameChar(reinterpret_cast<const char*>(&aChar));
return !!MOZ_XMLIsNCNameChar(reinterpret_cast<const char*>(&aChar));
}
PRUint32 DecodeEntity(const PRUnichar* aStart, const PRUnichar* aEnd,
const PRUnichar** aNext, PRUnichar* aResult)