summaryrefslogtreecommitdiffstats
path: root/parser/html/nsHtml5Tokenizer.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-09-06 10:32:40 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-09-06 10:32:40 +0200
commit2d33b998c72d57abcde836bd2985ad72265d9697 (patch)
tree7e6cb902694ac348b6b785a14a997451d0b80951 /parser/html/nsHtml5Tokenizer.cpp
parent47f4227deac7db16fbb8f4aec0376f552fc296b5 (diff)
parent9fdff854ebf1fe1a118061d57fd0a2d6c5c7dfd7 (diff)
downloadUXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar
UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar.gz
UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar.lz
UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar.xz
UXP-2d33b998c72d57abcde836bd2985ad72265d9697.zip
Merge branch 'release' into Pale_Moon-release
# Conflicts: # application/palemoon/config/version.txt
Diffstat (limited to 'parser/html/nsHtml5Tokenizer.cpp')
-rw-r--r--parser/html/nsHtml5Tokenizer.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/parser/html/nsHtml5Tokenizer.cpp b/parser/html/nsHtml5Tokenizer.cpp
index e70c081bf..4c815b0c0 100644
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2005-2007 Henri Sivonen
* Copyright (c) 2007-2015 Mozilla Foundation
+ * Copyright (c) 2019 Moonchild Productions
* Portions of comments Copyright 2004-2010 Apple Computer, Inc., Mozilla
* Foundation, and Opera Software ASA.
*
@@ -23,11 +24,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-/*
- * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
- * Please edit Tokenizer.java instead and regenerate.
- */
-
#define nsHtml5Tokenizer_cpp__
#include "nsIAtom.h"
@@ -127,15 +123,11 @@ nsHtml5Tokenizer::isViewingXmlSource()
}
void
-nsHtml5Tokenizer::setStateAndEndTagExpectation(int32_t specialTokenizerState, nsIAtom* endTagExpectation)
+nsHtml5Tokenizer::setState(int32_t specialTokenizerState)
{
this->stateSave = specialTokenizerState;
- if (specialTokenizerState == NS_HTML5TOKENIZER_DATA) {
- return;
- }
- autoJArray<char16_t,int32_t> asArray = nsHtml5Portability::newCharArrayFromLocal(endTagExpectation);
- this->endTagExpectation = nsHtml5ElementName::elementNameByBuffer(asArray, 0, asArray.length, interner);
- endTagExpectationToArray();
+ this->endTagExpectation = nullptr;
+ this->endTagExpectationAsArray = nullptr;
}
void
@@ -2040,7 +2032,13 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_BREAK(stateloop);
}
c = checkChar(buf, pos);
- if (index < endTagExpectationAsArray.length) {
+ if (!endTagExpectationAsArray) {
+ tokenHandler->characters(nsHtml5Tokenizer::LT_SOLIDUS, 0, 2);
+ cstart = pos;
+ reconsume = true;
+ state = P::transition(mViewSource, returnState, reconsume, pos);
+ NS_HTML5_CONTINUE(stateloop);
+ } else if (index < endTagExpectationAsArray.length) {
char16_t e = endTagExpectationAsArray[index];
char16_t folded = c;
if (c >= 'A' && c <= 'Z') {