diff --git a/mozilla/htmlparser/src/nsHTMLTokens.cpp b/mozilla/htmlparser/src/nsHTMLTokens.cpp index 28948a10d11..6bab951d7f1 100644 --- a/mozilla/htmlparser/src/nsHTMLTokens.cpp +++ b/mozilla/htmlparser/src/nsHTMLTokens.cpp @@ -357,7 +357,7 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode) if(NS_OK==result){ nsAutoString buffer; - buffer.Assign(mTextValue, mTextValue.FindCharInSet(" \r\n\t\b",0)); + mTextValue.Left(buffer, mTextValue.FindCharInSet(" \r\n\t\b",0)); mTypeID= nsHTMLTags::LookupTag(buffer); result=aScanner.GetChar(aChar); //eat the closing '>; } diff --git a/mozilla/htmlparser/src/nsXIFDTD.cpp b/mozilla/htmlparser/src/nsXIFDTD.cpp index 474c8c65603..397751ab802 100644 --- a/mozilla/htmlparser/src/nsXIFDTD.cpp +++ b/mozilla/htmlparser/src/nsXIFDTD.cpp @@ -534,7 +534,7 @@ nsresult nsXIFDTD::HandleTextToken(CToken* aToken) { { nsString& temp = aToken->GetStringValueXXX(); - if (temp != "") + if (!temp.Equals("")) { result= AddLeaf(node); } @@ -1308,12 +1308,12 @@ nsresult nsXIFDTD::CollectContentComment(CToken* aToken, nsCParserNode& aNode) { type=(eHTMLTokenTypes)token->GetTokenType(); fragment=token->GetStringValueXXX(); - if(fragment=="content") { + if(fragment.Equals("content")) { if(type==eToken_start) inContent=PR_TRUE; else inContent=PR_FALSE; } - else if(fragment=="comment") { + else if(fragment.Equals("comment")) { comment.Append("-->"); result=(mSink)? mSink->AddComment(aNode):NS_OK; done=PR_TRUE; diff --git a/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp b/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp index 28948a10d11..6bab951d7f1 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp @@ -357,7 +357,7 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode) if(NS_OK==result){ nsAutoString buffer; - buffer.Assign(mTextValue, mTextValue.FindCharInSet(" \r\n\t\b",0)); + mTextValue.Left(buffer, mTextValue.FindCharInSet(" \r\n\t\b",0)); mTypeID= nsHTMLTags::LookupTag(buffer); result=aScanner.GetChar(aChar); //eat the closing '>; } diff --git a/mozilla/parser/htmlparser/src/nsXIFDTD.cpp b/mozilla/parser/htmlparser/src/nsXIFDTD.cpp index 474c8c65603..397751ab802 100644 --- a/mozilla/parser/htmlparser/src/nsXIFDTD.cpp +++ b/mozilla/parser/htmlparser/src/nsXIFDTD.cpp @@ -534,7 +534,7 @@ nsresult nsXIFDTD::HandleTextToken(CToken* aToken) { { nsString& temp = aToken->GetStringValueXXX(); - if (temp != "") + if (!temp.Equals("")) { result= AddLeaf(node); } @@ -1308,12 +1308,12 @@ nsresult nsXIFDTD::CollectContentComment(CToken* aToken, nsCParserNode& aNode) { type=(eHTMLTokenTypes)token->GetTokenType(); fragment=token->GetStringValueXXX(); - if(fragment=="content") { + if(fragment.Equals("content")) { if(type==eToken_start) inContent=PR_TRUE; else inContent=PR_FALSE; } - else if(fragment=="comment") { + else if(fragment.Equals("comment")) { comment.Append("-->"); result=(mSink)? mSink->AddComment(aNode):NS_OK; done=PR_TRUE;