summaryrefslogtreecommitdiffstats
path: root/parser/html/nsHtml5ElementName.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-18 16:08:45 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:36 -0500
commite5557d43d6934918c018a527f3bae1f7049b9ef1 (patch)
treeff494bb15bd1031f8c5b3a2d6550f6d9b5304e33 /parser/html/nsHtml5ElementName.cpp
parent650f6b5eb31dfe6c60da16d1498f8cc3efac4dfa (diff)
downloadUXP-e5557d43d6934918c018a527f3bae1f7049b9ef1.tar
UXP-e5557d43d6934918c018a527f3bae1f7049b9ef1.tar.gz
UXP-e5557d43d6934918c018a527f3bae1f7049b9ef1.tar.lz
UXP-e5557d43d6934918c018a527f3bae1f7049b9ef1.tar.xz
UXP-e5557d43d6934918c018a527f3bae1f7049b9ef1.zip
Bug 1355479 - Flatten attribute storage in the HTML parser to AutoTArray to avoid malloc.
HTML Regen. Tag UXP Issue #1344
Diffstat (limited to 'parser/html/nsHtml5ElementName.cpp')
-rw-r--r--parser/html/nsHtml5ElementName.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/parser/html/nsHtml5ElementName.cpp b/parser/html/nsHtml5ElementName.cpp
index 6b829dfe3..cc5a73098 100644
--- a/parser/html/nsHtml5ElementName.cpp
+++ b/parser/html/nsHtml5ElementName.cpp
@@ -48,7 +48,6 @@
#include "nsHtml5TreeBuilder.h"
#include "nsHtml5MetaScanner.h"
#include "nsHtml5AttributeName.h"
-#include "nsHtml5HtmlAttributes.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
@@ -117,6 +116,7 @@ nsHtml5ElementName::setNameForNonInterned(nsIAtom* name)
MOZ_ASSERT(this->flags == (NS_HTML5TREE_BUILDER_OTHER | NS_HTML5ELEMENT_NAME_NOT_INTERNED));
}
+nsHtml5ElementName* nsHtml5ElementName::ELT_ISINDEX = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_AND = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_ARG = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_ABS = nullptr;
@@ -505,7 +505,6 @@ nsHtml5ElementName* nsHtml5ElementName::ELT_VIEW = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_APPROX = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_FECOLORMATRIX = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_FECONVOLVEMATRIX = nullptr;
-nsHtml5ElementName* nsHtml5ElementName::ELT_ISINDEX = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_MATRIX = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_APPLY = nullptr;
nsHtml5ElementName* nsHtml5ElementName::ELT_BODY = nullptr;
@@ -521,6 +520,7 @@ staticJArray<int32_t,int32_t> nsHtml5ElementName::ELEMENT_HASHES = { ELEMENT_HAS
void
nsHtml5ElementName::initializeStatics()
{
+ ELT_ISINDEX = new nsHtml5ElementName(nsHtml5Atoms::isindex, nsHtml5Atoms::isindex, NS_HTML5TREE_BUILDER_ISINDEX | NS_HTML5ELEMENT_NAME_SPECIAL);
ELT_AND = new nsHtml5ElementName(nsHtml5Atoms::and_, nsHtml5Atoms::and_, NS_HTML5TREE_BUILDER_OTHER);
ELT_ARG = new nsHtml5ElementName(nsHtml5Atoms::arg, nsHtml5Atoms::arg, NS_HTML5TREE_BUILDER_OTHER);
ELT_ABS = new nsHtml5ElementName(nsHtml5Atoms::abs, nsHtml5Atoms::abs, NS_HTML5TREE_BUILDER_OTHER);
@@ -909,7 +909,6 @@ nsHtml5ElementName::initializeStatics()
ELT_APPROX = new nsHtml5ElementName(nsHtml5Atoms::approx, nsHtml5Atoms::approx, NS_HTML5TREE_BUILDER_OTHER);
ELT_FECOLORMATRIX = new nsHtml5ElementName(nsHtml5Atoms::fecolormatrix, nsHtml5Atoms::feColorMatrix, NS_HTML5TREE_BUILDER_OTHER);
ELT_FECONVOLVEMATRIX = new nsHtml5ElementName(nsHtml5Atoms::feconvolvematrix, nsHtml5Atoms::feConvolveMatrix, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ISINDEX = new nsHtml5ElementName(nsHtml5Atoms::isindex, nsHtml5Atoms::isindex, NS_HTML5TREE_BUILDER_ISINDEX | NS_HTML5ELEMENT_NAME_SPECIAL);
ELT_MATRIX = new nsHtml5ElementName(nsHtml5Atoms::matrix, nsHtml5Atoms::matrix, NS_HTML5TREE_BUILDER_OTHER);
ELT_APPLY = new nsHtml5ElementName(nsHtml5Atoms::apply, nsHtml5Atoms::apply, NS_HTML5TREE_BUILDER_OTHER);
ELT_BODY = new nsHtml5ElementName(nsHtml5Atoms::body, nsHtml5Atoms::body, NS_HTML5TREE_BUILDER_BODY | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
@@ -1323,6 +1322,7 @@ nsHtml5ElementName::initializeStatics()
void
nsHtml5ElementName::releaseStatics()
{
+ delete ELT_ISINDEX;
delete ELT_AND;
delete ELT_ARG;
delete ELT_ABS;
@@ -1711,7 +1711,6 @@ nsHtml5ElementName::releaseStatics()
delete ELT_APPROX;
delete ELT_FECOLORMATRIX;
delete ELT_FECONVOLVEMATRIX;
- delete ELT_ISINDEX;
delete ELT_MATRIX;
delete ELT_APPLY;
delete ELT_BODY;