Landing fix for bug 235798. Ignore Internet Explorer conditional comments parsed in document prologue. Patch by mrbkap@rice.edu, r=dbaron@dbaron.org, sr=jst@mozilla.org

git-svn-id: svn://10.0.0.236/trunk@162480 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com 2004-09-17 00:16:48 +00:00
parent 6f45d28987
commit d44ec428a0

View File

@ -730,15 +730,14 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
if (theIndex == kNotFound) break;
PRUnichar nextChar = aBuffer.CharAt(theIndex+1);
if (nextChar == PRUnichar('!')) {
PRInt32 tmpIndex = theIndex;
PRInt32 tmpIndex = theIndex + 2;
if (kNotFound !=
(theIndex=aBuffer.Find("DOCTYPE", PR_TRUE, theIndex+2, 1))) {
(theIndex=aBuffer.Find("DOCTYPE", PR_TRUE, tmpIndex, 1))) {
haveDoctype = PR_TRUE;
theIndex += 7; // skip "DOCTYPE"
break;
}
theIndex = ParsePS(aBuffer,tmpIndex);
// -1, not 0, in case it's another markup declaration
theIndex = ParsePS(aBuffer, tmpIndex);
theIndex = aBuffer.FindChar('>', theIndex);
} else if (nextChar == PRUnichar('?')) {
theIndex = aBuffer.FindChar('>', theIndex);