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

This commit is contained in:
jst%mozilla.jstenback.com 2004-09-17 00:16:48 +00:00
Родитель 7918625217
Коммит addb5686fa
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -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);