summaryrefslogtreecommitdiffstats
path: root/parser/html/nsHtml5Tokenizer.cpp
diff options
context:
space:
mode:
authorHenri Sivonen <hsivonen@hsivonen.fi>2019-10-24 11:43:25 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-10-24 11:43:25 +0200
commit7bccd87695b792ec54fe0cb027cc6b6dc8baf454 (patch)
tree7aff60f66b020c584a36eb6e10cec169aab05035 /parser/html/nsHtml5Tokenizer.cpp
parent8c2501ffe9c7310d985396544f51a4ada029bb69 (diff)
downloadUXP-7bccd87695b792ec54fe0cb027cc6b6dc8baf454.tar
UXP-7bccd87695b792ec54fe0cb027cc6b6dc8baf454.tar.gz
UXP-7bccd87695b792ec54fe0cb027cc6b6dc8baf454.tar.lz
UXP-7bccd87695b792ec54fe0cb027cc6b6dc8baf454.tar.xz
UXP-7bccd87695b792ec54fe0cb027cc6b6dc8baf454.zip
Adjust tokenization of U+0000
Diffstat (limited to 'parser/html/nsHtml5Tokenizer.cpp')
-rw-r--r--parser/html/nsHtml5Tokenizer.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/parser/html/nsHtml5Tokenizer.cpp b/parser/html/nsHtml5Tokenizer.cpp
index 4c815b0c0..5464d211d 100644
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -1054,9 +1054,6 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
c = checkChar(buf, pos);
switch(c) {
- case '\0': {
- NS_HTML5_BREAK(stateloop);
- }
case '-': {
clearStrBufAfterOneHyphen();
state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_START, reconsume, pos);
@@ -1461,9 +1458,6 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_BREAK(stateloop);
}
c = checkChar(buf, pos);
- if (c == '\0') {
- NS_HTML5_BREAK(stateloop);
- }
switch(c) {
case ' ':
case '\t':
@@ -1471,7 +1465,8 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\r':
case '\f':
case '<':
- case '&': {
+ case '&':
+ case '\0': {
emitOrAppendCharRefBuf(returnState);
if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
cstart = pos;
@@ -1519,9 +1514,6 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_BREAK(stateloop);
}
c = checkChar(buf, pos);
- if (c == '\0') {
- NS_HTML5_BREAK(stateloop);
- }
int32_t hilo = 0;
if (c <= 'z') {
const int32_t* row = nsHtml5NamedCharactersAccel::HILO_ACCEL[c];
@@ -1556,9 +1548,6 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_BREAK(stateloop);
}
c = checkChar(buf, pos);
- if (c == '\0') {
- NS_HTML5_BREAK(stateloop);
- }
entCol++;
for (; ; ) {
if (hi < lo) {