Bug 546641 - Map 
 to CR in the HTML5 parser. rs=sicking.

--HG--
extra : rebase_source : 0c021cc263ea7172b0f386be89a6e6d45fba23c0
This commit is contained in:
Henri Sivonen 2010-03-09 15:13:48 +02:00
Родитель 4f886ae14a
Коммит a94750beaa
2 изменённых файлов: 2 добавлений и 3 удалений

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

@ -3394,9 +3394,6 @@ nsHtml5Tokenizer::handleNcrValue(PRInt32 returnState)
PRUnichar* val = nsHtml5NamedCharacters::WINDOWS_1252[value - 0x80]; PRUnichar* val = nsHtml5NamedCharacters::WINDOWS_1252[value - 0x80];
emitOrAppendOne(val, returnState); emitOrAppendOne(val, returnState);
} else if (value == 0x0D) {
emitOrAppendOne(nsHtml5Tokenizer::LF, returnState);
} else if (value == 0x0) { } else if (value == 0x0) {
emitOrAppendOne(nsHtml5Tokenizer::REPLACEMENT_CHARACTER, returnState); emitOrAppendOne(nsHtml5Tokenizer::REPLACEMENT_CHARACTER, returnState);

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

@ -239,6 +239,7 @@ nsHtml5TreeBuilder::characters(const PRUnichar* buf, PRInt32 start, PRInt32 leng
case ' ': case ' ':
case '\t': case '\t':
case '\n': case '\n':
case '\r':
case '\f': { case '\f': {
switch(mode) { switch(mode) {
case NS_HTML5TREE_BUILDER_INITIAL: case NS_HTML5TREE_BUILDER_INITIAL:
@ -3820,6 +3821,7 @@ nsHtml5TreeBuilder::charBufferContainsNonWhitespace()
case ' ': case ' ':
case '\t': case '\t':
case '\n': case '\n':
case '\r':
case '\f': { case '\f': {
continue; continue;
} }