summaryrefslogtreecommitdiffstats
path: root/parser/html/nsHtml5TreeBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parser/html/nsHtml5TreeBuilder.cpp')
-rw-r--r--parser/html/nsHtml5TreeBuilder.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp
index 457c7deb1..a02626e47 100644
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2007 Henri Sivonen
* Copyright (c) 2007-2015 Mozilla Foundation
+ * Copyright (c) 2019 Moonchild Productions
* Portions of comments Copyright 2004-2008 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 TreeBuilder.java instead and regenerate.
- */
-
#define nsHtml5TreeBuilder_cpp__
#include "nsContentUtils.h"
@@ -105,7 +101,7 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elementName->camelCaseName, elt);
currentPtr++;
stack[currentPtr] = node;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_DATA, contextName);
+ tokenizer->setState(NS_HTML5TOKENIZER_DATA);
mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
} else if (contextNamespace == kNameSpaceID_MathML) {
nsHtml5ElementName* elementName = nsHtml5ElementName::ELT_MATH;
@@ -117,7 +113,7 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, elementName->name, false);
currentPtr++;
stack[currentPtr] = node;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_DATA, contextName);
+ tokenizer->setState(NS_HTML5TOKENIZER_DATA);
mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
} else {
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HTML, elt);
@@ -129,15 +125,20 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
resetTheInsertionMode();
formPointer = getFormPointerForContext(contextNode);
if (nsHtml5Atoms::title == contextName || nsHtml5Atoms::textarea == contextName) {
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, contextName);
- } else if (nsHtml5Atoms::style == contextName || nsHtml5Atoms::xmp == contextName || nsHtml5Atoms::iframe == contextName || nsHtml5Atoms::noembed == contextName || nsHtml5Atoms::noframes == contextName || (scriptingEnabled && nsHtml5Atoms::noscript == contextName)) {
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, contextName);
+ tokenizer->setState(NS_HTML5TOKENIZER_RCDATA);
+ } else if (nsHtml5Atoms::style == contextName ||
+ nsHtml5Atoms::xmp == contextName ||
+ nsHtml5Atoms::iframe == contextName ||
+ nsHtml5Atoms::noembed == contextName ||
+ nsHtml5Atoms::noframes == contextName ||
+ (scriptingEnabled && nsHtml5Atoms::noscript == contextName)) {
+ tokenizer->setState(NS_HTML5TOKENIZER_RAWTEXT);
} else if (nsHtml5Atoms::plaintext == contextName) {
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_PLAINTEXT, contextName);
+ tokenizer->setState(NS_HTML5TOKENIZER_PLAINTEXT);
} else if (nsHtml5Atoms::script == contextName) {
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, contextName);
+ tokenizer->setState(NS_HTML5TOKENIZER_SCRIPT_DATA);
} else {
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_DATA, contextName);
+ tokenizer->setState(NS_HTML5TOKENIZER_DATA);
}
}
contextName = nullptr;