diff --git a/mozilla/htmlparser/src/nsHTMLTokenizer.cpp b/mozilla/htmlparser/src/nsHTMLTokenizer.cpp index d01bd59e9f0..e56828bb4f4 100644 --- a/mozilla/htmlparser/src/nsHTMLTokenizer.cpp +++ b/mozilla/htmlparser/src/nsHTMLTokenizer.cpp @@ -768,7 +768,7 @@ void nsHTMLTokenizer::RecordTrailingContent(CStartToken* aStartToken, nsScanner& PRInt32 theOrigin =aStartToken->mOrigin; PRInt32 theCurrOffset =aScanner.GetOffset(); PRInt32 theLength =(theCurrOffset>theOrigin)? theCurrOffset-theOrigin:-1; - if(theLength>1) { + if(theLength>0) { nsString& theRawXXX =aStartToken->mTrailingContent; const PRUnichar* theBuff =(aScanner.GetBuffer()).GetUnicode(); theRawXXX.Append(&theBuff[theOrigin],theLength); diff --git a/mozilla/htmlparser/src/nsHTMLTokens.cpp b/mozilla/htmlparser/src/nsHTMLTokens.cpp index 151f2666703..bc436c2b533 100644 --- a/mozilla/htmlparser/src/nsHTMLTokens.cpp +++ b/mozilla/htmlparser/src/nsHTMLTokens.cpp @@ -266,9 +266,7 @@ void CStartToken::DebugDumpSource(nsOutputStream& out) { void CStartToken::GetSource(nsString& anOutputString){ anOutputString="<"; anOutputString+=mTextValue; - if(mTrailingContent.Length()>0) - anOutputString+=mTrailingContent; - else anOutputString+='>'; + anOutputString+=mTrailingContent; } /* diff --git a/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp b/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp index d01bd59e9f0..e56828bb4f4 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp @@ -768,7 +768,7 @@ void nsHTMLTokenizer::RecordTrailingContent(CStartToken* aStartToken, nsScanner& PRInt32 theOrigin =aStartToken->mOrigin; PRInt32 theCurrOffset =aScanner.GetOffset(); PRInt32 theLength =(theCurrOffset>theOrigin)? theCurrOffset-theOrigin:-1; - if(theLength>1) { + if(theLength>0) { nsString& theRawXXX =aStartToken->mTrailingContent; const PRUnichar* theBuff =(aScanner.GetBuffer()).GetUnicode(); theRawXXX.Append(&theBuff[theOrigin],theLength); diff --git a/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp b/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp index 151f2666703..bc436c2b533 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLTokens.cpp @@ -266,9 +266,7 @@ void CStartToken::DebugDumpSource(nsOutputStream& out) { void CStartToken::GetSource(nsString& anOutputString){ anOutputString="<"; anOutputString+=mTextValue; - if(mTrailingContent.Length()>0) - anOutputString+=mTrailingContent; - else anOutputString+='>'; + anOutputString+=mTrailingContent; } /*