Bug 570309 - Experimentally make -- > not terminate a comment in HTML. r=jonas.

This commit is contained in:
Henri Sivonen 2010-06-19 09:38:41 +03:00
Родитель 43dd58c585
Коммит 2725c54475
2 изменённых файлов: 7 добавлений и 28 удалений

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

@ -2661,28 +2661,14 @@ public class Tokenizer implements Locator {
* Stay in the comment end state.
*/
continue;
case ' ':
case '\t':
case '\u000C':
/*
* Parse error. Append two U+002D HYPHEN-MINUS
* (-) characters and the input character to the
* comment token's data. Switch to the comment
* end space state.
*/
adjustDoubleHyphenAndAppendToLongStrBufAndErr(c);
state = Tokenizer.COMMENT_END_SPACE;
break commentendloop;
// continue stateloop;
case '\r':
adjustDoubleHyphenAndAppendToLongStrBufCarriageReturn();
state = Tokenizer.COMMENT_END_SPACE;
state = Tokenizer.COMMENT;
break stateloop;
case '\n':
adjustDoubleHyphenAndAppendToLongStrBufLineFeed();
state = Tokenizer.COMMENT_END_SPACE;
break commentendloop;
// continue stateloop;
state = Tokenizer.COMMENT;
continue stateloop;
case '!':
errHyphenHyphenBang();
appendLongStrBuf(c);

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

@ -1192,22 +1192,15 @@ nsHtml5Tokenizer::stateLoop(PRInt32 state, PRUnichar c, PRInt32 pos, PRUnichar*
adjustDoubleHyphenAndAppendToLongStrBufAndErr(c);
continue;
}
case ' ':
case '\t':
case '\f': {
adjustDoubleHyphenAndAppendToLongStrBufAndErr(c);
state = NS_HTML5TOKENIZER_COMMENT_END_SPACE;
NS_HTML5_BREAK(commentendloop);
}
case '\r': {
adjustDoubleHyphenAndAppendToLongStrBufCarriageReturn();
state = NS_HTML5TOKENIZER_COMMENT_END_SPACE;
state = NS_HTML5TOKENIZER_COMMENT;
NS_HTML5_BREAK(stateloop);
}
case '\n': {
adjustDoubleHyphenAndAppendToLongStrBufLineFeed();
state = NS_HTML5TOKENIZER_COMMENT_END_SPACE;
NS_HTML5_BREAK(commentendloop);
state = NS_HTML5TOKENIZER_COMMENT;
NS_HTML5_CONTINUE(stateloop);
}
case '!': {
@ -1225,7 +1218,7 @@ nsHtml5Tokenizer::stateLoop(PRInt32 state, PRUnichar c, PRInt32 pos, PRUnichar*
}
}
}
commentendloop_end: ;
}
case NS_HTML5TOKENIZER_COMMENT_END_SPACE: {
for (; ; ) {