From 9b0af40604fe2df78d9ce3c0c4894c981273956c Mon Sep 17 00:00:00 2001 From: "shanjian%netscape.com" Date: Thu, 4 Apr 2002 02:43:17 +0000 Subject: [PATCH] put my previous patch back in. This patch does not seem like cause any regression in txul. git-svn-id: svn://10.0.0.236/trunk@118074 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/nsParser.cpp | 176 ++++++++++----------- mozilla/parser/htmlparser/src/nsParser.cpp | 176 ++++++++++----------- 2 files changed, 160 insertions(+), 192 deletions(-) diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index c5d2d0e86bb..bd1d35dab90 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -2121,7 +2121,6 @@ nsParser::DetectMetaTag(const char* aBytes, nsString& aCharset, PRInt32& aCharsetSource) { - PRBool foundContentType = PR_FALSE; aCharsetSource= kCharsetFromMetaTag; aCharset.SetLength(0); @@ -2139,107 +2138,92 @@ nsParser::DetectMetaTag(const char* aBytes, str.BeginReading(begin); str.EndReading(end); - nsReadingIterator tagStart(begin); - nsReadingIterator tagEnd(end); - nsReadingIterator ltPos; + nsReadingIterator currPos(begin); + nsReadingIterator tokEnd; + nsReadingIterator tagEnd(begin); - - while (tagStart != end) { - if (FindCharInReadable('<', tagStart, end)) { - ltPos = tagEnd = tagStart; - if (GetNextChar(ltPos, end) == '!' && - GetNextChar(ltPos, end) == '-' && - GetNextChar(ltPos, end) == '-') { - // Found MDO (