summaryrefslogtreecommitdiffstats
path: root/parser/html
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-18 17:17:17 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:37 -0500
commit76a4af34064296177e11a0d3887a5763a6c3a572 (patch)
tree5dbda446420569acd00e120e34db8e4320ee4336 /parser/html
parent5d4200f56df55774dcc94df431cc67fe65b674ed (diff)
downloadUXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar
UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar.gz
UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar.lz
UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar.xz
UXP-76a4af34064296177e11a0d3887a5763a6c3a572.zip
Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
HTML Regen. Tag UXP Issue #1344
Diffstat (limited to 'parser/html')
-rw-r--r--parser/html/nsHtml5AtomList.h104
-rw-r--r--parser/html/nsHtml5AttributeName.cpp36
-rw-r--r--parser/html/nsHtml5AttributeName.h47
-rw-r--r--parser/html/nsHtml5ElementName.cpp838
-rw-r--r--parser/html/nsHtml5ElementName.h70
-rw-r--r--parser/html/nsHtml5MetaScanner.cpp197
-rw-r--r--parser/html/nsHtml5MetaScanner.h91
-rw-r--r--parser/html/nsHtml5Portability.h6
-rw-r--r--parser/html/nsHtml5StackNode.cpp29
-rw-r--r--parser/html/nsHtml5StackNode.h7
-rw-r--r--parser/html/nsHtml5StateSnapshot.cpp5
-rw-r--r--parser/html/nsHtml5StateSnapshot.h7
-rw-r--r--parser/html/nsHtml5Tokenizer.cpp786
-rw-r--r--parser/html/nsHtml5Tokenizer.h239
-rw-r--r--parser/html/nsHtml5TreeBuilder.cpp1510
-rw-r--r--parser/html/nsHtml5TreeBuilder.h320
-rw-r--r--parser/html/nsHtml5UTF16Buffer.cpp5
-rw-r--r--parser/html/nsHtml5UTF16Buffer.h7
18 files changed, 2256 insertions, 2048 deletions
diff --git a/parser/html/nsHtml5AtomList.h b/parser/html/nsHtml5AtomList.h
index 1a47273eb..0d2616109 100644
--- a/parser/html/nsHtml5AtomList.h
+++ b/parser/html/nsHtml5AtomList.h
@@ -20,58 +20,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-HTML5_ATOM(emptystring, "")
-HTML5_ATOM(title, "title")
-HTML5_ATOM(desc, "desc")
-HTML5_ATOM(foreignObject, "foreignObject")
-HTML5_ATOM(mi, "mi")
-HTML5_ATOM(mo, "mo")
-HTML5_ATOM(mn, "mn")
-HTML5_ATOM(ms, "ms")
-HTML5_ATOM(mtext, "mtext")
-HTML5_ATOM(annotation_xml, "annotation-xml")
-HTML5_ATOM(template_, "template")
-HTML5_ATOM(textarea, "textarea")
-HTML5_ATOM(style, "style")
-HTML5_ATOM(xmp, "xmp")
-HTML5_ATOM(iframe, "iframe")
-HTML5_ATOM(noembed, "noembed")
-HTML5_ATOM(noframes, "noframes")
-HTML5_ATOM(noscript, "noscript")
-HTML5_ATOM(plaintext, "plaintext")
-HTML5_ATOM(script, "script")
-HTML5_ATOM(svg, "svg")
-HTML5_ATOM(table, "table")
-HTML5_ATOM(caption, "caption")
-HTML5_ATOM(p, "p")
-HTML5_ATOM(address, "address")
-HTML5_ATOM(div, "div")
-HTML5_ATOM(a, "a")
-HTML5_ATOM(nobr, "nobr")
-HTML5_ATOM(name, "name")
-HTML5_ATOM(prompt, "prompt")
-HTML5_ATOM(action, "action")
-HTML5_ATOM(input, "input")
-HTML5_ATOM(option, "option")
-HTML5_ATOM(ruby, "ruby")
-HTML5_ATOM(rtc, "rtc")
-HTML5_ATOM(select, "select")
-HTML5_ATOM(optgroup, "optgroup")
-HTML5_ATOM(tbody, "tbody")
-HTML5_ATOM(tfoot, "tfoot")
-HTML5_ATOM(thead, "thead")
-HTML5_ATOM(frameset, "frameset")
-HTML5_ATOM(button, "button")
-HTML5_ATOM(ul, "ul")
-HTML5_ATOM(ol, "ol")
-HTML5_ATOM(html, "html")
-HTML5_ATOM(td, "td")
-HTML5_ATOM(th, "th")
-HTML5_ATOM(tr, "tr")
-HTML5_ATOM(colgroup, "colgroup")
-HTML5_ATOM(head, "head")
-HTML5_ATOM(body, "body")
-HTML5_ATOM(form, "form")
HTML5_ATOM(xmlns, "xmlns")
HTML5_ATOM(xlink, "xlink")
HTML5_ATOM(xml, "xml")
@@ -252,6 +200,7 @@ HTML5_ATOM(linebreak, "linebreak")
HTML5_ATOM(label, "label")
HTML5_ATOM(linethickness, "linethickness")
HTML5_ATOM(mode, "mode")
+HTML5_ATOM(name, "name")
HTML5_ATOM(noresize, "noresize")
HTML5_ATOM(onbeforeunload, "onbeforeunload")
HTML5_ATOM(onrepeat, "onrepeat")
@@ -357,6 +306,7 @@ HTML5_ATOM(pathLength, "pathLength")
HTML5_ATOM(path, "path")
HTML5_ATOM(altimg, "altimg")
HTML5_ATOM(actiontype, "actiontype")
+HTML5_ATOM(action, "action")
HTML5_ATOM(active, "active")
HTML5_ATOM(additive, "additive")
HTML5_ATOM(begin, "begin")
@@ -415,8 +365,10 @@ HTML5_ATOM(onblur, "onblur")
HTML5_ATOM(replace, "replace")
HTML5_ATOM(rowlines, "rowlines")
HTML5_ATOM(scale, "scale")
+HTML5_ATOM(style, "style")
HTML5_ATOM(tablevalues, "tablevalues")
HTML5_ATOM(tableValues, "tableValues")
+HTML5_ATOM(title, "title")
HTML5_ATOM(v_alphabetic, "v-alphabetic")
HTML5_ATOM(azimuth, "azimuth")
HTML5_ATOM(format, "format")
@@ -424,6 +376,8 @@ HTML5_ATOM(frameborder, "frameborder")
HTML5_ATOM(frame, "frame")
HTML5_ATOM(framespacing, "framespacing")
HTML5_ATOM(from, "from")
+HTML5_ATOM(form, "form")
+HTML5_ATOM(prompt, "prompt")
HTML5_ATOM(primitiveunits, "primitiveunits")
HTML5_ATOM(primitiveUnits, "primitiveUnits")
HTML5_ATOM(symmetric, "symmetric")
@@ -557,6 +511,7 @@ HTML5_ATOM(shape, "shape")
HTML5_ATOM(slope, "slope")
HTML5_ATOM(stop_color, "stop-color")
HTML5_ATOM(stop_opacity, "stop-opacity")
+HTML5_ATOM(template_, "template")
HTML5_ATOM(wrap, "wrap")
HTML5_ATOM(abbr, "abbr")
HTML5_ATOM(attributename, "attributename")
@@ -725,6 +680,7 @@ HTML5_ATOM(cos, "cos")
HTML5_ATOM(cot, "cot")
HTML5_ATOM(del, "del")
HTML5_ATOM(dfn, "dfn")
+HTML5_ATOM(div, "div")
HTML5_ATOM(exp, "exp")
HTML5_ATOM(gcd, "gcd")
HTML5_ATOM(geq, "geq")
@@ -742,10 +698,13 @@ HTML5_ATOM(neq, "neq")
HTML5_ATOM(not_, "not")
HTML5_ATOM(nav, "nav")
HTML5_ATOM(pre, "pre")
+HTML5_ATOM(a, "a")
HTML5_ATOM(b, "b")
+HTML5_ATOM(rtc, "rtc")
HTML5_ATOM(rem, "rem")
HTML5_ATOM(sub, "sub")
HTML5_ATOM(sec, "sec")
+HTML5_ATOM(svg, "svg")
HTML5_ATOM(sum, "sum")
HTML5_ATOM(sin, "sin")
HTML5_ATOM(sep, "sep")
@@ -756,8 +715,10 @@ HTML5_ATOM(use, "use")
HTML5_ATOM(var, "var")
HTML5_ATOM(g, "g")
HTML5_ATOM(wbr, "wbr")
+HTML5_ATOM(xmp, "xmp")
HTML5_ATOM(xor_, "xor")
HTML5_ATOM(i, "i")
+HTML5_ATOM(p, "p")
HTML5_ATOM(q, "q")
HTML5_ATOM(s, "s")
HTML5_ATOM(u, "u")
@@ -774,6 +735,7 @@ HTML5_ATOM(feFuncA, "feFuncA")
HTML5_ATOM(lambda, "lambda")
HTML5_ATOM(metadata, "metadata")
HTML5_ATOM(meta, "meta")
+HTML5_ATOM(textarea, "textarea")
HTML5_ATOM(fefuncb, "fefuncb")
HTML5_ATOM(feFuncB, "feFuncB")
HTML5_ATOM(msub, "msub")
@@ -781,6 +743,7 @@ HTML5_ATOM(rb, "rb")
HTML5_ATOM(arcsec, "arcsec")
HTML5_ATOM(arccsc, "arccsc")
HTML5_ATOM(definition_src, "definition-src")
+HTML5_ATOM(desc, "desc")
HTML5_ATOM(font_face_src, "font-face-src")
HTML5_ATOM(mfrac, "mfrac")
HTML5_ATOM(dd, "dd")
@@ -793,9 +756,13 @@ HTML5_ATOM(feBlend, "feBlend")
HTML5_ATOM(feflood, "feflood")
HTML5_ATOM(feFlood, "feFlood")
HTML5_ATOM(grad, "grad")
+HTML5_ATOM(head, "head")
HTML5_ATOM(legend, "legend")
HTML5_ATOM(mfenced, "mfenced")
HTML5_ATOM(mpadded, "mpadded")
+HTML5_ATOM(noembed, "noembed")
+HTML5_ATOM(td, "td")
+HTML5_ATOM(thead, "thead")
HTML5_ATOM(aside, "aside")
HTML5_ATOM(article, "article")
HTML5_ATOM(animate, "animate")
@@ -826,6 +793,7 @@ HTML5_ATOM(false_, "false")
HTML5_ATOM(fecomposite, "fecomposite")
HTML5_ATOM(feComposite, "feComposite")
HTML5_ATOM(image, "image")
+HTML5_ATOM(iframe, "iframe")
HTML5_ATOM(inverse, "inverse")
HTML5_ATOM(line, "line")
HTML5_ATOM(logbase, "logbase")
@@ -843,6 +811,7 @@ HTML5_ATOM(piecewise, "piecewise")
HTML5_ATOM(rule, "rule")
HTML5_ATOM(source, "source")
HTML5_ATOM(strike, "strike")
+HTML5_ATOM(table, "table")
HTML5_ATOM(time, "time")
HTML5_ATOM(transpose, "transpose")
HTML5_ATOM(true_, "true")
@@ -883,6 +852,7 @@ HTML5_ATOM(missing_glyph, "missing-glyph")
HTML5_ATOM(math, "math")
HTML5_ATOM(mpath, "mpath")
HTML5_ATOM(prefetch, "prefetch")
+HTML5_ATOM(th, "th")
HTML5_ATOM(sech, "sech")
HTML5_ATOM(switch_, "switch")
HTML5_ATOM(sinh, "sinh")
@@ -893,17 +863,22 @@ HTML5_ATOM(ci, "ci")
HTML5_ATOM(font_face_uri, "font-face-uri")
HTML5_ATOM(li, "li")
HTML5_ATOM(imaginaryi, "imaginaryi")
+HTML5_ATOM(mi, "mi")
HTML5_ATOM(pi, "pi")
HTML5_ATOM(mark, "mark")
HTML5_ATOM(malignmark, "malignmark")
HTML5_ATOM(tbreak, "tbreak")
HTML5_ATOM(track, "track")
HTML5_ATOM(dl, "dl")
+HTML5_ATOM(annotation_xml, "annotation-xml")
HTML5_ATOM(csymbol, "csymbol")
HTML5_ATOM(curl, "curl")
HTML5_ATOM(factorial, "factorial")
HTML5_ATOM(forall, "forall")
+HTML5_ATOM(html, "html")
HTML5_ATOM(interval, "interval")
+HTML5_ATOM(ol, "ol")
+HTML5_ATOM(ul, "ul")
HTML5_ATOM(real, "real")
HTML5_ATOM(small_, "small")
HTML5_ATOM(symbol, "symbol")
@@ -923,14 +898,17 @@ HTML5_ATOM(animation, "animation")
HTML5_ATOM(annotation, "annotation")
HTML5_ATOM(animatemotion, "animatemotion")
HTML5_ATOM(animateMotion, "animateMotion")
+HTML5_ATOM(button, "button")
HTML5_ATOM(fn, "fn")
HTML5_ATOM(codomain, "codomain")
+HTML5_ATOM(caption, "caption")
HTML5_ATOM(condition, "condition")
HTML5_ATOM(domain, "domain")
HTML5_ATOM(domainofapplication, "domainofapplication")
HTML5_ATOM(figcaption, "figcaption")
HTML5_ATOM(hkern, "hkern")
HTML5_ATOM(ln, "ln")
+HTML5_ATOM(mn, "mn")
HTML5_ATOM(keygen, "keygen")
HTML5_ATOM(laplacian, "laplacian")
HTML5_ATOM(mean, "mean")
@@ -938,6 +916,7 @@ HTML5_ATOM(median, "median")
HTML5_ATOM(main, "main")
HTML5_ATOM(maction, "maction")
HTML5_ATOM(notin, "notin")
+HTML5_ATOM(option, "option")
HTML5_ATOM(polygon, "polygon")
HTML5_ATOM(reln, "reln")
HTML5_ATOM(section, "section")
@@ -945,8 +924,10 @@ HTML5_ATOM(tspan, "tspan")
HTML5_ATOM(union_, "union")
HTML5_ATOM(vkern, "vkern")
HTML5_ATOM(audio, "audio")
+HTML5_ATOM(mo, "mo")
HTML5_ATOM(tendsto, "tendsto")
HTML5_ATOM(video, "video")
+HTML5_ATOM(colgroup, "colgroup")
HTML5_ATOM(fedisplacementmap, "fedisplacementmap")
HTML5_ATOM(feDisplacementMap, "feDisplacementMap")
HTML5_ATOM(hgroup, "hgroup")
@@ -954,6 +935,7 @@ HTML5_ATOM(maligngroup, "maligngroup")
HTML5_ATOM(msubsup, "msubsup")
HTML5_ATOM(msup, "msup")
HTML5_ATOM(rp, "rp")
+HTML5_ATOM(optgroup, "optgroup")
HTML5_ATOM(samp, "samp")
HTML5_ATOM(stop, "stop")
HTML5_ATOM(eq, "eq")
@@ -982,12 +964,15 @@ HTML5_ATOM(mover, "mover")
HTML5_ATOM(munderover, "munderover")
HTML5_ATOM(merror, "merror")
HTML5_ATOM(mlabeledtr, "mlabeledtr")
+HTML5_ATOM(nobr, "nobr")
HTML5_ATOM(notanumber, "notanumber")
HTML5_ATOM(power, "power")
+HTML5_ATOM(tr, "tr")
HTML5_ATOM(solidcolor, "solidcolor")
HTML5_ATOM(selector, "selector")
HTML5_ATOM(vector, "vector")
HTML5_ATOM(arccos, "arccos")
+HTML5_ATOM(address, "address")
HTML5_ATOM(canvas, "canvas")
HTML5_ATOM(complexes, "complexes")
HTML5_ATOM(defs, "defs")
@@ -995,9 +980,11 @@ HTML5_ATOM(details, "details")
HTML5_ATOM(exists, "exists")
HTML5_ATOM(implies, "implies")
HTML5_ATOM(integers, "integers")
+HTML5_ATOM(ms, "ms")
HTML5_ATOM(mprescripts, "mprescripts")
HTML5_ATOM(mmultiscripts, "mmultiscripts")
HTML5_ATOM(minus, "minus")
+HTML5_ATOM(noframes, "noframes")
HTML5_ATOM(naturalnumbers, "naturalnumbers")
HTML5_ATOM(primes, "primes")
HTML5_ATOM(progress, "progress")
@@ -1017,7 +1004,9 @@ HTML5_ATOM(emptyset, "emptyset")
HTML5_ATOM(equivalent, "equivalent")
HTML5_ATOM(font_face_format, "font-face-format")
HTML5_ATOM(foreignobject, "foreignobject")
+HTML5_ATOM(foreignObject, "foreignObject")
HTML5_ATOM(fieldset, "fieldset")
+HTML5_ATOM(frameset, "frameset")
HTML5_ATOM(feoffset, "feoffset")
HTML5_ATOM(feOffset, "feOffset")
HTML5_ATOM(fespotlight, "fespotlight")
@@ -1030,6 +1019,7 @@ HTML5_ATOM(font, "font")
HTML5_ATOM(lt, "lt")
HTML5_ATOM(intersect, "intersect")
HTML5_ATOM(ident, "ident")
+HTML5_ATOM(input, "input")
HTML5_ATOM(limit, "limit")
HTML5_ATOM(lowlimit, "lowlimit")
HTML5_ATOM(lineargradient, "lineargradient")
@@ -1038,21 +1028,27 @@ HTML5_ATOM(moment, "moment")
HTML5_ATOM(mroot, "mroot")
HTML5_ATOM(msqrt, "msqrt")
HTML5_ATOM(momentabout, "momentabout")
+HTML5_ATOM(mtext, "mtext")
HTML5_ATOM(notsubset, "notsubset")
HTML5_ATOM(notprsubset, "notprsubset")
+HTML5_ATOM(noscript, "noscript")
HTML5_ATOM(nest, "nest")
HTML5_ATOM(outerproduct, "outerproduct")
HTML5_ATOM(output, "output")
HTML5_ATOM(product, "product")
HTML5_ATOM(prsubset, "prsubset")
+HTML5_ATOM(plaintext, "plaintext")
HTML5_ATOM(tt, "tt")
HTML5_ATOM(quotient, "quotient")
HTML5_ATOM(rect, "rect")
HTML5_ATOM(radialgradient, "radialgradient")
HTML5_ATOM(radialGradient, "radialGradient")
HTML5_ATOM(root, "root")
+HTML5_ATOM(select, "select")
HTML5_ATOM(scalarproduct, "scalarproduct")
HTML5_ATOM(subset, "subset")
+HTML5_ATOM(script, "script")
+HTML5_ATOM(tfoot, "tfoot")
HTML5_ATOM(uplimit, "uplimit")
HTML5_ATOM(vectorproduct, "vectorproduct")
HTML5_ATOM(menu, "menu")
@@ -1069,7 +1065,11 @@ HTML5_ATOM(feconvolvematrix, "feconvolvematrix")
HTML5_ATOM(feConvolveMatrix, "feConvolveMatrix")
HTML5_ATOM(matrix, "matrix")
HTML5_ATOM(apply, "apply")
+HTML5_ATOM(body, "body")
HTML5_ATOM(femorphology, "femorphology")
HTML5_ATOM(feMorphology, "feMorphology")
HTML5_ATOM(imaginary, "imaginary")
HTML5_ATOM(infinity, "infinity")
+HTML5_ATOM(ruby, "ruby")
+HTML5_ATOM(tbody, "tbody")
+HTML5_ATOM(emptystring, "")
diff --git a/parser/html/nsHtml5AttributeName.cpp b/parser/html/nsHtml5AttributeName.cpp
index 1947972b8..f9819f6f5 100644
--- a/parser/html/nsHtml5AttributeName.cpp
+++ b/parser/html/nsHtml5AttributeName.cpp
@@ -43,11 +43,12 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
+#include "nsHtml5ElementName.h"
#include "nsHtml5Tokenizer.h"
#include "nsHtml5TreeBuilder.h"
#include "nsHtml5MetaScanner.h"
-#include "nsHtml5ElementName.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
@@ -103,22 +104,6 @@ nsHtml5AttributeName::SAME_LOCAL(nsIAtom* name)
return arr;
}
-nsHtml5AttributeName*
-nsHtml5AttributeName::nameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner)
-{
- uint32_t hash = nsHtml5AttributeName::bufToHash(buf, length);
- int32_t index = nsHtml5AttributeName::ATTRIBUTE_HASHES.binarySearch(hash);
- if (index < 0) {
- return nullptr;
- }
- nsHtml5AttributeName* attributeName = nsHtml5AttributeName::ATTRIBUTE_NAMES[index];
- nsIAtom* name = attributeName->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML);
- if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) {
- return nullptr;
- }
- return attributeName;
-}
-
nsHtml5AttributeName::nsHtml5AttributeName(int32_t* uri, nsIAtom** local, nsIAtom** prefix)
: uri(uri),
@@ -139,21 +124,6 @@ nsHtml5AttributeName::nsHtml5AttributeName()
MOZ_COUNT_CTOR(nsHtml5AttributeName);
}
-bool
-nsHtml5AttributeName::isInterned()
-{
- return !custom;
-}
-
-void
-nsHtml5AttributeName::setNameForNonInterned(nsIAtom* name)
-{
- MOZ_ASSERT(custom);
- local[0] = name;
- local[1] = name;
- local[2] = name;
-}
-
nsHtml5AttributeName*
nsHtml5AttributeName::createAttributeName(nsIAtom* name)
{
@@ -188,7 +158,7 @@ nsHtml5AttributeName::getPrefix(int32_t mode)
bool
nsHtml5AttributeName::equalsAnother(nsHtml5AttributeName* another)
{
- return this->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML) == another->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML);
+ return this->getLocal(nsHtml5AttributeName::HTML) == another->getLocal(nsHtml5AttributeName::HTML);
}
nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ALT = nullptr;
diff --git a/parser/html/nsHtml5AttributeName.h b/parser/html/nsHtml5AttributeName.h
index 8519f463f..3b546e5e2 100644
--- a/parser/html/nsHtml5AttributeName.h
+++ b/parser/html/nsHtml5AttributeName.h
@@ -44,13 +44,14 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
class nsHtml5StreamParser;
+class nsHtml5ElementName;
class nsHtml5Tokenizer;
class nsHtml5TreeBuilder;
class nsHtml5MetaScanner;
-class nsHtml5ElementName;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -75,7 +76,21 @@ class nsHtml5AttributeName
static nsIAtom** COLONIFIED_LOCAL(nsIAtom* name, nsIAtom* suffix);
public:
static nsIAtom** SAME_LOCAL(nsIAtom* name);
- static nsHtml5AttributeName* nameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner);
+ inline static nsHtml5AttributeName* nameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner)
+ {
+ uint32_t hash = nsHtml5AttributeName::bufToHash(buf, length);
+ int32_t index = nsHtml5AttributeName::ATTRIBUTE_HASHES.binarySearch(hash);
+ if (index < 0) {
+ return nullptr;
+ }
+ nsHtml5AttributeName* attributeName = nsHtml5AttributeName::ATTRIBUTE_NAMES[index];
+ nsIAtom* name = attributeName->getLocal(0);
+ if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) {
+ return nullptr;
+ }
+ return attributeName;
+ }
+
private:
inline static uint32_t bufToHash(char16_t* buf, int32_t length)
{
@@ -110,6 +125,14 @@ class nsHtml5AttributeName
return len + first + second + third + fourth + fifth + sixth;
}
+ public:
+ static const int32_t HTML = 0;
+
+ static const int32_t MATHML = 1;
+
+ static const int32_t SVG = 2;
+
+ private:
int32_t* uri;
nsIAtom** local;
nsIAtom** prefix;
@@ -117,8 +140,19 @@ class nsHtml5AttributeName
nsHtml5AttributeName(int32_t* uri, nsIAtom** local, nsIAtom** prefix);
public:
nsHtml5AttributeName();
- bool isInterned();
- void setNameForNonInterned(nsIAtom* name);
+ inline bool isInterned()
+ {
+ return !custom;
+ }
+
+ inline void setNameForNonInterned(nsIAtom* name)
+ {
+ MOZ_ASSERT(custom);
+ local[0] = name;
+ local[1] = name;
+ local[2] = name;
+ }
+
static nsHtml5AttributeName* createAttributeName(nsIAtom* name);
~nsHtml5AttributeName();
int32_t getUri(int32_t mode);
@@ -716,10 +750,5 @@ class nsHtml5AttributeName
static void releaseStatics();
};
-#define NS_HTML5ATTRIBUTE_NAME_HTML 0
-#define NS_HTML5ATTRIBUTE_NAME_MATHML 1
-#define NS_HTML5ATTRIBUTE_NAME_SVG 2
-
-
#endif
diff --git a/parser/html/nsHtml5ElementName.cpp b/parser/html/nsHtml5ElementName.cpp
index cc5a73098..516128122 100644
--- a/parser/html/nsHtml5ElementName.cpp
+++ b/parser/html/nsHtml5ElementName.cpp
@@ -43,11 +43,12 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
+#include "nsHtml5AttributeName.h"
#include "nsHtml5Tokenizer.h"
#include "nsHtml5TreeBuilder.h"
#include "nsHtml5MetaScanner.h"
-#include "nsHtml5AttributeName.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
@@ -55,35 +56,6 @@
#include "nsHtml5ElementName.h"
-int32_t
-nsHtml5ElementName::getGroup()
-{
- return flags & NS_HTML5ELEMENT_NAME_GROUP_MASK;
-}
-
-bool
-nsHtml5ElementName::isInterned()
-{
- return !(flags & NS_HTML5ELEMENT_NAME_NOT_INTERNED);
-}
-
-nsHtml5ElementName*
-nsHtml5ElementName::elementNameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner)
-{
- uint32_t hash = nsHtml5ElementName::bufToHash(buf, length);
- int32_t index = nsHtml5ElementName::ELEMENT_HASHES.binarySearch(hash);
- if (index < 0) {
- return nullptr;
- } else {
- nsHtml5ElementName* elementName = nsHtml5ElementName::ELEMENT_NAMES[index];
- nsIAtom* name = elementName->name;
- if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) {
- return nullptr;
- }
- return elementName;
- }
-}
-
nsHtml5ElementName::nsHtml5ElementName(nsIAtom* name, nsIAtom* camelCaseName, int32_t flags)
: name(name),
@@ -97,7 +69,7 @@ nsHtml5ElementName::nsHtml5ElementName(nsIAtom* name, nsIAtom* camelCaseName, in
nsHtml5ElementName::nsHtml5ElementName()
: name(nullptr),
camelCaseName(nullptr),
- flags(NS_HTML5TREE_BUILDER_OTHER | NS_HTML5ELEMENT_NAME_NOT_INTERNED)
+ flags(nsHtml5TreeBuilder::OTHER | NOT_INTERNED)
{
MOZ_COUNT_CTOR(nsHtml5ElementName);
}
@@ -108,14 +80,6 @@ nsHtml5ElementName::~nsHtml5ElementName()
MOZ_COUNT_DTOR(nsHtml5ElementName);
}
-void
-nsHtml5ElementName::setNameForNonInterned(nsIAtom* name)
-{
- this->name = name;
- this->camelCaseName = 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;
@@ -520,404 +484,404 @@ 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);
- ELT_BIG = new nsHtml5ElementName(nsHtml5Atoms::big, nsHtml5Atoms::big, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_BDO = new nsHtml5ElementName(nsHtml5Atoms::bdo, nsHtml5Atoms::bdo, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CSC = new nsHtml5ElementName(nsHtml5Atoms::csc, nsHtml5Atoms::csc, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COL = new nsHtml5ElementName(nsHtml5Atoms::col, nsHtml5Atoms::col, NS_HTML5TREE_BUILDER_COL | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_COS = new nsHtml5ElementName(nsHtml5Atoms::cos, nsHtml5Atoms::cos, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COT = new nsHtml5ElementName(nsHtml5Atoms::cot, nsHtml5Atoms::cot, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DEL = new nsHtml5ElementName(nsHtml5Atoms::del, nsHtml5Atoms::del, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DFN = new nsHtml5ElementName(nsHtml5Atoms::dfn, nsHtml5Atoms::dfn, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DIR = new nsHtml5ElementName(nsHtml5Atoms::dir, nsHtml5Atoms::dir, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_DIV = new nsHtml5ElementName(nsHtml5Atoms::div, nsHtml5Atoms::div, NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_EXP = new nsHtml5ElementName(nsHtml5Atoms::exp, nsHtml5Atoms::exp, NS_HTML5TREE_BUILDER_OTHER);
- ELT_GCD = new nsHtml5ElementName(nsHtml5Atoms::gcd, nsHtml5Atoms::gcd, NS_HTML5TREE_BUILDER_OTHER);
- ELT_GEQ = new nsHtml5ElementName(nsHtml5Atoms::geq, nsHtml5Atoms::geq, NS_HTML5TREE_BUILDER_OTHER);
- ELT_IMG = new nsHtml5ElementName(nsHtml5Atoms::img, nsHtml5Atoms::img, NS_HTML5TREE_BUILDER_IMG | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_INS = new nsHtml5ElementName(nsHtml5Atoms::ins, nsHtml5Atoms::ins, NS_HTML5TREE_BUILDER_OTHER);
- ELT_INT = new nsHtml5ElementName(nsHtml5Atoms::int_, nsHtml5Atoms::int_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_KBD = new nsHtml5ElementName(nsHtml5Atoms::kbd, nsHtml5Atoms::kbd, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LOG = new nsHtml5ElementName(nsHtml5Atoms::log, nsHtml5Atoms::log, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LCM = new nsHtml5ElementName(nsHtml5Atoms::lcm, nsHtml5Atoms::lcm, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LEQ = new nsHtml5ElementName(nsHtml5Atoms::leq, nsHtml5Atoms::leq, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MTD = new nsHtml5ElementName(nsHtml5Atoms::mtd, nsHtml5Atoms::mtd, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MIN = new nsHtml5ElementName(nsHtml5Atoms::min, nsHtml5Atoms::min, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MAP = new nsHtml5ElementName(nsHtml5Atoms::map, nsHtml5Atoms::map, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MTR = new nsHtml5ElementName(nsHtml5Atoms::mtr, nsHtml5Atoms::mtr, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MAX = new nsHtml5ElementName(nsHtml5Atoms::max, nsHtml5Atoms::max, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NEQ = new nsHtml5ElementName(nsHtml5Atoms::neq, nsHtml5Atoms::neq, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOT = new nsHtml5ElementName(nsHtml5Atoms::not_, nsHtml5Atoms::not_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NAV = new nsHtml5ElementName(nsHtml5Atoms::nav, nsHtml5Atoms::nav, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_PRE = new nsHtml5ElementName(nsHtml5Atoms::pre, nsHtml5Atoms::pre, NS_HTML5TREE_BUILDER_PRE_OR_LISTING | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_A = new nsHtml5ElementName(nsHtml5Atoms::a, nsHtml5Atoms::a, NS_HTML5TREE_BUILDER_A);
- ELT_B = new nsHtml5ElementName(nsHtml5Atoms::b, nsHtml5Atoms::b, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_RTC = new nsHtml5ElementName(nsHtml5Atoms::rtc, nsHtml5Atoms::rtc, NS_HTML5TREE_BUILDER_RB_OR_RTC | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_REM = new nsHtml5ElementName(nsHtml5Atoms::rem, nsHtml5Atoms::rem, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SUB = new nsHtml5ElementName(nsHtml5Atoms::sub, nsHtml5Atoms::sub, NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
- ELT_SEC = new nsHtml5ElementName(nsHtml5Atoms::sec, nsHtml5Atoms::sec, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SVG = new nsHtml5ElementName(nsHtml5Atoms::svg, nsHtml5Atoms::svg, NS_HTML5TREE_BUILDER_SVG);
- ELT_SUM = new nsHtml5ElementName(nsHtml5Atoms::sum, nsHtml5Atoms::sum, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SIN = new nsHtml5ElementName(nsHtml5Atoms::sin, nsHtml5Atoms::sin, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SEP = new nsHtml5ElementName(nsHtml5Atoms::sep, nsHtml5Atoms::sep, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SUP = new nsHtml5ElementName(nsHtml5Atoms::sup, nsHtml5Atoms::sup, NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
- ELT_SET = new nsHtml5ElementName(nsHtml5Atoms::set, nsHtml5Atoms::set, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TAN = new nsHtml5ElementName(nsHtml5Atoms::tan, nsHtml5Atoms::tan, NS_HTML5TREE_BUILDER_OTHER);
- ELT_USE = new nsHtml5ElementName(nsHtml5Atoms::use, nsHtml5Atoms::use, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VAR = new nsHtml5ElementName(nsHtml5Atoms::var, nsHtml5Atoms::var, NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
- ELT_G = new nsHtml5ElementName(nsHtml5Atoms::g, nsHtml5Atoms::g, NS_HTML5TREE_BUILDER_OTHER);
- ELT_WBR = new nsHtml5ElementName(nsHtml5Atoms::wbr, nsHtml5Atoms::wbr, NS_HTML5TREE_BUILDER_AREA_OR_WBR | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_XMP = new nsHtml5ElementName(nsHtml5Atoms::xmp, nsHtml5Atoms::xmp, NS_HTML5TREE_BUILDER_XMP | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_XOR = new nsHtml5ElementName(nsHtml5Atoms::xor_, nsHtml5Atoms::xor_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_I = new nsHtml5ElementName(nsHtml5Atoms::i, nsHtml5Atoms::i, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_P = new nsHtml5ElementName(nsHtml5Atoms::p, nsHtml5Atoms::p, NS_HTML5TREE_BUILDER_P | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_Q = new nsHtml5ElementName(nsHtml5Atoms::q, nsHtml5Atoms::q, NS_HTML5TREE_BUILDER_OTHER);
- ELT_S = new nsHtml5ElementName(nsHtml5Atoms::s, nsHtml5Atoms::s, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_U = new nsHtml5ElementName(nsHtml5Atoms::u, nsHtml5Atoms::u, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_H1 = new nsHtml5ElementName(nsHtml5Atoms::h1, nsHtml5Atoms::h1, NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_H2 = new nsHtml5ElementName(nsHtml5Atoms::h2, nsHtml5Atoms::h2, NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_H3 = new nsHtml5ElementName(nsHtml5Atoms::h3, nsHtml5Atoms::h3, NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_H4 = new nsHtml5ElementName(nsHtml5Atoms::h4, nsHtml5Atoms::h4, NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_H5 = new nsHtml5ElementName(nsHtml5Atoms::h5, nsHtml5Atoms::h5, NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_H6 = new nsHtml5ElementName(nsHtml5Atoms::h6, nsHtml5Atoms::h6, NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_AREA = new nsHtml5ElementName(nsHtml5Atoms::area, nsHtml5Atoms::area, NS_HTML5TREE_BUILDER_AREA_OR_WBR | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_EULERGAMMA = new nsHtml5ElementName(nsHtml5Atoms::eulergamma, nsHtml5Atoms::eulergamma, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEFUNCA = new nsHtml5ElementName(nsHtml5Atoms::fefunca, nsHtml5Atoms::feFuncA, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LAMBDA = new nsHtml5ElementName(nsHtml5Atoms::lambda, nsHtml5Atoms::lambda, NS_HTML5TREE_BUILDER_OTHER);
- ELT_METADATA = new nsHtml5ElementName(nsHtml5Atoms::metadata, nsHtml5Atoms::metadata, NS_HTML5TREE_BUILDER_OTHER);
- ELT_META = new nsHtml5ElementName(nsHtml5Atoms::meta, nsHtml5Atoms::meta, NS_HTML5TREE_BUILDER_META | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TEXTAREA = new nsHtml5ElementName(nsHtml5Atoms::textarea, nsHtml5Atoms::textarea, NS_HTML5TREE_BUILDER_TEXTAREA | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FEFUNCB = new nsHtml5ElementName(nsHtml5Atoms::fefuncb, nsHtml5Atoms::feFuncB, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MSUB = new nsHtml5ElementName(nsHtml5Atoms::msub, nsHtml5Atoms::msub, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RB = new nsHtml5ElementName(nsHtml5Atoms::rb, nsHtml5Atoms::rb, NS_HTML5TREE_BUILDER_RB_OR_RTC | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_ARCSEC = new nsHtml5ElementName(nsHtml5Atoms::arcsec, nsHtml5Atoms::arcsec, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCCSC = new nsHtml5ElementName(nsHtml5Atoms::arccsc, nsHtml5Atoms::arccsc, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DEFINITION_SRC = new nsHtml5ElementName(nsHtml5Atoms::definition_src, nsHtml5Atoms::definition_src, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DESC = new nsHtml5ElementName(nsHtml5Atoms::desc, nsHtml5Atoms::desc, NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC | NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG);
- ELT_FONT_FACE_SRC = new nsHtml5ElementName(nsHtml5Atoms::font_face_src, nsHtml5Atoms::font_face_src, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MFRAC = new nsHtml5ElementName(nsHtml5Atoms::mfrac, nsHtml5Atoms::mfrac, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DD = new nsHtml5ElementName(nsHtml5Atoms::dd, nsHtml5Atoms::dd, NS_HTML5TREE_BUILDER_DD_OR_DT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_BGSOUND = new nsHtml5ElementName(nsHtml5Atoms::bgsound, nsHtml5Atoms::bgsound, NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_CARD = new nsHtml5ElementName(nsHtml5Atoms::card, nsHtml5Atoms::card, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DISCARD = new nsHtml5ElementName(nsHtml5Atoms::discard, nsHtml5Atoms::discard, NS_HTML5TREE_BUILDER_OTHER);
- ELT_EMBED = new nsHtml5ElementName(nsHtml5Atoms::embed, nsHtml5Atoms::embed, NS_HTML5TREE_BUILDER_EMBED | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FEBLEND = new nsHtml5ElementName(nsHtml5Atoms::feblend, nsHtml5Atoms::feBlend, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEFLOOD = new nsHtml5ElementName(nsHtml5Atoms::feflood, nsHtml5Atoms::feFlood, NS_HTML5TREE_BUILDER_OTHER);
- ELT_GRAD = new nsHtml5ElementName(nsHtml5Atoms::grad, nsHtml5Atoms::grad, NS_HTML5TREE_BUILDER_OTHER);
- ELT_HEAD = new nsHtml5ElementName(nsHtml5Atoms::head, nsHtml5Atoms::head, NS_HTML5TREE_BUILDER_HEAD | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_LEGEND = new nsHtml5ElementName(nsHtml5Atoms::legend, nsHtml5Atoms::legend, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MFENCED = new nsHtml5ElementName(nsHtml5Atoms::mfenced, nsHtml5Atoms::mfenced, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MPADDED = new nsHtml5ElementName(nsHtml5Atoms::mpadded, nsHtml5Atoms::mpadded, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOEMBED = new nsHtml5ElementName(nsHtml5Atoms::noembed, nsHtml5Atoms::noembed, NS_HTML5TREE_BUILDER_NOEMBED | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TD = new nsHtml5ElementName(nsHtml5Atoms::td, nsHtml5Atoms::td, NS_HTML5TREE_BUILDER_TD_OR_TH | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_THEAD = new nsHtml5ElementName(nsHtml5Atoms::thead, nsHtml5Atoms::thead, NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_ASIDE = new nsHtml5ElementName(nsHtml5Atoms::aside, nsHtml5Atoms::aside, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_ARTICLE = new nsHtml5ElementName(nsHtml5Atoms::article, nsHtml5Atoms::article, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_ANIMATE = new nsHtml5ElementName(nsHtml5Atoms::animate, nsHtml5Atoms::animate, NS_HTML5TREE_BUILDER_OTHER);
- ELT_BASE = new nsHtml5ElementName(nsHtml5Atoms::base, nsHtml5Atoms::base, NS_HTML5TREE_BUILDER_BASE | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_BLOCKQUOTE = new nsHtml5ElementName(nsHtml5Atoms::blockquote, nsHtml5Atoms::blockquote, NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_CODE = new nsHtml5ElementName(nsHtml5Atoms::code, nsHtml5Atoms::code, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_CIRCLE = new nsHtml5ElementName(nsHtml5Atoms::circle, nsHtml5Atoms::circle, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COLOR_PROFILE = new nsHtml5ElementName(nsHtml5Atoms::color_profile, nsHtml5Atoms::color_profile, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COMPOSE = new nsHtml5ElementName(nsHtml5Atoms::compose, nsHtml5Atoms::compose, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CONJUGATE = new nsHtml5ElementName(nsHtml5Atoms::conjugate, nsHtml5Atoms::conjugate, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CITE = new nsHtml5ElementName(nsHtml5Atoms::cite, nsHtml5Atoms::cite, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DIVERGENCE = new nsHtml5ElementName(nsHtml5Atoms::divergence, nsHtml5Atoms::divergence, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DIVIDE = new nsHtml5ElementName(nsHtml5Atoms::divide, nsHtml5Atoms::divide, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DEGREE = new nsHtml5ElementName(nsHtml5Atoms::degree, nsHtml5Atoms::degree, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DECLARE = new nsHtml5ElementName(nsHtml5Atoms::declare, nsHtml5Atoms::declare, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DATATEMPLATE = new nsHtml5ElementName(nsHtml5Atoms::datatemplate, nsHtml5Atoms::datatemplate, NS_HTML5TREE_BUILDER_OTHER);
- ELT_EXPONENTIALE = new nsHtml5ElementName(nsHtml5Atoms::exponentiale, nsHtml5Atoms::exponentiale, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ELLIPSE = new nsHtml5ElementName(nsHtml5Atoms::ellipse, nsHtml5Atoms::ellipse, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FONT_FACE = new nsHtml5ElementName(nsHtml5Atoms::font_face, nsHtml5Atoms::font_face, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FETURBULENCE = new nsHtml5ElementName(nsHtml5Atoms::feturbulence, nsHtml5Atoms::feTurbulence, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEMERGENODE = new nsHtml5ElementName(nsHtml5Atoms::femergenode, nsHtml5Atoms::feMergeNode, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEIMAGE = new nsHtml5ElementName(nsHtml5Atoms::feimage, nsHtml5Atoms::feImage, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEMERGE = new nsHtml5ElementName(nsHtml5Atoms::femerge, nsHtml5Atoms::feMerge, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FETILE = new nsHtml5ElementName(nsHtml5Atoms::fetile, nsHtml5Atoms::feTile, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FONT_FACE_NAME = new nsHtml5ElementName(nsHtml5Atoms::font_face_name, nsHtml5Atoms::font_face_name, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FRAME = new nsHtml5ElementName(nsHtml5Atoms::frame, nsHtml5Atoms::frame, NS_HTML5TREE_BUILDER_FRAME | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FIGURE = new nsHtml5ElementName(nsHtml5Atoms::figure, nsHtml5Atoms::figure, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FALSE = new nsHtml5ElementName(nsHtml5Atoms::false_, nsHtml5Atoms::false_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FECOMPOSITE = new nsHtml5ElementName(nsHtml5Atoms::fecomposite, nsHtml5Atoms::feComposite, NS_HTML5TREE_BUILDER_OTHER);
- ELT_IMAGE = new nsHtml5ElementName(nsHtml5Atoms::image, nsHtml5Atoms::image, NS_HTML5TREE_BUILDER_IMAGE);
- ELT_IFRAME = new nsHtml5ElementName(nsHtml5Atoms::iframe, nsHtml5Atoms::iframe, NS_HTML5TREE_BUILDER_IFRAME | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_INVERSE = new nsHtml5ElementName(nsHtml5Atoms::inverse, nsHtml5Atoms::inverse, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LINE = new nsHtml5ElementName(nsHtml5Atoms::line, nsHtml5Atoms::line, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LOGBASE = new nsHtml5ElementName(nsHtml5Atoms::logbase, nsHtml5Atoms::logbase, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MSPACE = new nsHtml5ElementName(nsHtml5Atoms::mspace, nsHtml5Atoms::mspace, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MODE = new nsHtml5ElementName(nsHtml5Atoms::mode, nsHtml5Atoms::mode, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MARQUEE = new nsHtml5ElementName(nsHtml5Atoms::marquee, nsHtml5Atoms::marquee, NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
- ELT_MTABLE = new nsHtml5ElementName(nsHtml5Atoms::mtable, nsHtml5Atoms::mtable, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MSTYLE = new nsHtml5ElementName(nsHtml5Atoms::mstyle, nsHtml5Atoms::mstyle, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MENCLOSE = new nsHtml5ElementName(nsHtml5Atoms::menclose, nsHtml5Atoms::menclose, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NONE = new nsHtml5ElementName(nsHtml5Atoms::none, nsHtml5Atoms::none, NS_HTML5TREE_BUILDER_OTHER);
- ELT_OTHERWISE = new nsHtml5ElementName(nsHtml5Atoms::otherwise, nsHtml5Atoms::otherwise, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PIECE = new nsHtml5ElementName(nsHtml5Atoms::piece, nsHtml5Atoms::piece, NS_HTML5TREE_BUILDER_OTHER);
- ELT_POLYLINE = new nsHtml5ElementName(nsHtml5Atoms::polyline, nsHtml5Atoms::polyline, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PICTURE = new nsHtml5ElementName(nsHtml5Atoms::picture, nsHtml5Atoms::picture, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PIECEWISE = new nsHtml5ElementName(nsHtml5Atoms::piecewise, nsHtml5Atoms::piecewise, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RULE = new nsHtml5ElementName(nsHtml5Atoms::rule, nsHtml5Atoms::rule, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SOURCE = new nsHtml5ElementName(nsHtml5Atoms::source, nsHtml5Atoms::source, NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK);
- ELT_STRIKE = new nsHtml5ElementName(nsHtml5Atoms::strike, nsHtml5Atoms::strike, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_STYLE = new nsHtml5ElementName(nsHtml5Atoms::style, nsHtml5Atoms::style, NS_HTML5TREE_BUILDER_STYLE | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TABLE = new nsHtml5ElementName(nsHtml5Atoms::table, nsHtml5Atoms::table, NS_HTML5TREE_BUILDER_TABLE | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING);
- ELT_TITLE = new nsHtml5ElementName(nsHtml5Atoms::title, nsHtml5Atoms::title, NS_HTML5TREE_BUILDER_TITLE | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG);
- ELT_TIME = new nsHtml5ElementName(nsHtml5Atoms::time, nsHtml5Atoms::time, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TRANSPOSE = new nsHtml5ElementName(nsHtml5Atoms::transpose, nsHtml5Atoms::transpose, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TEMPLATE = new nsHtml5ElementName(nsHtml5Atoms::template_, nsHtml5Atoms::template_, NS_HTML5TREE_BUILDER_TEMPLATE | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
- ELT_TRUE = new nsHtml5ElementName(nsHtml5Atoms::true_, nsHtml5Atoms::true_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VARIANCE = new nsHtml5ElementName(nsHtml5Atoms::variance, nsHtml5Atoms::variance, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ALTGLYPHDEF = new nsHtml5ElementName(nsHtml5Atoms::altglyphdef, nsHtml5Atoms::altGlyphDef, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DIFF = new nsHtml5ElementName(nsHtml5Atoms::diff, nsHtml5Atoms::diff, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FACTOROF = new nsHtml5ElementName(nsHtml5Atoms::factorof, nsHtml5Atoms::factorof, NS_HTML5TREE_BUILDER_OTHER);
- ELT_GLYPHREF = new nsHtml5ElementName(nsHtml5Atoms::glyphref, nsHtml5Atoms::glyphRef, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PARTIALDIFF = new nsHtml5ElementName(nsHtml5Atoms::partialdiff, nsHtml5Atoms::partialdiff, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SETDIFF = new nsHtml5ElementName(nsHtml5Atoms::setdiff, nsHtml5Atoms::setdiff, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TREF = new nsHtml5ElementName(nsHtml5Atoms::tref, nsHtml5Atoms::tref, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CEILING = new nsHtml5ElementName(nsHtml5Atoms::ceiling, nsHtml5Atoms::ceiling, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DIALOG = new nsHtml5ElementName(nsHtml5Atoms::dialog, nsHtml5Atoms::dialog, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FEFUNCG = new nsHtml5ElementName(nsHtml5Atoms::fefuncg, nsHtml5Atoms::feFuncG, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEDIFFUSELIGHTING = new nsHtml5ElementName(nsHtml5Atoms::fediffuselighting, nsHtml5Atoms::feDiffuseLighting, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FESPECULARLIGHTING = new nsHtml5ElementName(nsHtml5Atoms::fespecularlighting, nsHtml5Atoms::feSpecularLighting, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LISTING = new nsHtml5ElementName(nsHtml5Atoms::listing, nsHtml5Atoms::listing, NS_HTML5TREE_BUILDER_PRE_OR_LISTING | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_STRONG = new nsHtml5ElementName(nsHtml5Atoms::strong, nsHtml5Atoms::strong, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_ARCSECH = new nsHtml5ElementName(nsHtml5Atoms::arcsech, nsHtml5Atoms::arcsech, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCCSCH = new nsHtml5ElementName(nsHtml5Atoms::arccsch, nsHtml5Atoms::arccsch, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCTANH = new nsHtml5ElementName(nsHtml5Atoms::arctanh, nsHtml5Atoms::arctanh, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCSINH = new nsHtml5ElementName(nsHtml5Atoms::arcsinh, nsHtml5Atoms::arcsinh, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ALTGLYPH = new nsHtml5ElementName(nsHtml5Atoms::altglyph, nsHtml5Atoms::altGlyph, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCCOSH = new nsHtml5ElementName(nsHtml5Atoms::arccosh, nsHtml5Atoms::arccosh, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCCOTH = new nsHtml5ElementName(nsHtml5Atoms::arccoth, nsHtml5Atoms::arccoth, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CSCH = new nsHtml5ElementName(nsHtml5Atoms::csch, nsHtml5Atoms::csch, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COSH = new nsHtml5ElementName(nsHtml5Atoms::cosh, nsHtml5Atoms::cosh, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CLIPPATH = new nsHtml5ElementName(nsHtml5Atoms::clippath, nsHtml5Atoms::clipPath, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COTH = new nsHtml5ElementName(nsHtml5Atoms::coth, nsHtml5Atoms::coth, NS_HTML5TREE_BUILDER_OTHER);
- ELT_GLYPH = new nsHtml5ElementName(nsHtml5Atoms::glyph, nsHtml5Atoms::glyph, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MGLYPH = new nsHtml5ElementName(nsHtml5Atoms::mglyph, nsHtml5Atoms::mglyph, NS_HTML5TREE_BUILDER_MGLYPH_OR_MALIGNMARK);
- ELT_MISSING_GLYPH = new nsHtml5ElementName(nsHtml5Atoms::missing_glyph, nsHtml5Atoms::missing_glyph, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MATH = new nsHtml5ElementName(nsHtml5Atoms::math, nsHtml5Atoms::math, NS_HTML5TREE_BUILDER_MATH);
- ELT_MPATH = new nsHtml5ElementName(nsHtml5Atoms::mpath, nsHtml5Atoms::mpath, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PREFETCH = new nsHtml5ElementName(nsHtml5Atoms::prefetch, nsHtml5Atoms::prefetch, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PATH = new nsHtml5ElementName(nsHtml5Atoms::path, nsHtml5Atoms::path, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TH = new nsHtml5ElementName(nsHtml5Atoms::th, nsHtml5Atoms::th, NS_HTML5TREE_BUILDER_TD_OR_TH | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_SECH = new nsHtml5ElementName(nsHtml5Atoms::sech, nsHtml5Atoms::sech, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SWITCH = new nsHtml5ElementName(nsHtml5Atoms::switch_, nsHtml5Atoms::switch_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SINH = new nsHtml5ElementName(nsHtml5Atoms::sinh, nsHtml5Atoms::sinh, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TANH = new nsHtml5ElementName(nsHtml5Atoms::tanh, nsHtml5Atoms::tanh, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TEXTPATH = new nsHtml5ElementName(nsHtml5Atoms::textpath, nsHtml5Atoms::textPath, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CI = new nsHtml5ElementName(nsHtml5Atoms::ci, nsHtml5Atoms::ci, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FONT_FACE_URI = new nsHtml5ElementName(nsHtml5Atoms::font_face_uri, nsHtml5Atoms::font_face_uri, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LI = new nsHtml5ElementName(nsHtml5Atoms::li, nsHtml5Atoms::li, NS_HTML5TREE_BUILDER_LI | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_IMAGINARYI = new nsHtml5ElementName(nsHtml5Atoms::imaginaryi, nsHtml5Atoms::imaginaryi, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MI = new nsHtml5ElementName(nsHtml5Atoms::mi, nsHtml5Atoms::mi, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
- ELT_PI = new nsHtml5ElementName(nsHtml5Atoms::pi, nsHtml5Atoms::pi, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LINK = new nsHtml5ElementName(nsHtml5Atoms::link, nsHtml5Atoms::link, NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_MARK = new nsHtml5ElementName(nsHtml5Atoms::mark, nsHtml5Atoms::mark, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MALIGNMARK = new nsHtml5ElementName(nsHtml5Atoms::malignmark, nsHtml5Atoms::malignmark, NS_HTML5TREE_BUILDER_MGLYPH_OR_MALIGNMARK);
- ELT_MASK = new nsHtml5ElementName(nsHtml5Atoms::mask, nsHtml5Atoms::mask, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TBREAK = new nsHtml5ElementName(nsHtml5Atoms::tbreak, nsHtml5Atoms::tbreak, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TRACK = new nsHtml5ElementName(nsHtml5Atoms::track, nsHtml5Atoms::track, NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_DL = new nsHtml5ElementName(nsHtml5Atoms::dl, nsHtml5Atoms::dl, NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_ANNOTATION_XML = new nsHtml5ElementName(nsHtml5Atoms::annotation_xml, nsHtml5Atoms::annotation_xml, NS_HTML5TREE_BUILDER_ANNOTATION_XML | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
- ELT_CSYMBOL = new nsHtml5ElementName(nsHtml5Atoms::csymbol, nsHtml5Atoms::csymbol, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CURL = new nsHtml5ElementName(nsHtml5Atoms::curl, nsHtml5Atoms::curl, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FACTORIAL = new nsHtml5ElementName(nsHtml5Atoms::factorial, nsHtml5Atoms::factorial, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FORALL = new nsHtml5ElementName(nsHtml5Atoms::forall, nsHtml5Atoms::forall, NS_HTML5TREE_BUILDER_OTHER);
- ELT_HTML = new nsHtml5ElementName(nsHtml5Atoms::html, nsHtml5Atoms::html, NS_HTML5TREE_BUILDER_HTML | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_INTERVAL = new nsHtml5ElementName(nsHtml5Atoms::interval, nsHtml5Atoms::interval, NS_HTML5TREE_BUILDER_OTHER);
- ELT_OL = new nsHtml5ElementName(nsHtml5Atoms::ol, nsHtml5Atoms::ol, NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_LABEL = new nsHtml5ElementName(nsHtml5Atoms::label, nsHtml5Atoms::label, NS_HTML5TREE_BUILDER_OTHER);
- ELT_UL = new nsHtml5ElementName(nsHtml5Atoms::ul, nsHtml5Atoms::ul, NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_REAL = new nsHtml5ElementName(nsHtml5Atoms::real, nsHtml5Atoms::real, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SMALL = new nsHtml5ElementName(nsHtml5Atoms::small_, nsHtml5Atoms::small_, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_SYMBOL = new nsHtml5ElementName(nsHtml5Atoms::symbol, nsHtml5Atoms::symbol, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ALTGLYPHITEM = new nsHtml5ElementName(nsHtml5Atoms::altglyphitem, nsHtml5Atoms::altGlyphItem, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ANIMATETRANSFORM = new nsHtml5ElementName(nsHtml5Atoms::animatetransform, nsHtml5Atoms::animateTransform, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ACRONYM = new nsHtml5ElementName(nsHtml5Atoms::acronym, nsHtml5Atoms::acronym, NS_HTML5TREE_BUILDER_OTHER);
- ELT_EM = new nsHtml5ElementName(nsHtml5Atoms::em, nsHtml5Atoms::em, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_FORM = new nsHtml5ElementName(nsHtml5Atoms::form, nsHtml5Atoms::form, NS_HTML5TREE_BUILDER_FORM | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_MENUITEM = new nsHtml5ElementName(nsHtml5Atoms::menuitem, nsHtml5Atoms::menuitem, NS_HTML5TREE_BUILDER_MENUITEM);
- ELT_MPHANTOM = new nsHtml5ElementName(nsHtml5Atoms::mphantom, nsHtml5Atoms::mphantom, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PARAM = new nsHtml5ElementName(nsHtml5Atoms::param, nsHtml5Atoms::param, NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_CN = new nsHtml5ElementName(nsHtml5Atoms::cn, nsHtml5Atoms::cn, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCTAN = new nsHtml5ElementName(nsHtml5Atoms::arctan, nsHtml5Atoms::arctan, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCSIN = new nsHtml5ElementName(nsHtml5Atoms::arcsin, nsHtml5Atoms::arcsin, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ANIMATION = new nsHtml5ElementName(nsHtml5Atoms::animation, nsHtml5Atoms::animation, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ANNOTATION = new nsHtml5ElementName(nsHtml5Atoms::annotation, nsHtml5Atoms::annotation, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ANIMATEMOTION = new nsHtml5ElementName(nsHtml5Atoms::animatemotion, nsHtml5Atoms::animateMotion, NS_HTML5TREE_BUILDER_OTHER);
- ELT_BUTTON = new nsHtml5ElementName(nsHtml5Atoms::button, nsHtml5Atoms::button, NS_HTML5TREE_BUILDER_BUTTON | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FN = new nsHtml5ElementName(nsHtml5Atoms::fn, nsHtml5Atoms::fn, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CODOMAIN = new nsHtml5ElementName(nsHtml5Atoms::codomain, nsHtml5Atoms::codomain, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CAPTION = new nsHtml5ElementName(nsHtml5Atoms::caption, nsHtml5Atoms::caption, NS_HTML5TREE_BUILDER_CAPTION | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
- ELT_CONDITION = new nsHtml5ElementName(nsHtml5Atoms::condition, nsHtml5Atoms::condition, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DOMAIN = new nsHtml5ElementName(nsHtml5Atoms::domain, nsHtml5Atoms::domain, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DOMAINOFAPPLICATION = new nsHtml5ElementName(nsHtml5Atoms::domainofapplication, nsHtml5Atoms::domainofapplication, NS_HTML5TREE_BUILDER_OTHER);
- ELT_IN = new nsHtml5ElementName(nsHtml5Atoms::in, nsHtml5Atoms::in, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FIGCAPTION = new nsHtml5ElementName(nsHtml5Atoms::figcaption, nsHtml5Atoms::figcaption, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_HKERN = new nsHtml5ElementName(nsHtml5Atoms::hkern, nsHtml5Atoms::hkern, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LN = new nsHtml5ElementName(nsHtml5Atoms::ln, nsHtml5Atoms::ln, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MN = new nsHtml5ElementName(nsHtml5Atoms::mn, nsHtml5Atoms::mn, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
- ELT_KEYGEN = new nsHtml5ElementName(nsHtml5Atoms::keygen, nsHtml5Atoms::keygen, NS_HTML5TREE_BUILDER_KEYGEN);
- ELT_LAPLACIAN = new nsHtml5ElementName(nsHtml5Atoms::laplacian, nsHtml5Atoms::laplacian, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MEAN = new nsHtml5ElementName(nsHtml5Atoms::mean, nsHtml5Atoms::mean, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MEDIAN = new nsHtml5ElementName(nsHtml5Atoms::median, nsHtml5Atoms::median, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MAIN = new nsHtml5ElementName(nsHtml5Atoms::main, nsHtml5Atoms::main, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_MACTION = new nsHtml5ElementName(nsHtml5Atoms::maction, nsHtml5Atoms::maction, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOTIN = new nsHtml5ElementName(nsHtml5Atoms::notin, nsHtml5Atoms::notin, NS_HTML5TREE_BUILDER_OTHER);
- ELT_OPTION = new nsHtml5ElementName(nsHtml5Atoms::option, nsHtml5Atoms::option, NS_HTML5TREE_BUILDER_OPTION | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_POLYGON = new nsHtml5ElementName(nsHtml5Atoms::polygon, nsHtml5Atoms::polygon, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PATTERN = new nsHtml5ElementName(nsHtml5Atoms::pattern, nsHtml5Atoms::pattern, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RELN = new nsHtml5ElementName(nsHtml5Atoms::reln, nsHtml5Atoms::reln, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SPAN = new nsHtml5ElementName(nsHtml5Atoms::span, nsHtml5Atoms::span, NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
- ELT_SECTION = new nsHtml5ElementName(nsHtml5Atoms::section, nsHtml5Atoms::section, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TSPAN = new nsHtml5ElementName(nsHtml5Atoms::tspan, nsHtml5Atoms::tspan, NS_HTML5TREE_BUILDER_OTHER);
- ELT_UNION = new nsHtml5ElementName(nsHtml5Atoms::union_, nsHtml5Atoms::union_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VKERN = new nsHtml5ElementName(nsHtml5Atoms::vkern, nsHtml5Atoms::vkern, NS_HTML5TREE_BUILDER_OTHER);
- ELT_AUDIO = new nsHtml5ElementName(nsHtml5Atoms::audio, nsHtml5Atoms::audio, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MO = new nsHtml5ElementName(nsHtml5Atoms::mo, nsHtml5Atoms::mo, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
- ELT_TENDSTO = new nsHtml5ElementName(nsHtml5Atoms::tendsto, nsHtml5Atoms::tendsto, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VIDEO = new nsHtml5ElementName(nsHtml5Atoms::video, nsHtml5Atoms::video, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COLGROUP = new nsHtml5ElementName(nsHtml5Atoms::colgroup, nsHtml5Atoms::colgroup, NS_HTML5TREE_BUILDER_COLGROUP | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_FEDISPLACEMENTMAP = new nsHtml5ElementName(nsHtml5Atoms::fedisplacementmap, nsHtml5Atoms::feDisplacementMap, NS_HTML5TREE_BUILDER_OTHER);
- ELT_HGROUP = new nsHtml5ElementName(nsHtml5Atoms::hgroup, nsHtml5Atoms::hgroup, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_MALIGNGROUP = new nsHtml5ElementName(nsHtml5Atoms::maligngroup, nsHtml5Atoms::maligngroup, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MSUBSUP = new nsHtml5ElementName(nsHtml5Atoms::msubsup, nsHtml5Atoms::msubsup, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MSUP = new nsHtml5ElementName(nsHtml5Atoms::msup, nsHtml5Atoms::msup, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RP = new nsHtml5ElementName(nsHtml5Atoms::rp, nsHtml5Atoms::rp, NS_HTML5TREE_BUILDER_RT_OR_RP | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_OPTGROUP = new nsHtml5ElementName(nsHtml5Atoms::optgroup, nsHtml5Atoms::optgroup, NS_HTML5TREE_BUILDER_OPTGROUP | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_SAMP = new nsHtml5ElementName(nsHtml5Atoms::samp, nsHtml5Atoms::samp, NS_HTML5TREE_BUILDER_OTHER);
- ELT_STOP = new nsHtml5ElementName(nsHtml5Atoms::stop, nsHtml5Atoms::stop, NS_HTML5TREE_BUILDER_OTHER);
- ELT_EQ = new nsHtml5ElementName(nsHtml5Atoms::eq, nsHtml5Atoms::eq, NS_HTML5TREE_BUILDER_OTHER);
- ELT_BR = new nsHtml5ElementName(nsHtml5Atoms::br, nsHtml5Atoms::br, NS_HTML5TREE_BUILDER_BR | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_ABBR = new nsHtml5ElementName(nsHtml5Atoms::abbr, nsHtml5Atoms::abbr, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ANIMATECOLOR = new nsHtml5ElementName(nsHtml5Atoms::animatecolor, nsHtml5Atoms::animateColor, NS_HTML5TREE_BUILDER_OTHER);
- ELT_BVAR = new nsHtml5ElementName(nsHtml5Atoms::bvar, nsHtml5Atoms::bvar, NS_HTML5TREE_BUILDER_OTHER);
- ELT_CENTER = new nsHtml5ElementName(nsHtml5Atoms::center, nsHtml5Atoms::center, NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_CURSOR = new nsHtml5ElementName(nsHtml5Atoms::cursor, nsHtml5Atoms::cursor, NS_HTML5TREE_BUILDER_OTHER);
- ELT_HR = new nsHtml5ElementName(nsHtml5Atoms::hr, nsHtml5Atoms::hr, NS_HTML5TREE_BUILDER_HR | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FEFUNCR = new nsHtml5ElementName(nsHtml5Atoms::fefuncr, nsHtml5Atoms::feFuncR, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FECOMPONENTTRANSFER = new nsHtml5ElementName(nsHtml5Atoms::fecomponenttransfer, nsHtml5Atoms::feComponentTransfer, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FILTER = new nsHtml5ElementName(nsHtml5Atoms::filter, nsHtml5Atoms::filter, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FOOTER = new nsHtml5ElementName(nsHtml5Atoms::footer, nsHtml5Atoms::footer, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FLOOR = new nsHtml5ElementName(nsHtml5Atoms::floor, nsHtml5Atoms::floor, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEGAUSSIANBLUR = new nsHtml5ElementName(nsHtml5Atoms::fegaussianblur, nsHtml5Atoms::feGaussianBlur, NS_HTML5TREE_BUILDER_OTHER);
- ELT_HEADER = new nsHtml5ElementName(nsHtml5Atoms::header, nsHtml5Atoms::header, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_HANDLER = new nsHtml5ElementName(nsHtml5Atoms::handler, nsHtml5Atoms::handler, NS_HTML5TREE_BUILDER_OTHER);
- ELT_OR = new nsHtml5ElementName(nsHtml5Atoms::or_, nsHtml5Atoms::or_, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LISTENER = new nsHtml5ElementName(nsHtml5Atoms::listener, nsHtml5Atoms::listener, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MUNDER = new nsHtml5ElementName(nsHtml5Atoms::munder, nsHtml5Atoms::munder, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MARKER = new nsHtml5ElementName(nsHtml5Atoms::marker, nsHtml5Atoms::marker, NS_HTML5TREE_BUILDER_OTHER);
- ELT_METER = new nsHtml5ElementName(nsHtml5Atoms::meter, nsHtml5Atoms::meter, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MOVER = new nsHtml5ElementName(nsHtml5Atoms::mover, nsHtml5Atoms::mover, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MUNDEROVER = new nsHtml5ElementName(nsHtml5Atoms::munderover, nsHtml5Atoms::munderover, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MERROR = new nsHtml5ElementName(nsHtml5Atoms::merror, nsHtml5Atoms::merror, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MLABELEDTR = new nsHtml5ElementName(nsHtml5Atoms::mlabeledtr, nsHtml5Atoms::mlabeledtr, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOBR = new nsHtml5ElementName(nsHtml5Atoms::nobr, nsHtml5Atoms::nobr, NS_HTML5TREE_BUILDER_NOBR);
- ELT_NOTANUMBER = new nsHtml5ElementName(nsHtml5Atoms::notanumber, nsHtml5Atoms::notanumber, NS_HTML5TREE_BUILDER_OTHER);
- ELT_POWER = new nsHtml5ElementName(nsHtml5Atoms::power, nsHtml5Atoms::power, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TR = new nsHtml5ElementName(nsHtml5Atoms::tr, nsHtml5Atoms::tr, NS_HTML5TREE_BUILDER_TR | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_SOLIDCOLOR = new nsHtml5ElementName(nsHtml5Atoms::solidcolor, nsHtml5Atoms::solidcolor, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SELECTOR = new nsHtml5ElementName(nsHtml5Atoms::selector, nsHtml5Atoms::selector, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VECTOR = new nsHtml5ElementName(nsHtml5Atoms::vector, nsHtml5Atoms::vector, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ARCCOS = new nsHtml5ElementName(nsHtml5Atoms::arccos, nsHtml5Atoms::arccos, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ADDRESS = new nsHtml5ElementName(nsHtml5Atoms::address, nsHtml5Atoms::address, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_CANVAS = new nsHtml5ElementName(nsHtml5Atoms::canvas, nsHtml5Atoms::canvas, NS_HTML5TREE_BUILDER_OTHER);
- ELT_COMPLEXES = new nsHtml5ElementName(nsHtml5Atoms::complexes, nsHtml5Atoms::complexes, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DEFS = new nsHtml5ElementName(nsHtml5Atoms::defs, nsHtml5Atoms::defs, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DETAILS = new nsHtml5ElementName(nsHtml5Atoms::details, nsHtml5Atoms::details, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_EXISTS = new nsHtml5ElementName(nsHtml5Atoms::exists, nsHtml5Atoms::exists, NS_HTML5TREE_BUILDER_OTHER);
- ELT_IMPLIES = new nsHtml5ElementName(nsHtml5Atoms::implies, nsHtml5Atoms::implies, NS_HTML5TREE_BUILDER_OTHER);
- ELT_INTEGERS = new nsHtml5ElementName(nsHtml5Atoms::integers, nsHtml5Atoms::integers, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MS = new nsHtml5ElementName(nsHtml5Atoms::ms, nsHtml5Atoms::ms, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
- ELT_MPRESCRIPTS = new nsHtml5ElementName(nsHtml5Atoms::mprescripts, nsHtml5Atoms::mprescripts, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MMULTISCRIPTS = new nsHtml5ElementName(nsHtml5Atoms::mmultiscripts, nsHtml5Atoms::mmultiscripts, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MINUS = new nsHtml5ElementName(nsHtml5Atoms::minus, nsHtml5Atoms::minus, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOFRAMES = new nsHtml5ElementName(nsHtml5Atoms::noframes, nsHtml5Atoms::noframes, NS_HTML5TREE_BUILDER_NOFRAMES | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_NATURALNUMBERS = new nsHtml5ElementName(nsHtml5Atoms::naturalnumbers, nsHtml5Atoms::naturalnumbers, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PRIMES = new nsHtml5ElementName(nsHtml5Atoms::primes, nsHtml5Atoms::primes, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PROGRESS = new nsHtml5ElementName(nsHtml5Atoms::progress, nsHtml5Atoms::progress, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PLUS = new nsHtml5ElementName(nsHtml5Atoms::plus, nsHtml5Atoms::plus, NS_HTML5TREE_BUILDER_OTHER);
- ELT_REALS = new nsHtml5ElementName(nsHtml5Atoms::reals, nsHtml5Atoms::reals, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RATIONALS = new nsHtml5ElementName(nsHtml5Atoms::rationals, nsHtml5Atoms::rationals, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SEMANTICS = new nsHtml5ElementName(nsHtml5Atoms::semantics, nsHtml5Atoms::semantics, NS_HTML5TREE_BUILDER_OTHER);
- ELT_TIMES = new nsHtml5ElementName(nsHtml5Atoms::times, nsHtml5Atoms::times, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DT = new nsHtml5ElementName(nsHtml5Atoms::dt, nsHtml5Atoms::dt, NS_HTML5TREE_BUILDER_DD_OR_DT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_APPLET = new nsHtml5ElementName(nsHtml5Atoms::applet, nsHtml5Atoms::applet, NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
- ELT_ARCCOT = new nsHtml5ElementName(nsHtml5Atoms::arccot, nsHtml5Atoms::arccot, NS_HTML5TREE_BUILDER_OTHER);
- ELT_BASEFONT = new nsHtml5ElementName(nsHtml5Atoms::basefont, nsHtml5Atoms::basefont, NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_CARTESIANPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::cartesianproduct, nsHtml5Atoms::cartesianproduct, NS_HTML5TREE_BUILDER_OTHER);
- ELT_GT = new nsHtml5ElementName(nsHtml5Atoms::gt, nsHtml5Atoms::gt, NS_HTML5TREE_BUILDER_OTHER);
- ELT_DETERMINANT = new nsHtml5ElementName(nsHtml5Atoms::determinant, nsHtml5Atoms::determinant, NS_HTML5TREE_BUILDER_OTHER);
- ELT_EMPTYSET = new nsHtml5ElementName(nsHtml5Atoms::emptyset, nsHtml5Atoms::emptyset, NS_HTML5TREE_BUILDER_OTHER);
- ELT_EQUIVALENT = new nsHtml5ElementName(nsHtml5Atoms::equivalent, nsHtml5Atoms::equivalent, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FONT_FACE_FORMAT = new nsHtml5ElementName(nsHtml5Atoms::font_face_format, nsHtml5Atoms::font_face_format, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FOREIGNOBJECT = new nsHtml5ElementName(nsHtml5Atoms::foreignobject, nsHtml5Atoms::foreignObject, NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC | NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG);
- ELT_FIELDSET = new nsHtml5ElementName(nsHtml5Atoms::fieldset, nsHtml5Atoms::fieldset, NS_HTML5TREE_BUILDER_FIELDSET | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FRAMESET = new nsHtml5ElementName(nsHtml5Atoms::frameset, nsHtml5Atoms::frameset, NS_HTML5TREE_BUILDER_FRAMESET | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_FEOFFSET = new nsHtml5ElementName(nsHtml5Atoms::feoffset, nsHtml5Atoms::feOffset, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FESPOTLIGHT = new nsHtml5ElementName(nsHtml5Atoms::fespotlight, nsHtml5Atoms::feSpotLight, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEPOINTLIGHT = new nsHtml5ElementName(nsHtml5Atoms::fepointlight, nsHtml5Atoms::fePointLight, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEDISTANTLIGHT = new nsHtml5ElementName(nsHtml5Atoms::fedistantlight, nsHtml5Atoms::feDistantLight, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FONT = new nsHtml5ElementName(nsHtml5Atoms::font, nsHtml5Atoms::font, NS_HTML5TREE_BUILDER_FONT);
- ELT_LT = new nsHtml5ElementName(nsHtml5Atoms::lt, nsHtml5Atoms::lt, NS_HTML5TREE_BUILDER_OTHER);
- ELT_INTERSECT = new nsHtml5ElementName(nsHtml5Atoms::intersect, nsHtml5Atoms::intersect, NS_HTML5TREE_BUILDER_OTHER);
- ELT_IDENT = new nsHtml5ElementName(nsHtml5Atoms::ident, nsHtml5Atoms::ident, NS_HTML5TREE_BUILDER_OTHER);
- ELT_INPUT = new nsHtml5ElementName(nsHtml5Atoms::input, nsHtml5Atoms::input, NS_HTML5TREE_BUILDER_INPUT | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_LIMIT = new nsHtml5ElementName(nsHtml5Atoms::limit, nsHtml5Atoms::limit, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LOWLIMIT = new nsHtml5ElementName(nsHtml5Atoms::lowlimit, nsHtml5Atoms::lowlimit, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LINEARGRADIENT = new nsHtml5ElementName(nsHtml5Atoms::lineargradient, nsHtml5Atoms::linearGradient, NS_HTML5TREE_BUILDER_OTHER);
- ELT_LIST = new nsHtml5ElementName(nsHtml5Atoms::list, nsHtml5Atoms::list, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MOMENT = new nsHtml5ElementName(nsHtml5Atoms::moment, nsHtml5Atoms::moment, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MROOT = new nsHtml5ElementName(nsHtml5Atoms::mroot, nsHtml5Atoms::mroot, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MSQRT = new nsHtml5ElementName(nsHtml5Atoms::msqrt, nsHtml5Atoms::msqrt, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MOMENTABOUT = new nsHtml5ElementName(nsHtml5Atoms::momentabout, nsHtml5Atoms::momentabout, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MTEXT = new nsHtml5ElementName(nsHtml5Atoms::mtext, nsHtml5Atoms::mtext, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
- ELT_NOTSUBSET = new nsHtml5ElementName(nsHtml5Atoms::notsubset, nsHtml5Atoms::notsubset, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOTPRSUBSET = new nsHtml5ElementName(nsHtml5Atoms::notprsubset, nsHtml5Atoms::notprsubset, NS_HTML5TREE_BUILDER_OTHER);
- ELT_NOSCRIPT = new nsHtml5ElementName(nsHtml5Atoms::noscript, nsHtml5Atoms::noscript, NS_HTML5TREE_BUILDER_NOSCRIPT | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_NEST = new nsHtml5ElementName(nsHtml5Atoms::nest, nsHtml5Atoms::nest, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RT = new nsHtml5ElementName(nsHtml5Atoms::rt, nsHtml5Atoms::rt, NS_HTML5TREE_BUILDER_RT_OR_RP | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_OBJECT = new nsHtml5ElementName(nsHtml5Atoms::object, nsHtml5Atoms::object, NS_HTML5TREE_BUILDER_OBJECT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
- ELT_OUTERPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::outerproduct, nsHtml5Atoms::outerproduct, NS_HTML5TREE_BUILDER_OTHER);
- ELT_OUTPUT = new nsHtml5ElementName(nsHtml5Atoms::output, nsHtml5Atoms::output, NS_HTML5TREE_BUILDER_OUTPUT);
- ELT_PRODUCT = new nsHtml5ElementName(nsHtml5Atoms::product, nsHtml5Atoms::product, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PRSUBSET = new nsHtml5ElementName(nsHtml5Atoms::prsubset, nsHtml5Atoms::prsubset, NS_HTML5TREE_BUILDER_OTHER);
- ELT_PLAINTEXT = new nsHtml5ElementName(nsHtml5Atoms::plaintext, nsHtml5Atoms::plaintext, NS_HTML5TREE_BUILDER_PLAINTEXT | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TT = new nsHtml5ElementName(nsHtml5Atoms::tt, nsHtml5Atoms::tt, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
- ELT_QUOTIENT = new nsHtml5ElementName(nsHtml5Atoms::quotient, nsHtml5Atoms::quotient, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RECT = new nsHtml5ElementName(nsHtml5Atoms::rect, nsHtml5Atoms::rect, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RADIALGRADIENT = new nsHtml5ElementName(nsHtml5Atoms::radialgradient, nsHtml5Atoms::radialGradient, NS_HTML5TREE_BUILDER_OTHER);
- ELT_ROOT = new nsHtml5ElementName(nsHtml5Atoms::root, nsHtml5Atoms::root, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SELECT = new nsHtml5ElementName(nsHtml5Atoms::select, nsHtml5Atoms::select, NS_HTML5TREE_BUILDER_SELECT | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_SCALARPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::scalarproduct, nsHtml5Atoms::scalarproduct, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SUBSET = new nsHtml5ElementName(nsHtml5Atoms::subset, nsHtml5Atoms::subset, NS_HTML5TREE_BUILDER_OTHER);
- ELT_SCRIPT = new nsHtml5ElementName(nsHtml5Atoms::script, nsHtml5Atoms::script, NS_HTML5TREE_BUILDER_SCRIPT | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TFOOT = new nsHtml5ElementName(nsHtml5Atoms::tfoot, nsHtml5Atoms::tfoot, NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- ELT_TEXT = new nsHtml5ElementName(nsHtml5Atoms::text, nsHtml5Atoms::text, NS_HTML5TREE_BUILDER_OTHER);
- ELT_UPLIMIT = new nsHtml5ElementName(nsHtml5Atoms::uplimit, nsHtml5Atoms::uplimit, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VECTORPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::vectorproduct, nsHtml5Atoms::vectorproduct, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MENU = new nsHtml5ElementName(nsHtml5Atoms::menu, nsHtml5Atoms::menu, NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_SDEV = new nsHtml5ElementName(nsHtml5Atoms::sdev, nsHtml5Atoms::sdev, NS_HTML5TREE_BUILDER_OTHER);
- ELT_FEDROPSHADOW = new nsHtml5ElementName(nsHtml5Atoms::fedropshadow, nsHtml5Atoms::feDropShadow, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MROW = new nsHtml5ElementName(nsHtml5Atoms::mrow, nsHtml5Atoms::mrow, NS_HTML5TREE_BUILDER_OTHER);
- ELT_MATRIXROW = new nsHtml5ElementName(nsHtml5Atoms::matrixrow, nsHtml5Atoms::matrixrow, NS_HTML5TREE_BUILDER_OTHER);
- ELT_VIEW = new nsHtml5ElementName(nsHtml5Atoms::view, nsHtml5Atoms::view, NS_HTML5TREE_BUILDER_OTHER);
- 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_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);
- ELT_FEMORPHOLOGY = new nsHtml5ElementName(nsHtml5Atoms::femorphology, nsHtml5Atoms::feMorphology, NS_HTML5TREE_BUILDER_OTHER);
- ELT_IMAGINARY = new nsHtml5ElementName(nsHtml5Atoms::imaginary, nsHtml5Atoms::imaginary, NS_HTML5TREE_BUILDER_OTHER);
- ELT_INFINITY = new nsHtml5ElementName(nsHtml5Atoms::infinity, nsHtml5Atoms::infinity, NS_HTML5TREE_BUILDER_OTHER);
- ELT_RUBY = new nsHtml5ElementName(nsHtml5Atoms::ruby, nsHtml5Atoms::ruby, NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
- ELT_SUMMARY = new nsHtml5ElementName(nsHtml5Atoms::summary, nsHtml5Atoms::summary, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
- ELT_TBODY = new nsHtml5ElementName(nsHtml5Atoms::tbody, nsHtml5Atoms::tbody, NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
+ ELT_ISINDEX = new nsHtml5ElementName(nsHtml5Atoms::isindex, nsHtml5Atoms::isindex, nsHtml5TreeBuilder::ISINDEX | SPECIAL);
+ ELT_AND = new nsHtml5ElementName(nsHtml5Atoms::and_, nsHtml5Atoms::and_, nsHtml5TreeBuilder::OTHER);
+ ELT_ARG = new nsHtml5ElementName(nsHtml5Atoms::arg, nsHtml5Atoms::arg, nsHtml5TreeBuilder::OTHER);
+ ELT_ABS = new nsHtml5ElementName(nsHtml5Atoms::abs, nsHtml5Atoms::abs, nsHtml5TreeBuilder::OTHER);
+ ELT_BIG = new nsHtml5ElementName(nsHtml5Atoms::big, nsHtml5Atoms::big, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_BDO = new nsHtml5ElementName(nsHtml5Atoms::bdo, nsHtml5Atoms::bdo, nsHtml5TreeBuilder::OTHER);
+ ELT_CSC = new nsHtml5ElementName(nsHtml5Atoms::csc, nsHtml5Atoms::csc, nsHtml5TreeBuilder::OTHER);
+ ELT_COL = new nsHtml5ElementName(nsHtml5Atoms::col, nsHtml5Atoms::col, nsHtml5TreeBuilder::COL | SPECIAL);
+ ELT_COS = new nsHtml5ElementName(nsHtml5Atoms::cos, nsHtml5Atoms::cos, nsHtml5TreeBuilder::OTHER);
+ ELT_COT = new nsHtml5ElementName(nsHtml5Atoms::cot, nsHtml5Atoms::cot, nsHtml5TreeBuilder::OTHER);
+ ELT_DEL = new nsHtml5ElementName(nsHtml5Atoms::del, nsHtml5Atoms::del, nsHtml5TreeBuilder::OTHER);
+ ELT_DFN = new nsHtml5ElementName(nsHtml5Atoms::dfn, nsHtml5Atoms::dfn, nsHtml5TreeBuilder::OTHER);
+ ELT_DIR = new nsHtml5ElementName(nsHtml5Atoms::dir, nsHtml5Atoms::dir, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_DIV = new nsHtml5ElementName(nsHtml5Atoms::div, nsHtml5Atoms::div, nsHtml5TreeBuilder::DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+ ELT_EXP = new nsHtml5ElementName(nsHtml5Atoms::exp, nsHtml5Atoms::exp, nsHtml5TreeBuilder::OTHER);
+ ELT_GCD = new nsHtml5ElementName(nsHtml5Atoms::gcd, nsHtml5Atoms::gcd, nsHtml5TreeBuilder::OTHER);
+ ELT_GEQ = new nsHtml5ElementName(nsHtml5Atoms::geq, nsHtml5Atoms::geq, nsHtml5TreeBuilder::OTHER);
+ ELT_IMG = new nsHtml5ElementName(nsHtml5Atoms::img, nsHtml5Atoms::img, nsHtml5TreeBuilder::IMG | SPECIAL);
+ ELT_INS = new nsHtml5ElementName(nsHtml5Atoms::ins, nsHtml5Atoms::ins, nsHtml5TreeBuilder::OTHER);
+ ELT_INT = new nsHtml5ElementName(nsHtml5Atoms::int_, nsHtml5Atoms::int_, nsHtml5TreeBuilder::OTHER);
+ ELT_KBD = new nsHtml5ElementName(nsHtml5Atoms::kbd, nsHtml5Atoms::kbd, nsHtml5TreeBuilder::OTHER);
+ ELT_LOG = new nsHtml5ElementName(nsHtml5Atoms::log, nsHtml5Atoms::log, nsHtml5TreeBuilder::OTHER);
+ ELT_LCM = new nsHtml5ElementName(nsHtml5Atoms::lcm, nsHtml5Atoms::lcm, nsHtml5TreeBuilder::OTHER);
+ ELT_LEQ = new nsHtml5ElementName(nsHtml5Atoms::leq, nsHtml5Atoms::leq, nsHtml5TreeBuilder::OTHER);
+ ELT_MTD = new nsHtml5ElementName(nsHtml5Atoms::mtd, nsHtml5Atoms::mtd, nsHtml5TreeBuilder::OTHER);
+ ELT_MIN = new nsHtml5ElementName(nsHtml5Atoms::min, nsHtml5Atoms::min, nsHtml5TreeBuilder::OTHER);
+ ELT_MAP = new nsHtml5ElementName(nsHtml5Atoms::map, nsHtml5Atoms::map, nsHtml5TreeBuilder::OTHER);
+ ELT_MTR = new nsHtml5ElementName(nsHtml5Atoms::mtr, nsHtml5Atoms::mtr, nsHtml5TreeBuilder::OTHER);
+ ELT_MAX = new nsHtml5ElementName(nsHtml5Atoms::max, nsHtml5Atoms::max, nsHtml5TreeBuilder::OTHER);
+ ELT_NEQ = new nsHtml5ElementName(nsHtml5Atoms::neq, nsHtml5Atoms::neq, nsHtml5TreeBuilder::OTHER);
+ ELT_NOT = new nsHtml5ElementName(nsHtml5Atoms::not_, nsHtml5Atoms::not_, nsHtml5TreeBuilder::OTHER);
+ ELT_NAV = new nsHtml5ElementName(nsHtml5Atoms::nav, nsHtml5Atoms::nav, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_PRE = new nsHtml5ElementName(nsHtml5Atoms::pre, nsHtml5Atoms::pre, nsHtml5TreeBuilder::PRE_OR_LISTING | SPECIAL);
+ ELT_A = new nsHtml5ElementName(nsHtml5Atoms::a, nsHtml5Atoms::a, nsHtml5TreeBuilder::A);
+ ELT_B = new nsHtml5ElementName(nsHtml5Atoms::b, nsHtml5Atoms::b, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_RTC = new nsHtml5ElementName(nsHtml5Atoms::rtc, nsHtml5Atoms::rtc, nsHtml5TreeBuilder::RB_OR_RTC | OPTIONAL_END_TAG);
+ ELT_REM = new nsHtml5ElementName(nsHtml5Atoms::rem, nsHtml5Atoms::rem, nsHtml5TreeBuilder::OTHER);
+ ELT_SUB = new nsHtml5ElementName(nsHtml5Atoms::sub, nsHtml5Atoms::sub, nsHtml5TreeBuilder::RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+ ELT_SEC = new nsHtml5ElementName(nsHtml5Atoms::sec, nsHtml5Atoms::sec, nsHtml5TreeBuilder::OTHER);
+ ELT_SVG = new nsHtml5ElementName(nsHtml5Atoms::svg, nsHtml5Atoms::svg, nsHtml5TreeBuilder::SVG);
+ ELT_SUM = new nsHtml5ElementName(nsHtml5Atoms::sum, nsHtml5Atoms::sum, nsHtml5TreeBuilder::OTHER);
+ ELT_SIN = new nsHtml5ElementName(nsHtml5Atoms::sin, nsHtml5Atoms::sin, nsHtml5TreeBuilder::OTHER);
+ ELT_SEP = new nsHtml5ElementName(nsHtml5Atoms::sep, nsHtml5Atoms::sep, nsHtml5TreeBuilder::OTHER);
+ ELT_SUP = new nsHtml5ElementName(nsHtml5Atoms::sup, nsHtml5Atoms::sup, nsHtml5TreeBuilder::RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+ ELT_SET = new nsHtml5ElementName(nsHtml5Atoms::set, nsHtml5Atoms::set, nsHtml5TreeBuilder::OTHER);
+ ELT_TAN = new nsHtml5ElementName(nsHtml5Atoms::tan, nsHtml5Atoms::tan, nsHtml5TreeBuilder::OTHER);
+ ELT_USE = new nsHtml5ElementName(nsHtml5Atoms::use, nsHtml5Atoms::use, nsHtml5TreeBuilder::OTHER);
+ ELT_VAR = new nsHtml5ElementName(nsHtml5Atoms::var, nsHtml5Atoms::var, nsHtml5TreeBuilder::RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+ ELT_G = new nsHtml5ElementName(nsHtml5Atoms::g, nsHtml5Atoms::g, nsHtml5TreeBuilder::OTHER);
+ ELT_WBR = new nsHtml5ElementName(nsHtml5Atoms::wbr, nsHtml5Atoms::wbr, nsHtml5TreeBuilder::AREA_OR_WBR | SPECIAL);
+ ELT_XMP = new nsHtml5ElementName(nsHtml5Atoms::xmp, nsHtml5Atoms::xmp, nsHtml5TreeBuilder::XMP | SPECIAL);
+ ELT_XOR = new nsHtml5ElementName(nsHtml5Atoms::xor_, nsHtml5Atoms::xor_, nsHtml5TreeBuilder::OTHER);
+ ELT_I = new nsHtml5ElementName(nsHtml5Atoms::i, nsHtml5Atoms::i, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_P = new nsHtml5ElementName(nsHtml5Atoms::p, nsHtml5Atoms::p, nsHtml5TreeBuilder::P | SPECIAL | OPTIONAL_END_TAG);
+ ELT_Q = new nsHtml5ElementName(nsHtml5Atoms::q, nsHtml5Atoms::q, nsHtml5TreeBuilder::OTHER);
+ ELT_S = new nsHtml5ElementName(nsHtml5Atoms::s, nsHtml5Atoms::s, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_U = new nsHtml5ElementName(nsHtml5Atoms::u, nsHtml5Atoms::u, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_H1 = new nsHtml5ElementName(nsHtml5Atoms::h1, nsHtml5Atoms::h1, nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+ ELT_H2 = new nsHtml5ElementName(nsHtml5Atoms::h2, nsHtml5Atoms::h2, nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+ ELT_H3 = new nsHtml5ElementName(nsHtml5Atoms::h3, nsHtml5Atoms::h3, nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+ ELT_H4 = new nsHtml5ElementName(nsHtml5Atoms::h4, nsHtml5Atoms::h4, nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+ ELT_H5 = new nsHtml5ElementName(nsHtml5Atoms::h5, nsHtml5Atoms::h5, nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+ ELT_H6 = new nsHtml5ElementName(nsHtml5Atoms::h6, nsHtml5Atoms::h6, nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+ ELT_AREA = new nsHtml5ElementName(nsHtml5Atoms::area, nsHtml5Atoms::area, nsHtml5TreeBuilder::AREA_OR_WBR | SPECIAL);
+ ELT_EULERGAMMA = new nsHtml5ElementName(nsHtml5Atoms::eulergamma, nsHtml5Atoms::eulergamma, nsHtml5TreeBuilder::OTHER);
+ ELT_FEFUNCA = new nsHtml5ElementName(nsHtml5Atoms::fefunca, nsHtml5Atoms::feFuncA, nsHtml5TreeBuilder::OTHER);
+ ELT_LAMBDA = new nsHtml5ElementName(nsHtml5Atoms::lambda, nsHtml5Atoms::lambda, nsHtml5TreeBuilder::OTHER);
+ ELT_METADATA = new nsHtml5ElementName(nsHtml5Atoms::metadata, nsHtml5Atoms::metadata, nsHtml5TreeBuilder::OTHER);
+ ELT_META = new nsHtml5ElementName(nsHtml5Atoms::meta, nsHtml5Atoms::meta, nsHtml5TreeBuilder::META | SPECIAL);
+ ELT_TEXTAREA = new nsHtml5ElementName(nsHtml5Atoms::textarea, nsHtml5Atoms::textarea, nsHtml5TreeBuilder::TEXTAREA | SPECIAL);
+ ELT_FEFUNCB = new nsHtml5ElementName(nsHtml5Atoms::fefuncb, nsHtml5Atoms::feFuncB, nsHtml5TreeBuilder::OTHER);
+ ELT_MSUB = new nsHtml5ElementName(nsHtml5Atoms::msub, nsHtml5Atoms::msub, nsHtml5TreeBuilder::OTHER);
+ ELT_RB = new nsHtml5ElementName(nsHtml5Atoms::rb, nsHtml5Atoms::rb, nsHtml5TreeBuilder::RB_OR_RTC | OPTIONAL_END_TAG);
+ ELT_ARCSEC = new nsHtml5ElementName(nsHtml5Atoms::arcsec, nsHtml5Atoms::arcsec, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCCSC = new nsHtml5ElementName(nsHtml5Atoms::arccsc, nsHtml5Atoms::arccsc, nsHtml5TreeBuilder::OTHER);
+ ELT_DEFINITION_SRC = new nsHtml5ElementName(nsHtml5Atoms::definition_src, nsHtml5Atoms::definition_src, nsHtml5TreeBuilder::OTHER);
+ ELT_DESC = new nsHtml5ElementName(nsHtml5Atoms::desc, nsHtml5Atoms::desc, nsHtml5TreeBuilder::FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
+ ELT_FONT_FACE_SRC = new nsHtml5ElementName(nsHtml5Atoms::font_face_src, nsHtml5Atoms::font_face_src, nsHtml5TreeBuilder::OTHER);
+ ELT_MFRAC = new nsHtml5ElementName(nsHtml5Atoms::mfrac, nsHtml5Atoms::mfrac, nsHtml5TreeBuilder::OTHER);
+ ELT_DD = new nsHtml5ElementName(nsHtml5Atoms::dd, nsHtml5Atoms::dd, nsHtml5TreeBuilder::DD_OR_DT | SPECIAL | OPTIONAL_END_TAG);
+ ELT_BGSOUND = new nsHtml5ElementName(nsHtml5Atoms::bgsound, nsHtml5Atoms::bgsound, nsHtml5TreeBuilder::LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
+ ELT_CARD = new nsHtml5ElementName(nsHtml5Atoms::card, nsHtml5Atoms::card, nsHtml5TreeBuilder::OTHER);
+ ELT_DISCARD = new nsHtml5ElementName(nsHtml5Atoms::discard, nsHtml5Atoms::discard, nsHtml5TreeBuilder::OTHER);
+ ELT_EMBED = new nsHtml5ElementName(nsHtml5Atoms::embed, nsHtml5Atoms::embed, nsHtml5TreeBuilder::EMBED | SPECIAL);
+ ELT_FEBLEND = new nsHtml5ElementName(nsHtml5Atoms::feblend, nsHtml5Atoms::feBlend, nsHtml5TreeBuilder::OTHER);
+ ELT_FEFLOOD = new nsHtml5ElementName(nsHtml5Atoms::feflood, nsHtml5Atoms::feFlood, nsHtml5TreeBuilder::OTHER);
+ ELT_GRAD = new nsHtml5ElementName(nsHtml5Atoms::grad, nsHtml5Atoms::grad, nsHtml5TreeBuilder::OTHER);
+ ELT_HEAD = new nsHtml5ElementName(nsHtml5Atoms::head, nsHtml5Atoms::head, nsHtml5TreeBuilder::HEAD | SPECIAL | OPTIONAL_END_TAG);
+ ELT_LEGEND = new nsHtml5ElementName(nsHtml5Atoms::legend, nsHtml5Atoms::legend, nsHtml5TreeBuilder::OTHER);
+ ELT_MFENCED = new nsHtml5ElementName(nsHtml5Atoms::mfenced, nsHtml5Atoms::mfenced, nsHtml5TreeBuilder::OTHER);
+ ELT_MPADDED = new nsHtml5ElementName(nsHtml5Atoms::mpadded, nsHtml5Atoms::mpadded, nsHtml5TreeBuilder::OTHER);
+ ELT_NOEMBED = new nsHtml5ElementName(nsHtml5Atoms::noembed, nsHtml5Atoms::noembed, nsHtml5TreeBuilder::NOEMBED | SPECIAL);
+ ELT_TD = new nsHtml5ElementName(nsHtml5Atoms::td, nsHtml5Atoms::td, nsHtml5TreeBuilder::TD_OR_TH | SPECIAL | SCOPING | OPTIONAL_END_TAG);
+ ELT_THEAD = new nsHtml5ElementName(nsHtml5Atoms::thead, nsHtml5Atoms::thead, nsHtml5TreeBuilder::TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+ ELT_ASIDE = new nsHtml5ElementName(nsHtml5Atoms::aside, nsHtml5Atoms::aside, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_ARTICLE = new nsHtml5ElementName(nsHtml5Atoms::article, nsHtml5Atoms::article, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_ANIMATE = new nsHtml5ElementName(nsHtml5Atoms::animate, nsHtml5Atoms::animate, nsHtml5TreeBuilder::OTHER);
+ ELT_BASE = new nsHtml5ElementName(nsHtml5Atoms::base, nsHtml5Atoms::base, nsHtml5TreeBuilder::BASE | SPECIAL);
+ ELT_BLOCKQUOTE = new nsHtml5ElementName(nsHtml5Atoms::blockquote, nsHtml5Atoms::blockquote, nsHtml5TreeBuilder::DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+ ELT_CODE = new nsHtml5ElementName(nsHtml5Atoms::code, nsHtml5Atoms::code, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_CIRCLE = new nsHtml5ElementName(nsHtml5Atoms::circle, nsHtml5Atoms::circle, nsHtml5TreeBuilder::OTHER);
+ ELT_COLOR_PROFILE = new nsHtml5ElementName(nsHtml5Atoms::color_profile, nsHtml5Atoms::color_profile, nsHtml5TreeBuilder::OTHER);
+ ELT_COMPOSE = new nsHtml5ElementName(nsHtml5Atoms::compose, nsHtml5Atoms::compose, nsHtml5TreeBuilder::OTHER);
+ ELT_CONJUGATE = new nsHtml5ElementName(nsHtml5Atoms::conjugate, nsHtml5Atoms::conjugate, nsHtml5TreeBuilder::OTHER);
+ ELT_CITE = new nsHtml5ElementName(nsHtml5Atoms::cite, nsHtml5Atoms::cite, nsHtml5TreeBuilder::OTHER);
+ ELT_DIVERGENCE = new nsHtml5ElementName(nsHtml5Atoms::divergence, nsHtml5Atoms::divergence, nsHtml5TreeBuilder::OTHER);
+ ELT_DIVIDE = new nsHtml5ElementName(nsHtml5Atoms::divide, nsHtml5Atoms::divide, nsHtml5TreeBuilder::OTHER);
+ ELT_DEGREE = new nsHtml5ElementName(nsHtml5Atoms::degree, nsHtml5Atoms::degree, nsHtml5TreeBuilder::OTHER);
+ ELT_DECLARE = new nsHtml5ElementName(nsHtml5Atoms::declare, nsHtml5Atoms::declare, nsHtml5TreeBuilder::OTHER);
+ ELT_DATATEMPLATE = new nsHtml5ElementName(nsHtml5Atoms::datatemplate, nsHtml5Atoms::datatemplate, nsHtml5TreeBuilder::OTHER);
+ ELT_EXPONENTIALE = new nsHtml5ElementName(nsHtml5Atoms::exponentiale, nsHtml5Atoms::exponentiale, nsHtml5TreeBuilder::OTHER);
+ ELT_ELLIPSE = new nsHtml5ElementName(nsHtml5Atoms::ellipse, nsHtml5Atoms::ellipse, nsHtml5TreeBuilder::OTHER);
+ ELT_FONT_FACE = new nsHtml5ElementName(nsHtml5Atoms::font_face, nsHtml5Atoms::font_face, nsHtml5TreeBuilder::OTHER);
+ ELT_FETURBULENCE = new nsHtml5ElementName(nsHtml5Atoms::feturbulence, nsHtml5Atoms::feTurbulence, nsHtml5TreeBuilder::OTHER);
+ ELT_FEMERGENODE = new nsHtml5ElementName(nsHtml5Atoms::femergenode, nsHtml5Atoms::feMergeNode, nsHtml5TreeBuilder::OTHER);
+ ELT_FEIMAGE = new nsHtml5ElementName(nsHtml5Atoms::feimage, nsHtml5Atoms::feImage, nsHtml5TreeBuilder::OTHER);
+ ELT_FEMERGE = new nsHtml5ElementName(nsHtml5Atoms::femerge, nsHtml5Atoms::feMerge, nsHtml5TreeBuilder::OTHER);
+ ELT_FETILE = new nsHtml5ElementName(nsHtml5Atoms::fetile, nsHtml5Atoms::feTile, nsHtml5TreeBuilder::OTHER);
+ ELT_FONT_FACE_NAME = new nsHtml5ElementName(nsHtml5Atoms::font_face_name, nsHtml5Atoms::font_face_name, nsHtml5TreeBuilder::OTHER);
+ ELT_FRAME = new nsHtml5ElementName(nsHtml5Atoms::frame, nsHtml5Atoms::frame, nsHtml5TreeBuilder::FRAME | SPECIAL);
+ ELT_FIGURE = new nsHtml5ElementName(nsHtml5Atoms::figure, nsHtml5Atoms::figure, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_FALSE = new nsHtml5ElementName(nsHtml5Atoms::false_, nsHtml5Atoms::false_, nsHtml5TreeBuilder::OTHER);
+ ELT_FECOMPOSITE = new nsHtml5ElementName(nsHtml5Atoms::fecomposite, nsHtml5Atoms::feComposite, nsHtml5TreeBuilder::OTHER);
+ ELT_IMAGE = new nsHtml5ElementName(nsHtml5Atoms::image, nsHtml5Atoms::image, nsHtml5TreeBuilder::IMAGE);
+ ELT_IFRAME = new nsHtml5ElementName(nsHtml5Atoms::iframe, nsHtml5Atoms::iframe, nsHtml5TreeBuilder::IFRAME | SPECIAL);
+ ELT_INVERSE = new nsHtml5ElementName(nsHtml5Atoms::inverse, nsHtml5Atoms::inverse, nsHtml5TreeBuilder::OTHER);
+ ELT_LINE = new nsHtml5ElementName(nsHtml5Atoms::line, nsHtml5Atoms::line, nsHtml5TreeBuilder::OTHER);
+ ELT_LOGBASE = new nsHtml5ElementName(nsHtml5Atoms::logbase, nsHtml5Atoms::logbase, nsHtml5TreeBuilder::OTHER);
+ ELT_MSPACE = new nsHtml5ElementName(nsHtml5Atoms::mspace, nsHtml5Atoms::mspace, nsHtml5TreeBuilder::OTHER);
+ ELT_MODE = new nsHtml5ElementName(nsHtml5Atoms::mode, nsHtml5Atoms::mode, nsHtml5TreeBuilder::OTHER);
+ ELT_MARQUEE = new nsHtml5ElementName(nsHtml5Atoms::marquee, nsHtml5Atoms::marquee, nsHtml5TreeBuilder::MARQUEE_OR_APPLET | SPECIAL | SCOPING);
+ ELT_MTABLE = new nsHtml5ElementName(nsHtml5Atoms::mtable, nsHtml5Atoms::mtable, nsHtml5TreeBuilder::OTHER);
+ ELT_MSTYLE = new nsHtml5ElementName(nsHtml5Atoms::mstyle, nsHtml5Atoms::mstyle, nsHtml5TreeBuilder::OTHER);
+ ELT_MENCLOSE = new nsHtml5ElementName(nsHtml5Atoms::menclose, nsHtml5Atoms::menclose, nsHtml5TreeBuilder::OTHER);
+ ELT_NONE = new nsHtml5ElementName(nsHtml5Atoms::none, nsHtml5Atoms::none, nsHtml5TreeBuilder::OTHER);
+ ELT_OTHERWISE = new nsHtml5ElementName(nsHtml5Atoms::otherwise, nsHtml5Atoms::otherwise, nsHtml5TreeBuilder::OTHER);
+ ELT_PIECE = new nsHtml5ElementName(nsHtml5Atoms::piece, nsHtml5Atoms::piece, nsHtml5TreeBuilder::OTHER);
+ ELT_POLYLINE = new nsHtml5ElementName(nsHtml5Atoms::polyline, nsHtml5Atoms::polyline, nsHtml5TreeBuilder::OTHER);
+ ELT_PICTURE = new nsHtml5ElementName(nsHtml5Atoms::picture, nsHtml5Atoms::picture, nsHtml5TreeBuilder::OTHER);
+ ELT_PIECEWISE = new nsHtml5ElementName(nsHtml5Atoms::piecewise, nsHtml5Atoms::piecewise, nsHtml5TreeBuilder::OTHER);
+ ELT_RULE = new nsHtml5ElementName(nsHtml5Atoms::rule, nsHtml5Atoms::rule, nsHtml5TreeBuilder::OTHER);
+ ELT_SOURCE = new nsHtml5ElementName(nsHtml5Atoms::source, nsHtml5Atoms::source, nsHtml5TreeBuilder::PARAM_OR_SOURCE_OR_TRACK);
+ ELT_STRIKE = new nsHtml5ElementName(nsHtml5Atoms::strike, nsHtml5Atoms::strike, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_STYLE = new nsHtml5ElementName(nsHtml5Atoms::style, nsHtml5Atoms::style, nsHtml5TreeBuilder::STYLE | SPECIAL);
+ ELT_TABLE = new nsHtml5ElementName(nsHtml5Atoms::table, nsHtml5Atoms::table, nsHtml5TreeBuilder::TABLE | SPECIAL | FOSTER_PARENTING | SCOPING);
+ ELT_TITLE = new nsHtml5ElementName(nsHtml5Atoms::title, nsHtml5Atoms::title, nsHtml5TreeBuilder::TITLE | SPECIAL | SCOPING_AS_SVG);
+ ELT_TIME = new nsHtml5ElementName(nsHtml5Atoms::time, nsHtml5Atoms::time, nsHtml5TreeBuilder::OTHER);
+ ELT_TRANSPOSE = new nsHtml5ElementName(nsHtml5Atoms::transpose, nsHtml5Atoms::transpose, nsHtml5TreeBuilder::OTHER);
+ ELT_TEMPLATE = new nsHtml5ElementName(nsHtml5Atoms::template_, nsHtml5Atoms::template_, nsHtml5TreeBuilder::TEMPLATE | SPECIAL | SCOPING);
+ ELT_TRUE = new nsHtml5ElementName(nsHtml5Atoms::true_, nsHtml5Atoms::true_, nsHtml5TreeBuilder::OTHER);
+ ELT_VARIANCE = new nsHtml5ElementName(nsHtml5Atoms::variance, nsHtml5Atoms::variance, nsHtml5TreeBuilder::OTHER);
+ ELT_ALTGLYPHDEF = new nsHtml5ElementName(nsHtml5Atoms::altglyphdef, nsHtml5Atoms::altGlyphDef, nsHtml5TreeBuilder::OTHER);
+ ELT_DIFF = new nsHtml5ElementName(nsHtml5Atoms::diff, nsHtml5Atoms::diff, nsHtml5TreeBuilder::OTHER);
+ ELT_FACTOROF = new nsHtml5ElementName(nsHtml5Atoms::factorof, nsHtml5Atoms::factorof, nsHtml5TreeBuilder::OTHER);
+ ELT_GLYPHREF = new nsHtml5ElementName(nsHtml5Atoms::glyphref, nsHtml5Atoms::glyphRef, nsHtml5TreeBuilder::OTHER);
+ ELT_PARTIALDIFF = new nsHtml5ElementName(nsHtml5Atoms::partialdiff, nsHtml5Atoms::partialdiff, nsHtml5TreeBuilder::OTHER);
+ ELT_SETDIFF = new nsHtml5ElementName(nsHtml5Atoms::setdiff, nsHtml5Atoms::setdiff, nsHtml5TreeBuilder::OTHER);
+ ELT_TREF = new nsHtml5ElementName(nsHtml5Atoms::tref, nsHtml5Atoms::tref, nsHtml5TreeBuilder::OTHER);
+ ELT_CEILING = new nsHtml5ElementName(nsHtml5Atoms::ceiling, nsHtml5Atoms::ceiling, nsHtml5TreeBuilder::OTHER);
+ ELT_DIALOG = new nsHtml5ElementName(nsHtml5Atoms::dialog, nsHtml5Atoms::dialog, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_FEFUNCG = new nsHtml5ElementName(nsHtml5Atoms::fefuncg, nsHtml5Atoms::feFuncG, nsHtml5TreeBuilder::OTHER);
+ ELT_FEDIFFUSELIGHTING = new nsHtml5ElementName(nsHtml5Atoms::fediffuselighting, nsHtml5Atoms::feDiffuseLighting, nsHtml5TreeBuilder::OTHER);
+ ELT_FESPECULARLIGHTING = new nsHtml5ElementName(nsHtml5Atoms::fespecularlighting, nsHtml5Atoms::feSpecularLighting, nsHtml5TreeBuilder::OTHER);
+ ELT_LISTING = new nsHtml5ElementName(nsHtml5Atoms::listing, nsHtml5Atoms::listing, nsHtml5TreeBuilder::PRE_OR_LISTING | SPECIAL);
+ ELT_STRONG = new nsHtml5ElementName(nsHtml5Atoms::strong, nsHtml5Atoms::strong, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_ARCSECH = new nsHtml5ElementName(nsHtml5Atoms::arcsech, nsHtml5Atoms::arcsech, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCCSCH = new nsHtml5ElementName(nsHtml5Atoms::arccsch, nsHtml5Atoms::arccsch, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCTANH = new nsHtml5ElementName(nsHtml5Atoms::arctanh, nsHtml5Atoms::arctanh, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCSINH = new nsHtml5ElementName(nsHtml5Atoms::arcsinh, nsHtml5Atoms::arcsinh, nsHtml5TreeBuilder::OTHER);
+ ELT_ALTGLYPH = new nsHtml5ElementName(nsHtml5Atoms::altglyph, nsHtml5Atoms::altGlyph, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCCOSH = new nsHtml5ElementName(nsHtml5Atoms::arccosh, nsHtml5Atoms::arccosh, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCCOTH = new nsHtml5ElementName(nsHtml5Atoms::arccoth, nsHtml5Atoms::arccoth, nsHtml5TreeBuilder::OTHER);
+ ELT_CSCH = new nsHtml5ElementName(nsHtml5Atoms::csch, nsHtml5Atoms::csch, nsHtml5TreeBuilder::OTHER);
+ ELT_COSH = new nsHtml5ElementName(nsHtml5Atoms::cosh, nsHtml5Atoms::cosh, nsHtml5TreeBuilder::OTHER);
+ ELT_CLIPPATH = new nsHtml5ElementName(nsHtml5Atoms::clippath, nsHtml5Atoms::clipPath, nsHtml5TreeBuilder::OTHER);
+ ELT_COTH = new nsHtml5ElementName(nsHtml5Atoms::coth, nsHtml5Atoms::coth, nsHtml5TreeBuilder::OTHER);
+ ELT_GLYPH = new nsHtml5ElementName(nsHtml5Atoms::glyph, nsHtml5Atoms::glyph, nsHtml5TreeBuilder::OTHER);
+ ELT_MGLYPH = new nsHtml5ElementName(nsHtml5Atoms::mglyph, nsHtml5Atoms::mglyph, nsHtml5TreeBuilder::MGLYPH_OR_MALIGNMARK);
+ ELT_MISSING_GLYPH = new nsHtml5ElementName(nsHtml5Atoms::missing_glyph, nsHtml5Atoms::missing_glyph, nsHtml5TreeBuilder::OTHER);
+ ELT_MATH = new nsHtml5ElementName(nsHtml5Atoms::math, nsHtml5Atoms::math, nsHtml5TreeBuilder::MATH);
+ ELT_MPATH = new nsHtml5ElementName(nsHtml5Atoms::mpath, nsHtml5Atoms::mpath, nsHtml5TreeBuilder::OTHER);
+ ELT_PREFETCH = new nsHtml5ElementName(nsHtml5Atoms::prefetch, nsHtml5Atoms::prefetch, nsHtml5TreeBuilder::OTHER);
+ ELT_PATH = new nsHtml5ElementName(nsHtml5Atoms::path, nsHtml5Atoms::path, nsHtml5TreeBuilder::OTHER);
+ ELT_TH = new nsHtml5ElementName(nsHtml5Atoms::th, nsHtml5Atoms::th, nsHtml5TreeBuilder::TD_OR_TH | SPECIAL | SCOPING | OPTIONAL_END_TAG);
+ ELT_SECH = new nsHtml5ElementName(nsHtml5Atoms::sech, nsHtml5Atoms::sech, nsHtml5TreeBuilder::OTHER);
+ ELT_SWITCH = new nsHtml5ElementName(nsHtml5Atoms::switch_, nsHtml5Atoms::switch_, nsHtml5TreeBuilder::OTHER);
+ ELT_SINH = new nsHtml5ElementName(nsHtml5Atoms::sinh, nsHtml5Atoms::sinh, nsHtml5TreeBuilder::OTHER);
+ ELT_TANH = new nsHtml5ElementName(nsHtml5Atoms::tanh, nsHtml5Atoms::tanh, nsHtml5TreeBuilder::OTHER);
+ ELT_TEXTPATH = new nsHtml5ElementName(nsHtml5Atoms::textpath, nsHtml5Atoms::textPath, nsHtml5TreeBuilder::OTHER);
+ ELT_CI = new nsHtml5ElementName(nsHtml5Atoms::ci, nsHtml5Atoms::ci, nsHtml5TreeBuilder::OTHER);
+ ELT_FONT_FACE_URI = new nsHtml5ElementName(nsHtml5Atoms::font_face_uri, nsHtml5Atoms::font_face_uri, nsHtml5TreeBuilder::OTHER);
+ ELT_LI = new nsHtml5ElementName(nsHtml5Atoms::li, nsHtml5Atoms::li, nsHtml5TreeBuilder::LI | SPECIAL | OPTIONAL_END_TAG);
+ ELT_IMAGINARYI = new nsHtml5ElementName(nsHtml5Atoms::imaginaryi, nsHtml5Atoms::imaginaryi, nsHtml5TreeBuilder::OTHER);
+ ELT_MI = new nsHtml5ElementName(nsHtml5Atoms::mi, nsHtml5Atoms::mi, nsHtml5TreeBuilder::MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+ ELT_PI = new nsHtml5ElementName(nsHtml5Atoms::pi, nsHtml5Atoms::pi, nsHtml5TreeBuilder::OTHER);
+ ELT_LINK = new nsHtml5ElementName(nsHtml5Atoms::link, nsHtml5Atoms::link, nsHtml5TreeBuilder::LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
+ ELT_MARK = new nsHtml5ElementName(nsHtml5Atoms::mark, nsHtml5Atoms::mark, nsHtml5TreeBuilder::OTHER);
+ ELT_MALIGNMARK = new nsHtml5ElementName(nsHtml5Atoms::malignmark, nsHtml5Atoms::malignmark, nsHtml5TreeBuilder::MGLYPH_OR_MALIGNMARK);
+ ELT_MASK = new nsHtml5ElementName(nsHtml5Atoms::mask, nsHtml5Atoms::mask, nsHtml5TreeBuilder::OTHER);
+ ELT_TBREAK = new nsHtml5ElementName(nsHtml5Atoms::tbreak, nsHtml5Atoms::tbreak, nsHtml5TreeBuilder::OTHER);
+ ELT_TRACK = new nsHtml5ElementName(nsHtml5Atoms::track, nsHtml5Atoms::track, nsHtml5TreeBuilder::PARAM_OR_SOURCE_OR_TRACK | SPECIAL);
+ ELT_DL = new nsHtml5ElementName(nsHtml5Atoms::dl, nsHtml5Atoms::dl, nsHtml5TreeBuilder::UL_OR_OL_OR_DL | SPECIAL);
+ ELT_ANNOTATION_XML = new nsHtml5ElementName(nsHtml5Atoms::annotation_xml, nsHtml5Atoms::annotation_xml, nsHtml5TreeBuilder::ANNOTATION_XML | SCOPING_AS_MATHML);
+ ELT_CSYMBOL = new nsHtml5ElementName(nsHtml5Atoms::csymbol, nsHtml5Atoms::csymbol, nsHtml5TreeBuilder::OTHER);
+ ELT_CURL = new nsHtml5ElementName(nsHtml5Atoms::curl, nsHtml5Atoms::curl, nsHtml5TreeBuilder::OTHER);
+ ELT_FACTORIAL = new nsHtml5ElementName(nsHtml5Atoms::factorial, nsHtml5Atoms::factorial, nsHtml5TreeBuilder::OTHER);
+ ELT_FORALL = new nsHtml5ElementName(nsHtml5Atoms::forall, nsHtml5Atoms::forall, nsHtml5TreeBuilder::OTHER);
+ ELT_HTML = new nsHtml5ElementName(nsHtml5Atoms::html, nsHtml5Atoms::html, nsHtml5TreeBuilder::HTML | SPECIAL | SCOPING | OPTIONAL_END_TAG);
+ ELT_INTERVAL = new nsHtml5ElementName(nsHtml5Atoms::interval, nsHtml5Atoms::interval, nsHtml5TreeBuilder::OTHER);
+ ELT_OL = new nsHtml5ElementName(nsHtml5Atoms::ol, nsHtml5Atoms::ol, nsHtml5TreeBuilder::UL_OR_OL_OR_DL | SPECIAL);
+ ELT_LABEL = new nsHtml5ElementName(nsHtml5Atoms::label, nsHtml5Atoms::label, nsHtml5TreeBuilder::OTHER);
+ ELT_UL = new nsHtml5ElementName(nsHtml5Atoms::ul, nsHtml5Atoms::ul, nsHtml5TreeBuilder::UL_OR_OL_OR_DL | SPECIAL);
+ ELT_REAL = new nsHtml5ElementName(nsHtml5Atoms::real, nsHtml5Atoms::real, nsHtml5TreeBuilder::OTHER);
+ ELT_SMALL = new nsHtml5ElementName(nsHtml5Atoms::small_, nsHtml5Atoms::small_, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_SYMBOL = new nsHtml5ElementName(nsHtml5Atoms::symbol, nsHtml5Atoms::symbol, nsHtml5TreeBuilder::OTHER);
+ ELT_ALTGLYPHITEM = new nsHtml5ElementName(nsHtml5Atoms::altglyphitem, nsHtml5Atoms::altGlyphItem, nsHtml5TreeBuilder::OTHER);
+ ELT_ANIMATETRANSFORM = new nsHtml5ElementName(nsHtml5Atoms::animatetransform, nsHtml5Atoms::animateTransform, nsHtml5TreeBuilder::OTHER);
+ ELT_ACRONYM = new nsHtml5ElementName(nsHtml5Atoms::acronym, nsHtml5Atoms::acronym, nsHtml5TreeBuilder::OTHER);
+ ELT_EM = new nsHtml5ElementName(nsHtml5Atoms::em, nsHtml5Atoms::em, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_FORM = new nsHtml5ElementName(nsHtml5Atoms::form, nsHtml5Atoms::form, nsHtml5TreeBuilder::FORM | SPECIAL);
+ ELT_MENUITEM = new nsHtml5ElementName(nsHtml5Atoms::menuitem, nsHtml5Atoms::menuitem, nsHtml5TreeBuilder::MENUITEM);
+ ELT_MPHANTOM = new nsHtml5ElementName(nsHtml5Atoms::mphantom, nsHtml5Atoms::mphantom, nsHtml5TreeBuilder::OTHER);
+ ELT_PARAM = new nsHtml5ElementName(nsHtml5Atoms::param, nsHtml5Atoms::param, nsHtml5TreeBuilder::PARAM_OR_SOURCE_OR_TRACK | SPECIAL);
+ ELT_CN = new nsHtml5ElementName(nsHtml5Atoms::cn, nsHtml5Atoms::cn, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCTAN = new nsHtml5ElementName(nsHtml5Atoms::arctan, nsHtml5Atoms::arctan, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCSIN = new nsHtml5ElementName(nsHtml5Atoms::arcsin, nsHtml5Atoms::arcsin, nsHtml5TreeBuilder::OTHER);
+ ELT_ANIMATION = new nsHtml5ElementName(nsHtml5Atoms::animation, nsHtml5Atoms::animation, nsHtml5TreeBuilder::OTHER);
+ ELT_ANNOTATION = new nsHtml5ElementName(nsHtml5Atoms::annotation, nsHtml5Atoms::annotation, nsHtml5TreeBuilder::OTHER);
+ ELT_ANIMATEMOTION = new nsHtml5ElementName(nsHtml5Atoms::animatemotion, nsHtml5Atoms::animateMotion, nsHtml5TreeBuilder::OTHER);
+ ELT_BUTTON = new nsHtml5ElementName(nsHtml5Atoms::button, nsHtml5Atoms::button, nsHtml5TreeBuilder::BUTTON | SPECIAL);
+ ELT_FN = new nsHtml5ElementName(nsHtml5Atoms::fn, nsHtml5Atoms::fn, nsHtml5TreeBuilder::OTHER);
+ ELT_CODOMAIN = new nsHtml5ElementName(nsHtml5Atoms::codomain, nsHtml5Atoms::codomain, nsHtml5TreeBuilder::OTHER);
+ ELT_CAPTION = new nsHtml5ElementName(nsHtml5Atoms::caption, nsHtml5Atoms::caption, nsHtml5TreeBuilder::CAPTION | SPECIAL | SCOPING);
+ ELT_CONDITION = new nsHtml5ElementName(nsHtml5Atoms::condition, nsHtml5Atoms::condition, nsHtml5TreeBuilder::OTHER);
+ ELT_DOMAIN = new nsHtml5ElementName(nsHtml5Atoms::domain, nsHtml5Atoms::domain, nsHtml5TreeBuilder::OTHER);
+ ELT_DOMAINOFAPPLICATION = new nsHtml5ElementName(nsHtml5Atoms::domainofapplication, nsHtml5Atoms::domainofapplication, nsHtml5TreeBuilder::OTHER);
+ ELT_IN = new nsHtml5ElementName(nsHtml5Atoms::in, nsHtml5Atoms::in, nsHtml5TreeBuilder::OTHER);
+ ELT_FIGCAPTION = new nsHtml5ElementName(nsHtml5Atoms::figcaption, nsHtml5Atoms::figcaption, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_HKERN = new nsHtml5ElementName(nsHtml5Atoms::hkern, nsHtml5Atoms::hkern, nsHtml5TreeBuilder::OTHER);
+ ELT_LN = new nsHtml5ElementName(nsHtml5Atoms::ln, nsHtml5Atoms::ln, nsHtml5TreeBuilder::OTHER);
+ ELT_MN = new nsHtml5ElementName(nsHtml5Atoms::mn, nsHtml5Atoms::mn, nsHtml5TreeBuilder::MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+ ELT_KEYGEN = new nsHtml5ElementName(nsHtml5Atoms::keygen, nsHtml5Atoms::keygen, nsHtml5TreeBuilder::KEYGEN);
+ ELT_LAPLACIAN = new nsHtml5ElementName(nsHtml5Atoms::laplacian, nsHtml5Atoms::laplacian, nsHtml5TreeBuilder::OTHER);
+ ELT_MEAN = new nsHtml5ElementName(nsHtml5Atoms::mean, nsHtml5Atoms::mean, nsHtml5TreeBuilder::OTHER);
+ ELT_MEDIAN = new nsHtml5ElementName(nsHtml5Atoms::median, nsHtml5Atoms::median, nsHtml5TreeBuilder::OTHER);
+ ELT_MAIN = new nsHtml5ElementName(nsHtml5Atoms::main, nsHtml5Atoms::main, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_MACTION = new nsHtml5ElementName(nsHtml5Atoms::maction, nsHtml5Atoms::maction, nsHtml5TreeBuilder::OTHER);
+ ELT_NOTIN = new nsHtml5ElementName(nsHtml5Atoms::notin, nsHtml5Atoms::notin, nsHtml5TreeBuilder::OTHER);
+ ELT_OPTION = new nsHtml5ElementName(nsHtml5Atoms::option, nsHtml5Atoms::option, nsHtml5TreeBuilder::OPTION | OPTIONAL_END_TAG);
+ ELT_POLYGON = new nsHtml5ElementName(nsHtml5Atoms::polygon, nsHtml5Atoms::polygon, nsHtml5TreeBuilder::OTHER);
+ ELT_PATTERN = new nsHtml5ElementName(nsHtml5Atoms::pattern, nsHtml5Atoms::pattern, nsHtml5TreeBuilder::OTHER);
+ ELT_RELN = new nsHtml5ElementName(nsHtml5Atoms::reln, nsHtml5Atoms::reln, nsHtml5TreeBuilder::OTHER);
+ ELT_SPAN = new nsHtml5ElementName(nsHtml5Atoms::span, nsHtml5Atoms::span, nsHtml5TreeBuilder::RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+ ELT_SECTION = new nsHtml5ElementName(nsHtml5Atoms::section, nsHtml5Atoms::section, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_TSPAN = new nsHtml5ElementName(nsHtml5Atoms::tspan, nsHtml5Atoms::tspan, nsHtml5TreeBuilder::OTHER);
+ ELT_UNION = new nsHtml5ElementName(nsHtml5Atoms::union_, nsHtml5Atoms::union_, nsHtml5TreeBuilder::OTHER);
+ ELT_VKERN = new nsHtml5ElementName(nsHtml5Atoms::vkern, nsHtml5Atoms::vkern, nsHtml5TreeBuilder::OTHER);
+ ELT_AUDIO = new nsHtml5ElementName(nsHtml5Atoms::audio, nsHtml5Atoms::audio, nsHtml5TreeBuilder::OTHER);
+ ELT_MO = new nsHtml5ElementName(nsHtml5Atoms::mo, nsHtml5Atoms::mo, nsHtml5TreeBuilder::MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+ ELT_TENDSTO = new nsHtml5ElementName(nsHtml5Atoms::tendsto, nsHtml5Atoms::tendsto, nsHtml5TreeBuilder::OTHER);
+ ELT_VIDEO = new nsHtml5ElementName(nsHtml5Atoms::video, nsHtml5Atoms::video, nsHtml5TreeBuilder::OTHER);
+ ELT_COLGROUP = new nsHtml5ElementName(nsHtml5Atoms::colgroup, nsHtml5Atoms::colgroup, nsHtml5TreeBuilder::COLGROUP | SPECIAL | OPTIONAL_END_TAG);
+ ELT_FEDISPLACEMENTMAP = new nsHtml5ElementName(nsHtml5Atoms::fedisplacementmap, nsHtml5Atoms::feDisplacementMap, nsHtml5TreeBuilder::OTHER);
+ ELT_HGROUP = new nsHtml5ElementName(nsHtml5Atoms::hgroup, nsHtml5Atoms::hgroup, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_MALIGNGROUP = new nsHtml5ElementName(nsHtml5Atoms::maligngroup, nsHtml5Atoms::maligngroup, nsHtml5TreeBuilder::OTHER);
+ ELT_MSUBSUP = new nsHtml5ElementName(nsHtml5Atoms::msubsup, nsHtml5Atoms::msubsup, nsHtml5TreeBuilder::OTHER);
+ ELT_MSUP = new nsHtml5ElementName(nsHtml5Atoms::msup, nsHtml5Atoms::msup, nsHtml5TreeBuilder::OTHER);
+ ELT_RP = new nsHtml5ElementName(nsHtml5Atoms::rp, nsHtml5Atoms::rp, nsHtml5TreeBuilder::RT_OR_RP | OPTIONAL_END_TAG);
+ ELT_OPTGROUP = new nsHtml5ElementName(nsHtml5Atoms::optgroup, nsHtml5Atoms::optgroup, nsHtml5TreeBuilder::OPTGROUP | OPTIONAL_END_TAG);
+ ELT_SAMP = new nsHtml5ElementName(nsHtml5Atoms::samp, nsHtml5Atoms::samp, nsHtml5TreeBuilder::OTHER);
+ ELT_STOP = new nsHtml5ElementName(nsHtml5Atoms::stop, nsHtml5Atoms::stop, nsHtml5TreeBuilder::OTHER);
+ ELT_EQ = new nsHtml5ElementName(nsHtml5Atoms::eq, nsHtml5Atoms::eq, nsHtml5TreeBuilder::OTHER);
+ ELT_BR = new nsHtml5ElementName(nsHtml5Atoms::br, nsHtml5Atoms::br, nsHtml5TreeBuilder::BR | SPECIAL);
+ ELT_ABBR = new nsHtml5ElementName(nsHtml5Atoms::abbr, nsHtml5Atoms::abbr, nsHtml5TreeBuilder::OTHER);
+ ELT_ANIMATECOLOR = new nsHtml5ElementName(nsHtml5Atoms::animatecolor, nsHtml5Atoms::animateColor, nsHtml5TreeBuilder::OTHER);
+ ELT_BVAR = new nsHtml5ElementName(nsHtml5Atoms::bvar, nsHtml5Atoms::bvar, nsHtml5TreeBuilder::OTHER);
+ ELT_CENTER = new nsHtml5ElementName(nsHtml5Atoms::center, nsHtml5Atoms::center, nsHtml5TreeBuilder::DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+ ELT_CURSOR = new nsHtml5ElementName(nsHtml5Atoms::cursor, nsHtml5Atoms::cursor, nsHtml5TreeBuilder::OTHER);
+ ELT_HR = new nsHtml5ElementName(nsHtml5Atoms::hr, nsHtml5Atoms::hr, nsHtml5TreeBuilder::HR | SPECIAL);
+ ELT_FEFUNCR = new nsHtml5ElementName(nsHtml5Atoms::fefuncr, nsHtml5Atoms::feFuncR, nsHtml5TreeBuilder::OTHER);
+ ELT_FECOMPONENTTRANSFER = new nsHtml5ElementName(nsHtml5Atoms::fecomponenttransfer, nsHtml5Atoms::feComponentTransfer, nsHtml5TreeBuilder::OTHER);
+ ELT_FILTER = new nsHtml5ElementName(nsHtml5Atoms::filter, nsHtml5Atoms::filter, nsHtml5TreeBuilder::OTHER);
+ ELT_FOOTER = new nsHtml5ElementName(nsHtml5Atoms::footer, nsHtml5Atoms::footer, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_FLOOR = new nsHtml5ElementName(nsHtml5Atoms::floor, nsHtml5Atoms::floor, nsHtml5TreeBuilder::OTHER);
+ ELT_FEGAUSSIANBLUR = new nsHtml5ElementName(nsHtml5Atoms::fegaussianblur, nsHtml5Atoms::feGaussianBlur, nsHtml5TreeBuilder::OTHER);
+ ELT_HEADER = new nsHtml5ElementName(nsHtml5Atoms::header, nsHtml5Atoms::header, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_HANDLER = new nsHtml5ElementName(nsHtml5Atoms::handler, nsHtml5Atoms::handler, nsHtml5TreeBuilder::OTHER);
+ ELT_OR = new nsHtml5ElementName(nsHtml5Atoms::or_, nsHtml5Atoms::or_, nsHtml5TreeBuilder::OTHER);
+ ELT_LISTENER = new nsHtml5ElementName(nsHtml5Atoms::listener, nsHtml5Atoms::listener, nsHtml5TreeBuilder::OTHER);
+ ELT_MUNDER = new nsHtml5ElementName(nsHtml5Atoms::munder, nsHtml5Atoms::munder, nsHtml5TreeBuilder::OTHER);
+ ELT_MARKER = new nsHtml5ElementName(nsHtml5Atoms::marker, nsHtml5Atoms::marker, nsHtml5TreeBuilder::OTHER);
+ ELT_METER = new nsHtml5ElementName(nsHtml5Atoms::meter, nsHtml5Atoms::meter, nsHtml5TreeBuilder::OTHER);
+ ELT_MOVER = new nsHtml5ElementName(nsHtml5Atoms::mover, nsHtml5Atoms::mover, nsHtml5TreeBuilder::OTHER);
+ ELT_MUNDEROVER = new nsHtml5ElementName(nsHtml5Atoms::munderover, nsHtml5Atoms::munderover, nsHtml5TreeBuilder::OTHER);
+ ELT_MERROR = new nsHtml5ElementName(nsHtml5Atoms::merror, nsHtml5Atoms::merror, nsHtml5TreeBuilder::OTHER);
+ ELT_MLABELEDTR = new nsHtml5ElementName(nsHtml5Atoms::mlabeledtr, nsHtml5Atoms::mlabeledtr, nsHtml5TreeBuilder::OTHER);
+ ELT_NOBR = new nsHtml5ElementName(nsHtml5Atoms::nobr, nsHtml5Atoms::nobr, nsHtml5TreeBuilder::NOBR);
+ ELT_NOTANUMBER = new nsHtml5ElementName(nsHtml5Atoms::notanumber, nsHtml5Atoms::notanumber, nsHtml5TreeBuilder::OTHER);
+ ELT_POWER = new nsHtml5ElementName(nsHtml5Atoms::power, nsHtml5Atoms::power, nsHtml5TreeBuilder::OTHER);
+ ELT_TR = new nsHtml5ElementName(nsHtml5Atoms::tr, nsHtml5Atoms::tr, nsHtml5TreeBuilder::TR | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+ ELT_SOLIDCOLOR = new nsHtml5ElementName(nsHtml5Atoms::solidcolor, nsHtml5Atoms::solidcolor, nsHtml5TreeBuilder::OTHER);
+ ELT_SELECTOR = new nsHtml5ElementName(nsHtml5Atoms::selector, nsHtml5Atoms::selector, nsHtml5TreeBuilder::OTHER);
+ ELT_VECTOR = new nsHtml5ElementName(nsHtml5Atoms::vector, nsHtml5Atoms::vector, nsHtml5TreeBuilder::OTHER);
+ ELT_ARCCOS = new nsHtml5ElementName(nsHtml5Atoms::arccos, nsHtml5Atoms::arccos, nsHtml5TreeBuilder::OTHER);
+ ELT_ADDRESS = new nsHtml5ElementName(nsHtml5Atoms::address, nsHtml5Atoms::address, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_CANVAS = new nsHtml5ElementName(nsHtml5Atoms::canvas, nsHtml5Atoms::canvas, nsHtml5TreeBuilder::OTHER);
+ ELT_COMPLEXES = new nsHtml5ElementName(nsHtml5Atoms::complexes, nsHtml5Atoms::complexes, nsHtml5TreeBuilder::OTHER);
+ ELT_DEFS = new nsHtml5ElementName(nsHtml5Atoms::defs, nsHtml5Atoms::defs, nsHtml5TreeBuilder::OTHER);
+ ELT_DETAILS = new nsHtml5ElementName(nsHtml5Atoms::details, nsHtml5Atoms::details, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_EXISTS = new nsHtml5ElementName(nsHtml5Atoms::exists, nsHtml5Atoms::exists, nsHtml5TreeBuilder::OTHER);
+ ELT_IMPLIES = new nsHtml5ElementName(nsHtml5Atoms::implies, nsHtml5Atoms::implies, nsHtml5TreeBuilder::OTHER);
+ ELT_INTEGERS = new nsHtml5ElementName(nsHtml5Atoms::integers, nsHtml5Atoms::integers, nsHtml5TreeBuilder::OTHER);
+ ELT_MS = new nsHtml5ElementName(nsHtml5Atoms::ms, nsHtml5Atoms::ms, nsHtml5TreeBuilder::MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+ ELT_MPRESCRIPTS = new nsHtml5ElementName(nsHtml5Atoms::mprescripts, nsHtml5Atoms::mprescripts, nsHtml5TreeBuilder::OTHER);
+ ELT_MMULTISCRIPTS = new nsHtml5ElementName(nsHtml5Atoms::mmultiscripts, nsHtml5Atoms::mmultiscripts, nsHtml5TreeBuilder::OTHER);
+ ELT_MINUS = new nsHtml5ElementName(nsHtml5Atoms::minus, nsHtml5Atoms::minus, nsHtml5TreeBuilder::OTHER);
+ ELT_NOFRAMES = new nsHtml5ElementName(nsHtml5Atoms::noframes, nsHtml5Atoms::noframes, nsHtml5TreeBuilder::NOFRAMES | SPECIAL);
+ ELT_NATURALNUMBERS = new nsHtml5ElementName(nsHtml5Atoms::naturalnumbers, nsHtml5Atoms::naturalnumbers, nsHtml5TreeBuilder::OTHER);
+ ELT_PRIMES = new nsHtml5ElementName(nsHtml5Atoms::primes, nsHtml5Atoms::primes, nsHtml5TreeBuilder::OTHER);
+ ELT_PROGRESS = new nsHtml5ElementName(nsHtml5Atoms::progress, nsHtml5Atoms::progress, nsHtml5TreeBuilder::OTHER);
+ ELT_PLUS = new nsHtml5ElementName(nsHtml5Atoms::plus, nsHtml5Atoms::plus, nsHtml5TreeBuilder::OTHER);
+ ELT_REALS = new nsHtml5ElementName(nsHtml5Atoms::reals, nsHtml5Atoms::reals, nsHtml5TreeBuilder::OTHER);
+ ELT_RATIONALS = new nsHtml5ElementName(nsHtml5Atoms::rationals, nsHtml5Atoms::rationals, nsHtml5TreeBuilder::OTHER);
+ ELT_SEMANTICS = new nsHtml5ElementName(nsHtml5Atoms::semantics, nsHtml5Atoms::semantics, nsHtml5TreeBuilder::OTHER);
+ ELT_TIMES = new nsHtml5ElementName(nsHtml5Atoms::times, nsHtml5Atoms::times, nsHtml5TreeBuilder::OTHER);
+ ELT_DT = new nsHtml5ElementName(nsHtml5Atoms::dt, nsHtml5Atoms::dt, nsHtml5TreeBuilder::DD_OR_DT | SPECIAL | OPTIONAL_END_TAG);
+ ELT_APPLET = new nsHtml5ElementName(nsHtml5Atoms::applet, nsHtml5Atoms::applet, nsHtml5TreeBuilder::MARQUEE_OR_APPLET | SPECIAL | SCOPING);
+ ELT_ARCCOT = new nsHtml5ElementName(nsHtml5Atoms::arccot, nsHtml5Atoms::arccot, nsHtml5TreeBuilder::OTHER);
+ ELT_BASEFONT = new nsHtml5ElementName(nsHtml5Atoms::basefont, nsHtml5Atoms::basefont, nsHtml5TreeBuilder::LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
+ ELT_CARTESIANPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::cartesianproduct, nsHtml5Atoms::cartesianproduct, nsHtml5TreeBuilder::OTHER);
+ ELT_GT = new nsHtml5ElementName(nsHtml5Atoms::gt, nsHtml5Atoms::gt, nsHtml5TreeBuilder::OTHER);
+ ELT_DETERMINANT = new nsHtml5ElementName(nsHtml5Atoms::determinant, nsHtml5Atoms::determinant, nsHtml5TreeBuilder::OTHER);
+ ELT_EMPTYSET = new nsHtml5ElementName(nsHtml5Atoms::emptyset, nsHtml5Atoms::emptyset, nsHtml5TreeBuilder::OTHER);
+ ELT_EQUIVALENT = new nsHtml5ElementName(nsHtml5Atoms::equivalent, nsHtml5Atoms::equivalent, nsHtml5TreeBuilder::OTHER);
+ ELT_FONT_FACE_FORMAT = new nsHtml5ElementName(nsHtml5Atoms::font_face_format, nsHtml5Atoms::font_face_format, nsHtml5TreeBuilder::OTHER);
+ ELT_FOREIGNOBJECT = new nsHtml5ElementName(nsHtml5Atoms::foreignobject, nsHtml5Atoms::foreignObject, nsHtml5TreeBuilder::FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
+ ELT_FIELDSET = new nsHtml5ElementName(nsHtml5Atoms::fieldset, nsHtml5Atoms::fieldset, nsHtml5TreeBuilder::FIELDSET | SPECIAL);
+ ELT_FRAMESET = new nsHtml5ElementName(nsHtml5Atoms::frameset, nsHtml5Atoms::frameset, nsHtml5TreeBuilder::FRAMESET | SPECIAL);
+ ELT_FEOFFSET = new nsHtml5ElementName(nsHtml5Atoms::feoffset, nsHtml5Atoms::feOffset, nsHtml5TreeBuilder::OTHER);
+ ELT_FESPOTLIGHT = new nsHtml5ElementName(nsHtml5Atoms::fespotlight, nsHtml5Atoms::feSpotLight, nsHtml5TreeBuilder::OTHER);
+ ELT_FEPOINTLIGHT = new nsHtml5ElementName(nsHtml5Atoms::fepointlight, nsHtml5Atoms::fePointLight, nsHtml5TreeBuilder::OTHER);
+ ELT_FEDISTANTLIGHT = new nsHtml5ElementName(nsHtml5Atoms::fedistantlight, nsHtml5Atoms::feDistantLight, nsHtml5TreeBuilder::OTHER);
+ ELT_FONT = new nsHtml5ElementName(nsHtml5Atoms::font, nsHtml5Atoms::font, nsHtml5TreeBuilder::FONT);
+ ELT_LT = new nsHtml5ElementName(nsHtml5Atoms::lt, nsHtml5Atoms::lt, nsHtml5TreeBuilder::OTHER);
+ ELT_INTERSECT = new nsHtml5ElementName(nsHtml5Atoms::intersect, nsHtml5Atoms::intersect, nsHtml5TreeBuilder::OTHER);
+ ELT_IDENT = new nsHtml5ElementName(nsHtml5Atoms::ident, nsHtml5Atoms::ident, nsHtml5TreeBuilder::OTHER);
+ ELT_INPUT = new nsHtml5ElementName(nsHtml5Atoms::input, nsHtml5Atoms::input, nsHtml5TreeBuilder::INPUT | SPECIAL);
+ ELT_LIMIT = new nsHtml5ElementName(nsHtml5Atoms::limit, nsHtml5Atoms::limit, nsHtml5TreeBuilder::OTHER);
+ ELT_LOWLIMIT = new nsHtml5ElementName(nsHtml5Atoms::lowlimit, nsHtml5Atoms::lowlimit, nsHtml5TreeBuilder::OTHER);
+ ELT_LINEARGRADIENT = new nsHtml5ElementName(nsHtml5Atoms::lineargradient, nsHtml5Atoms::linearGradient, nsHtml5TreeBuilder::OTHER);
+ ELT_LIST = new nsHtml5ElementName(nsHtml5Atoms::list, nsHtml5Atoms::list, nsHtml5TreeBuilder::OTHER);
+ ELT_MOMENT = new nsHtml5ElementName(nsHtml5Atoms::moment, nsHtml5Atoms::moment, nsHtml5TreeBuilder::OTHER);
+ ELT_MROOT = new nsHtml5ElementName(nsHtml5Atoms::mroot, nsHtml5Atoms::mroot, nsHtml5TreeBuilder::OTHER);
+ ELT_MSQRT = new nsHtml5ElementName(nsHtml5Atoms::msqrt, nsHtml5Atoms::msqrt, nsHtml5TreeBuilder::OTHER);
+ ELT_MOMENTABOUT = new nsHtml5ElementName(nsHtml5Atoms::momentabout, nsHtml5Atoms::momentabout, nsHtml5TreeBuilder::OTHER);
+ ELT_MTEXT = new nsHtml5ElementName(nsHtml5Atoms::mtext, nsHtml5Atoms::mtext, nsHtml5TreeBuilder::MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+ ELT_NOTSUBSET = new nsHtml5ElementName(nsHtml5Atoms::notsubset, nsHtml5Atoms::notsubset, nsHtml5TreeBuilder::OTHER);
+ ELT_NOTPRSUBSET = new nsHtml5ElementName(nsHtml5Atoms::notprsubset, nsHtml5Atoms::notprsubset, nsHtml5TreeBuilder::OTHER);
+ ELT_NOSCRIPT = new nsHtml5ElementName(nsHtml5Atoms::noscript, nsHtml5Atoms::noscript, nsHtml5TreeBuilder::NOSCRIPT | SPECIAL);
+ ELT_NEST = new nsHtml5ElementName(nsHtml5Atoms::nest, nsHtml5Atoms::nest, nsHtml5TreeBuilder::OTHER);
+ ELT_RT = new nsHtml5ElementName(nsHtml5Atoms::rt, nsHtml5Atoms::rt, nsHtml5TreeBuilder::RT_OR_RP | OPTIONAL_END_TAG);
+ ELT_OBJECT = new nsHtml5ElementName(nsHtml5Atoms::object, nsHtml5Atoms::object, nsHtml5TreeBuilder::OBJECT | SPECIAL | SCOPING);
+ ELT_OUTERPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::outerproduct, nsHtml5Atoms::outerproduct, nsHtml5TreeBuilder::OTHER);
+ ELT_OUTPUT = new nsHtml5ElementName(nsHtml5Atoms::output, nsHtml5Atoms::output, nsHtml5TreeBuilder::OUTPUT);
+ ELT_PRODUCT = new nsHtml5ElementName(nsHtml5Atoms::product, nsHtml5Atoms::product, nsHtml5TreeBuilder::OTHER);
+ ELT_PRSUBSET = new nsHtml5ElementName(nsHtml5Atoms::prsubset, nsHtml5Atoms::prsubset, nsHtml5TreeBuilder::OTHER);
+ ELT_PLAINTEXT = new nsHtml5ElementName(nsHtml5Atoms::plaintext, nsHtml5Atoms::plaintext, nsHtml5TreeBuilder::PLAINTEXT | SPECIAL);
+ ELT_TT = new nsHtml5ElementName(nsHtml5Atoms::tt, nsHtml5Atoms::tt, nsHtml5TreeBuilder::B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+ ELT_QUOTIENT = new nsHtml5ElementName(nsHtml5Atoms::quotient, nsHtml5Atoms::quotient, nsHtml5TreeBuilder::OTHER);
+ ELT_RECT = new nsHtml5ElementName(nsHtml5Atoms::rect, nsHtml5Atoms::rect, nsHtml5TreeBuilder::OTHER);
+ ELT_RADIALGRADIENT = new nsHtml5ElementName(nsHtml5Atoms::radialgradient, nsHtml5Atoms::radialGradient, nsHtml5TreeBuilder::OTHER);
+ ELT_ROOT = new nsHtml5ElementName(nsHtml5Atoms::root, nsHtml5Atoms::root, nsHtml5TreeBuilder::OTHER);
+ ELT_SELECT = new nsHtml5ElementName(nsHtml5Atoms::select, nsHtml5Atoms::select, nsHtml5TreeBuilder::SELECT | SPECIAL);
+ ELT_SCALARPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::scalarproduct, nsHtml5Atoms::scalarproduct, nsHtml5TreeBuilder::OTHER);
+ ELT_SUBSET = new nsHtml5ElementName(nsHtml5Atoms::subset, nsHtml5Atoms::subset, nsHtml5TreeBuilder::OTHER);
+ ELT_SCRIPT = new nsHtml5ElementName(nsHtml5Atoms::script, nsHtml5Atoms::script, nsHtml5TreeBuilder::SCRIPT | SPECIAL);
+ ELT_TFOOT = new nsHtml5ElementName(nsHtml5Atoms::tfoot, nsHtml5Atoms::tfoot, nsHtml5TreeBuilder::TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+ ELT_TEXT = new nsHtml5ElementName(nsHtml5Atoms::text, nsHtml5Atoms::text, nsHtml5TreeBuilder::OTHER);
+ ELT_UPLIMIT = new nsHtml5ElementName(nsHtml5Atoms::uplimit, nsHtml5Atoms::uplimit, nsHtml5TreeBuilder::OTHER);
+ ELT_VECTORPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::vectorproduct, nsHtml5Atoms::vectorproduct, nsHtml5TreeBuilder::OTHER);
+ ELT_MENU = new nsHtml5ElementName(nsHtml5Atoms::menu, nsHtml5Atoms::menu, nsHtml5TreeBuilder::DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+ ELT_SDEV = new nsHtml5ElementName(nsHtml5Atoms::sdev, nsHtml5Atoms::sdev, nsHtml5TreeBuilder::OTHER);
+ ELT_FEDROPSHADOW = new nsHtml5ElementName(nsHtml5Atoms::fedropshadow, nsHtml5Atoms::feDropShadow, nsHtml5TreeBuilder::OTHER);
+ ELT_MROW = new nsHtml5ElementName(nsHtml5Atoms::mrow, nsHtml5Atoms::mrow, nsHtml5TreeBuilder::OTHER);
+ ELT_MATRIXROW = new nsHtml5ElementName(nsHtml5Atoms::matrixrow, nsHtml5Atoms::matrixrow, nsHtml5TreeBuilder::OTHER);
+ ELT_VIEW = new nsHtml5ElementName(nsHtml5Atoms::view, nsHtml5Atoms::view, nsHtml5TreeBuilder::OTHER);
+ ELT_APPROX = new nsHtml5ElementName(nsHtml5Atoms::approx, nsHtml5Atoms::approx, nsHtml5TreeBuilder::OTHER);
+ ELT_FECOLORMATRIX = new nsHtml5ElementName(nsHtml5Atoms::fecolormatrix, nsHtml5Atoms::feColorMatrix, nsHtml5TreeBuilder::OTHER);
+ ELT_FECONVOLVEMATRIX = new nsHtml5ElementName(nsHtml5Atoms::feconvolvematrix, nsHtml5Atoms::feConvolveMatrix, nsHtml5TreeBuilder::OTHER);
+ ELT_MATRIX = new nsHtml5ElementName(nsHtml5Atoms::matrix, nsHtml5Atoms::matrix, nsHtml5TreeBuilder::OTHER);
+ ELT_APPLY = new nsHtml5ElementName(nsHtml5Atoms::apply, nsHtml5Atoms::apply, nsHtml5TreeBuilder::OTHER);
+ ELT_BODY = new nsHtml5ElementName(nsHtml5Atoms::body, nsHtml5Atoms::body, nsHtml5TreeBuilder::BODY | SPECIAL | OPTIONAL_END_TAG);
+ ELT_FEMORPHOLOGY = new nsHtml5ElementName(nsHtml5Atoms::femorphology, nsHtml5Atoms::feMorphology, nsHtml5TreeBuilder::OTHER);
+ ELT_IMAGINARY = new nsHtml5ElementName(nsHtml5Atoms::imaginary, nsHtml5Atoms::imaginary, nsHtml5TreeBuilder::OTHER);
+ ELT_INFINITY = new nsHtml5ElementName(nsHtml5Atoms::infinity, nsHtml5Atoms::infinity, nsHtml5TreeBuilder::OTHER);
+ ELT_RUBY = new nsHtml5ElementName(nsHtml5Atoms::ruby, nsHtml5Atoms::ruby, nsHtml5TreeBuilder::RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+ ELT_SUMMARY = new nsHtml5ElementName(nsHtml5Atoms::summary, nsHtml5Atoms::summary, nsHtml5TreeBuilder::ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+ ELT_TBODY = new nsHtml5ElementName(nsHtml5Atoms::tbody, nsHtml5Atoms::tbody, nsHtml5TreeBuilder::TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
ELEMENT_NAMES = new nsHtml5ElementName*[398];
ELEMENT_NAMES[0] = ELT_AND;
ELEMENT_NAMES[1] = ELT_ARG;
diff --git a/parser/html/nsHtml5ElementName.h b/parser/html/nsHtml5ElementName.h
index 57e80679d..6bf31a0ad 100644
--- a/parser/html/nsHtml5ElementName.h
+++ b/parser/html/nsHtml5ElementName.h
@@ -44,13 +44,14 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
class nsHtml5StreamParser;
+class nsHtml5AttributeName;
class nsHtml5Tokenizer;
class nsHtml5TreeBuilder;
class nsHtml5MetaScanner;
-class nsHtml5AttributeName;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -58,6 +59,25 @@ class nsHtml5Portability;
class nsHtml5ElementName
{
+ public:
+ static const int32_t GROUP_MASK = 127;
+
+ static const int32_t NOT_INTERNED = (1 << 30);
+
+ static const int32_t SPECIAL = (1 << 29);
+
+ static const int32_t FOSTER_PARENTING = (1 << 28);
+
+ static const int32_t SCOPING = (1 << 27);
+
+ static const int32_t SCOPING_AS_SVG = (1 << 26);
+
+ static const int32_t SCOPING_AS_MATHML = (1 << 25);
+
+ static const int32_t HTML_INTEGRATION_POINT = (1 << 24);
+
+ static const int32_t OPTIONAL_END_TAG = (1 << 23);
+
private:
nsIAtom* name;
nsIAtom* camelCaseName;
@@ -78,9 +98,32 @@ class nsHtml5ElementName
return flags;
}
- int32_t getGroup();
- bool isInterned();
- static nsHtml5ElementName* elementNameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner);
+ inline int32_t getGroup()
+ {
+ return flags & nsHtml5ElementName::GROUP_MASK;
+ }
+
+ inline bool isInterned()
+ {
+ return !(flags & nsHtml5ElementName::NOT_INTERNED);
+ }
+
+ inline static nsHtml5ElementName* elementNameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner)
+ {
+ uint32_t hash = nsHtml5ElementName::bufToHash(buf, length);
+ int32_t index = nsHtml5ElementName::ELEMENT_HASHES.binarySearch(hash);
+ if (index < 0) {
+ return nullptr;
+ } else {
+ nsHtml5ElementName* elementName = nsHtml5ElementName::ELEMENT_NAMES[index];
+ nsIAtom* name = elementName->name;
+ if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) {
+ return nullptr;
+ }
+ return elementName;
+ }
+ }
+
private:
inline static uint32_t bufToHash(char16_t* buf, int32_t length)
{
@@ -116,7 +159,13 @@ class nsHtml5ElementName
public:
nsHtml5ElementName();
~nsHtml5ElementName();
- void setNameForNonInterned(nsIAtom* name);
+ inline void setNameForNonInterned(nsIAtom* name)
+ {
+ this->name = name;
+ this->camelCaseName = name;
+ MOZ_ASSERT(this->flags == nsHtml5ElementName::NOT_INTERNED);
+ }
+
static nsHtml5ElementName* ELT_ISINDEX;
static nsHtml5ElementName* ELT_AND;
static nsHtml5ElementName* ELT_ARG;
@@ -523,16 +572,5 @@ class nsHtml5ElementName
static void releaseStatics();
};
-#define NS_HTML5ELEMENT_NAME_GROUP_MASK 127
-#define NS_HTML5ELEMENT_NAME_NOT_INTERNED (1 << 30)
-#define NS_HTML5ELEMENT_NAME_SPECIAL (1 << 29)
-#define NS_HTML5ELEMENT_NAME_FOSTER_PARENTING (1 << 28)
-#define NS_HTML5ELEMENT_NAME_SCOPING (1 << 27)
-#define NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG (1 << 26)
-#define NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML (1 << 25)
-#define NS_HTML5ELEMENT_NAME_HTML_INTEGRATION_POINT (1 << 24)
-#define NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG (1 << 23)
-
-
#endif
diff --git a/parser/html/nsHtml5MetaScanner.cpp b/parser/html/nsHtml5MetaScanner.cpp
index e24b5d353..39a078264 100644
--- a/parser/html/nsHtml5MetaScanner.cpp
+++ b/parser/html/nsHtml5MetaScanner.cpp
@@ -44,11 +44,12 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
-#include "nsHtml5Tokenizer.h"
-#include "nsHtml5TreeBuilder.h"
#include "nsHtml5AttributeName.h"
#include "nsHtml5ElementName.h"
+#include "nsHtml5Tokenizer.h"
+#include "nsHtml5TreeBuilder.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
@@ -67,17 +68,17 @@ staticJArray<char16_t,int32_t> nsHtml5MetaScanner::CONTENT_TYPE = { CONTENT_TYPE
nsHtml5MetaScanner::nsHtml5MetaScanner(nsHtml5TreeBuilder* tb)
: readable(nullptr),
- metaState(NS_HTML5META_SCANNER_NO),
+ metaState(NO),
contentIndex(INT32_MAX),
charsetIndex(INT32_MAX),
httpEquivIndex(INT32_MAX),
contentTypeIndex(INT32_MAX),
- stateSave(NS_HTML5META_SCANNER_DATA),
+ stateSave(DATA),
strBufLen(0),
strBuf(jArray<char16_t,int32_t>::newJArray(36)),
content(nullptr),
charset(nullptr),
- httpEquivState(NS_HTML5META_SCANNER_HTTP_EQUIV_NOT_SEEN),
+ httpEquivState(HTTP_EQUIV_NOT_SEEN),
treeBuilder(tb)
{
MOZ_COUNT_CTOR(nsHtml5MetaScanner);
@@ -98,7 +99,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
bool reconsume = false;
stateloop: for (; ; ) {
switch(state) {
- case NS_HTML5META_SCANNER_DATA: {
+ case DATA: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -110,7 +111,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '<': {
- state = NS_HTML5META_SCANNER_TAG_OPEN;
+ state = nsHtml5MetaScanner::TAG_OPEN;
NS_HTML5_BREAK(dataloop);
}
default: {
@@ -120,7 +121,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
dataloop_end: ;
}
- case NS_HTML5META_SCANNER_TAG_OPEN: {
+ case TAG_OPEN: {
for (; ; ) {
c = read();
switch(c) {
@@ -129,30 +130,30 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
case 'm':
case 'M': {
- metaState = NS_HTML5META_SCANNER_M;
- state = NS_HTML5META_SCANNER_TAG_NAME;
+ metaState = M;
+ state = nsHtml5MetaScanner::TAG_NAME;
NS_HTML5_BREAK(tagopenloop);
}
case '!': {
- state = NS_HTML5META_SCANNER_MARKUP_DECLARATION_OPEN;
+ state = nsHtml5MetaScanner::MARKUP_DECLARATION_OPEN;
NS_HTML5_CONTINUE(stateloop);
}
case '\?':
case '/': {
- state = NS_HTML5META_SCANNER_SCAN_UNTIL_GT;
+ state = nsHtml5MetaScanner::SCAN_UNTIL_GT;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
- metaState = NS_HTML5META_SCANNER_NO;
- state = NS_HTML5META_SCANNER_TAG_NAME;
+ metaState = NO;
+ state = nsHtml5MetaScanner::TAG_NAME;
NS_HTML5_BREAK(tagopenloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
reconsume = true;
NS_HTML5_CONTINUE(stateloop);
}
@@ -160,7 +161,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
tagopenloop_end: ;
}
- case NS_HTML5META_SCANNER_TAG_NAME: {
+ case TAG_NAME: {
for (; ; ) {
c = read();
switch(c) {
@@ -171,53 +172,53 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
case '\t':
case '\n':
case '\f': {
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_NAME;
NS_HTML5_BREAK(tagnameloop);
}
case '/': {
- state = NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG;
+ state = nsHtml5MetaScanner::SELF_CLOSING_START_TAG;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
case 'e':
case 'E': {
- if (metaState == NS_HTML5META_SCANNER_M) {
- metaState = NS_HTML5META_SCANNER_E;
+ if (metaState == M) {
+ metaState = E;
} else {
- metaState = NS_HTML5META_SCANNER_NO;
+ metaState = NO;
}
continue;
}
case 't':
case 'T': {
- if (metaState == NS_HTML5META_SCANNER_E) {
- metaState = NS_HTML5META_SCANNER_T;
+ if (metaState == E) {
+ metaState = T;
} else {
- metaState = NS_HTML5META_SCANNER_NO;
+ metaState = NO;
}
continue;
}
case 'a':
case 'A': {
- if (metaState == NS_HTML5META_SCANNER_T) {
- metaState = NS_HTML5META_SCANNER_A;
+ if (metaState == T) {
+ metaState = A;
} else {
- metaState = NS_HTML5META_SCANNER_NO;
+ metaState = NO;
}
continue;
}
default: {
- metaState = NS_HTML5META_SCANNER_NO;
+ metaState = NO;
continue;
}
}
}
tagnameloop_end: ;
}
- case NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME: {
+ case BEFORE_ATTRIBUTE_NAME: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -235,14 +236,14 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
continue;
}
case '/': {
- state = NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG;
+ state = nsHtml5MetaScanner::SELF_CLOSING_START_TAG;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = DATA;
NS_HTML5_CONTINUE(stateloop);
}
case 'c':
@@ -251,7 +252,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
charsetIndex = 0;
httpEquivIndex = INT32_MAX;
contentTypeIndex = INT32_MAX;
- state = NS_HTML5META_SCANNER_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::ATTRIBUTE_NAME;
NS_HTML5_BREAK(beforeattributenameloop);
}
case 'h':
@@ -260,7 +261,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
charsetIndex = INT32_MAX;
httpEquivIndex = 0;
contentTypeIndex = INT32_MAX;
- state = NS_HTML5META_SCANNER_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::ATTRIBUTE_NAME;
NS_HTML5_BREAK(beforeattributenameloop);
}
default: {
@@ -268,14 +269,14 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
charsetIndex = INT32_MAX;
httpEquivIndex = INT32_MAX;
contentTypeIndex = INT32_MAX;
- state = NS_HTML5META_SCANNER_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::ATTRIBUTE_NAME;
NS_HTML5_BREAK(beforeattributenameloop);
}
}
}
beforeattributenameloop_end: ;
}
- case NS_HTML5META_SCANNER_ATTRIBUTE_NAME: {
+ case ATTRIBUTE_NAME: {
for (; ; ) {
c = read();
switch(c) {
@@ -286,28 +287,28 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
case '\t':
case '\n':
case '\f': {
- state = NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::AFTER_ATTRIBUTE_NAME;
NS_HTML5_CONTINUE(stateloop);
}
case '/': {
- state = NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG;
+ state = nsHtml5MetaScanner::SELF_CLOSING_START_TAG;
NS_HTML5_CONTINUE(stateloop);
}
case '=': {
strBufLen = 0;
contentTypeIndex = 0;
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_VALUE;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_VALUE;
NS_HTML5_BREAK(attributenameloop);
}
case '>': {
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
- if (metaState == NS_HTML5META_SCANNER_A) {
+ if (metaState == A) {
if (c >= 'A' && c <= 'Z') {
c += 0x20;
}
@@ -333,7 +334,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
attributenameloop_end: ;
}
- case NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_VALUE: {
+ case BEFORE_ATTRIBUTE_VALUE: {
for (; ; ) {
c = read();
switch(c) {
@@ -347,30 +348,30 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
continue;
}
case '\"': {
- state = NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_DOUBLE_QUOTED;
+ state = nsHtml5MetaScanner::ATTRIBUTE_VALUE_DOUBLE_QUOTED;
NS_HTML5_BREAK(beforeattributevalueloop);
}
case '\'': {
- state = NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_SINGLE_QUOTED;
+ state = nsHtml5MetaScanner::ATTRIBUTE_VALUE_SINGLE_QUOTED;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
handleCharInAttributeValue(c);
- state = NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_UNQUOTED;
+ state = nsHtml5MetaScanner::ATTRIBUTE_VALUE_UNQUOTED;
NS_HTML5_CONTINUE(stateloop);
}
}
}
beforeattributevalueloop_end: ;
}
- case NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
+ case ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -383,7 +384,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
case '\"': {
handleAttributeValue();
- state = NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_VALUE_QUOTED;
+ state = nsHtml5MetaScanner::AFTER_ATTRIBUTE_VALUE_QUOTED;
NS_HTML5_BREAK(attributevaluedoublequotedloop);
}
default: {
@@ -394,7 +395,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
attributevaluedoublequotedloop_end: ;
}
- case NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_VALUE_QUOTED: {
+ case AFTER_ATTRIBUTE_VALUE_QUOTED: {
for (; ; ) {
c = read();
switch(c) {
@@ -405,22 +406,22 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
case '\t':
case '\n':
case '\f': {
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_NAME;
NS_HTML5_CONTINUE(stateloop);
}
case '/': {
- state = NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG;
+ state = nsHtml5MetaScanner::SELF_CLOSING_START_TAG;
NS_HTML5_BREAK(afterattributevaluequotedloop);
}
case '>': {
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_NAME;
reconsume = true;
NS_HTML5_CONTINUE(stateloop);
}
@@ -428,7 +429,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
afterattributevaluequotedloop_end: ;
}
- case NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG: {
+ case SELF_CLOSING_START_TAG: {
c = read();
switch(c) {
case -1: {
@@ -438,17 +439,17 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_NAME;
reconsume = true;
NS_HTML5_CONTINUE(stateloop);
}
}
}
- case NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_UNQUOTED: {
+ case ATTRIBUTE_VALUE_UNQUOTED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -464,7 +465,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
case '\n':
case '\f': {
handleAttributeValue();
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_NAME;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -472,7 +473,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
@@ -482,7 +483,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
}
}
- case NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_NAME: {
+ case AFTER_ATTRIBUTE_NAME: {
for (; ; ) {
c = read();
switch(c) {
@@ -497,13 +498,13 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
case '/': {
handleAttributeValue();
- state = NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG;
+ state = nsHtml5MetaScanner::SELF_CLOSING_START_TAG;
NS_HTML5_CONTINUE(stateloop);
}
case '=': {
strBufLen = 0;
contentTypeIndex = 0;
- state = NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_VALUE;
+ state = nsHtml5MetaScanner::BEFORE_ATTRIBUTE_VALUE;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -511,26 +512,26 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
if (handleTag()) {
NS_HTML5_BREAK(stateloop);
}
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
case 'c':
case 'C': {
contentIndex = 0;
charsetIndex = 0;
- state = NS_HTML5META_SCANNER_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::ATTRIBUTE_NAME;
NS_HTML5_CONTINUE(stateloop);
}
default: {
contentIndex = INT32_MAX;
charsetIndex = INT32_MAX;
- state = NS_HTML5META_SCANNER_ATTRIBUTE_NAME;
+ state = nsHtml5MetaScanner::ATTRIBUTE_NAME;
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5META_SCANNER_MARKUP_DECLARATION_OPEN: {
+ case MARKUP_DECLARATION_OPEN: {
for (; ; ) {
c = read();
switch(c) {
@@ -538,11 +539,11 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '-': {
- state = NS_HTML5META_SCANNER_MARKUP_DECLARATION_HYPHEN;
+ state = nsHtml5MetaScanner::MARKUP_DECLARATION_HYPHEN;
NS_HTML5_BREAK(markupdeclarationopenloop);
}
default: {
- state = NS_HTML5META_SCANNER_SCAN_UNTIL_GT;
+ state = nsHtml5MetaScanner::SCAN_UNTIL_GT;
reconsume = true;
NS_HTML5_CONTINUE(stateloop);
}
@@ -550,7 +551,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
markupdeclarationopenloop_end: ;
}
- case NS_HTML5META_SCANNER_MARKUP_DECLARATION_HYPHEN: {
+ case MARKUP_DECLARATION_HYPHEN: {
for (; ; ) {
c = read();
switch(c) {
@@ -558,11 +559,11 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '-': {
- state = NS_HTML5META_SCANNER_COMMENT_START;
+ state = nsHtml5MetaScanner::COMMENT_START;
NS_HTML5_BREAK(markupdeclarationhyphenloop);
}
default: {
- state = NS_HTML5META_SCANNER_SCAN_UNTIL_GT;
+ state = nsHtml5MetaScanner::SCAN_UNTIL_GT;
reconsume = true;
NS_HTML5_CONTINUE(stateloop);
}
@@ -570,7 +571,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
markupdeclarationhyphenloop_end: ;
}
- case NS_HTML5META_SCANNER_COMMENT_START: {
+ case COMMENT_START: {
for (; ; ) {
c = read();
switch(c) {
@@ -578,22 +579,22 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '-': {
- state = NS_HTML5META_SCANNER_COMMENT_START_DASH;
+ state = nsHtml5MetaScanner::COMMENT_START_DASH;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
- state = NS_HTML5META_SCANNER_COMMENT;
+ state = nsHtml5MetaScanner::COMMENT;
NS_HTML5_BREAK(commentstartloop);
}
}
}
commentstartloop_end: ;
}
- case NS_HTML5META_SCANNER_COMMENT: {
+ case COMMENT: {
for (; ; ) {
c = read();
switch(c) {
@@ -601,7 +602,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '-': {
- state = NS_HTML5META_SCANNER_COMMENT_END_DASH;
+ state = nsHtml5MetaScanner::COMMENT_END_DASH;
NS_HTML5_BREAK(commentloop);
}
default: {
@@ -611,7 +612,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
commentloop_end: ;
}
- case NS_HTML5META_SCANNER_COMMENT_END_DASH: {
+ case COMMENT_END_DASH: {
for (; ; ) {
c = read();
switch(c) {
@@ -619,18 +620,18 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '-': {
- state = NS_HTML5META_SCANNER_COMMENT_END;
+ state = nsHtml5MetaScanner::COMMENT_END;
NS_HTML5_BREAK(commentenddashloop);
}
default: {
- state = NS_HTML5META_SCANNER_COMMENT;
+ state = nsHtml5MetaScanner::COMMENT;
NS_HTML5_CONTINUE(stateloop);
}
}
}
commentenddashloop_end: ;
}
- case NS_HTML5META_SCANNER_COMMENT_END: {
+ case COMMENT_END: {
for (; ; ) {
c = read();
switch(c) {
@@ -638,40 +639,40 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '>': {
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
case '-': {
continue;
}
default: {
- state = NS_HTML5META_SCANNER_COMMENT;
+ state = nsHtml5MetaScanner::COMMENT;
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5META_SCANNER_COMMENT_START_DASH: {
+ case COMMENT_START_DASH: {
c = read();
switch(c) {
case -1: {
NS_HTML5_BREAK(stateloop);
}
case '-': {
- state = NS_HTML5META_SCANNER_COMMENT_END;
+ state = nsHtml5MetaScanner::COMMENT_END;
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
- state = NS_HTML5META_SCANNER_COMMENT;
+ state = nsHtml5MetaScanner::COMMENT;
NS_HTML5_CONTINUE(stateloop);
}
}
}
- case NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_SINGLE_QUOTED: {
+ case ATTRIBUTE_VALUE_SINGLE_QUOTED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -684,7 +685,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
case '\'': {
handleAttributeValue();
- state = NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_VALUE_QUOTED;
+ state = nsHtml5MetaScanner::AFTER_ATTRIBUTE_VALUE_QUOTED;
NS_HTML5_CONTINUE(stateloop);
}
default: {
@@ -694,7 +695,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
}
}
}
- case NS_HTML5META_SCANNER_SCAN_UNTIL_GT: {
+ case SCAN_UNTIL_GT: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -706,7 +707,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
NS_HTML5_BREAK(stateloop);
}
case '>': {
- state = NS_HTML5META_SCANNER_DATA;
+ state = nsHtml5MetaScanner::DATA;
NS_HTML5_CONTINUE(stateloop);
}
default: {
@@ -724,7 +725,7 @@ nsHtml5MetaScanner::stateLoop(int32_t state)
void
nsHtml5MetaScanner::handleCharInAttributeValue(int32_t c)
{
- if (metaState == NS_HTML5META_SCANNER_A) {
+ if (metaState == A) {
if (contentIndex == CONTENT.length || charsetIndex == CHARSET.length) {
addToBuffer(c);
} else if (httpEquivIndex == HTTP_EQUIV.length) {
@@ -751,7 +752,7 @@ nsHtml5MetaScanner::addToBuffer(int32_t c)
void
nsHtml5MetaScanner::handleAttributeValue()
{
- if (metaState != NS_HTML5META_SCANNER_A) {
+ if (metaState != A) {
return;
}
if (contentIndex == CONTENT.length && !content) {
@@ -762,8 +763,8 @@ nsHtml5MetaScanner::handleAttributeValue()
charset = nsHtml5Portability::newStringFromBuffer(strBuf, 0, strBufLen, treeBuilder);
return;
}
- if (httpEquivIndex == HTTP_EQUIV.length && httpEquivState == NS_HTML5META_SCANNER_HTTP_EQUIV_NOT_SEEN) {
- httpEquivState = (contentTypeIndex == CONTENT_TYPE.length) ? NS_HTML5META_SCANNER_HTTP_EQUIV_CONTENT_TYPE : NS_HTML5META_SCANNER_HTTP_EQUIV_OTHER;
+ if (httpEquivIndex == HTTP_EQUIV.length && httpEquivState == HTTP_EQUIV_NOT_SEEN) {
+ httpEquivState = (contentTypeIndex == CONTENT_TYPE.length) ? HTTP_EQUIV_CONTENT_TYPE : HTTP_EQUIV_OTHER;
return;
}
}
@@ -776,7 +777,7 @@ nsHtml5MetaScanner::handleTag()
content = nullptr;
charset.Release();
charset = nullptr;
- httpEquivState = NS_HTML5META_SCANNER_HTTP_EQUIV_NOT_SEEN;
+ httpEquivState = HTTP_EQUIV_NOT_SEEN;
return stop;
}
@@ -786,7 +787,7 @@ nsHtml5MetaScanner::handleTagInner()
if (!!charset && tryCharset(charset)) {
return true;
}
- if (!!content && httpEquivState == NS_HTML5META_SCANNER_HTTP_EQUIV_CONTENT_TYPE) {
+ if (!!content && httpEquivState == HTTP_EQUIV_CONTENT_TYPE) {
nsHtml5String extract = nsHtml5TreeBuilder::extractCharsetFromContent(content, treeBuilder);
if (!extract) {
return false;
diff --git a/parser/html/nsHtml5MetaScanner.h b/parser/html/nsHtml5MetaScanner.h
index 9d3a50a85..93271b3cf 100644
--- a/parser/html/nsHtml5MetaScanner.h
+++ b/parser/html/nsHtml5MetaScanner.h
@@ -45,13 +45,14 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
class nsHtml5StreamParser;
-class nsHtml5Tokenizer;
-class nsHtml5TreeBuilder;
class nsHtml5AttributeName;
class nsHtml5ElementName;
+class nsHtml5Tokenizer;
+class nsHtml5TreeBuilder;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -64,6 +65,62 @@ class nsHtml5MetaScanner
static staticJArray<char16_t,int32_t> CONTENT;
static staticJArray<char16_t,int32_t> HTTP_EQUIV;
static staticJArray<char16_t,int32_t> CONTENT_TYPE;
+ static const int32_t NO = 0;
+
+ static const int32_t M = 1;
+
+ static const int32_t E = 2;
+
+ static const int32_t T = 3;
+
+ static const int32_t A = 4;
+
+ static const int32_t DATA = 0;
+
+ static const int32_t TAG_OPEN = 1;
+
+ static const int32_t SCAN_UNTIL_GT = 2;
+
+ static const int32_t TAG_NAME = 3;
+
+ static const int32_t BEFORE_ATTRIBUTE_NAME = 4;
+
+ static const int32_t ATTRIBUTE_NAME = 5;
+
+ static const int32_t AFTER_ATTRIBUTE_NAME = 6;
+
+ static const int32_t BEFORE_ATTRIBUTE_VALUE = 7;
+
+ static const int32_t ATTRIBUTE_VALUE_DOUBLE_QUOTED = 8;
+
+ static const int32_t ATTRIBUTE_VALUE_SINGLE_QUOTED = 9;
+
+ static const int32_t ATTRIBUTE_VALUE_UNQUOTED = 10;
+
+ static const int32_t AFTER_ATTRIBUTE_VALUE_QUOTED = 11;
+
+ static const int32_t MARKUP_DECLARATION_OPEN = 13;
+
+ static const int32_t MARKUP_DECLARATION_HYPHEN = 14;
+
+ static const int32_t COMMENT_START = 15;
+
+ static const int32_t COMMENT_START_DASH = 16;
+
+ static const int32_t COMMENT = 17;
+
+ static const int32_t COMMENT_END_DASH = 18;
+
+ static const int32_t COMMENT_END = 19;
+
+ static const int32_t SELF_CLOSING_START_TAG = 20;
+
+ static const int32_t HTTP_EQUIV_NOT_SEEN = 0;
+
+ static const int32_t HTTP_EQUIV_CONTENT_TYPE = 1;
+
+ static const int32_t HTTP_EQUIV_OTHER = 2;
+
protected:
nsHtml5ByteReadable* readable;
private:
@@ -109,35 +166,5 @@ class nsHtml5MetaScanner
#include "nsHtml5MetaScannerHSupplement.h"
};
-#define NS_HTML5META_SCANNER_NO 0
-#define NS_HTML5META_SCANNER_M 1
-#define NS_HTML5META_SCANNER_E 2
-#define NS_HTML5META_SCANNER_T 3
-#define NS_HTML5META_SCANNER_A 4
-#define NS_HTML5META_SCANNER_DATA 0
-#define NS_HTML5META_SCANNER_TAG_OPEN 1
-#define NS_HTML5META_SCANNER_SCAN_UNTIL_GT 2
-#define NS_HTML5META_SCANNER_TAG_NAME 3
-#define NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_NAME 4
-#define NS_HTML5META_SCANNER_ATTRIBUTE_NAME 5
-#define NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_NAME 6
-#define NS_HTML5META_SCANNER_BEFORE_ATTRIBUTE_VALUE 7
-#define NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_DOUBLE_QUOTED 8
-#define NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_SINGLE_QUOTED 9
-#define NS_HTML5META_SCANNER_ATTRIBUTE_VALUE_UNQUOTED 10
-#define NS_HTML5META_SCANNER_AFTER_ATTRIBUTE_VALUE_QUOTED 11
-#define NS_HTML5META_SCANNER_MARKUP_DECLARATION_OPEN 13
-#define NS_HTML5META_SCANNER_MARKUP_DECLARATION_HYPHEN 14
-#define NS_HTML5META_SCANNER_COMMENT_START 15
-#define NS_HTML5META_SCANNER_COMMENT_START_DASH 16
-#define NS_HTML5META_SCANNER_COMMENT 17
-#define NS_HTML5META_SCANNER_COMMENT_END_DASH 18
-#define NS_HTML5META_SCANNER_COMMENT_END 19
-#define NS_HTML5META_SCANNER_SELF_CLOSING_START_TAG 20
-#define NS_HTML5META_SCANNER_HTTP_EQUIV_NOT_SEEN 0
-#define NS_HTML5META_SCANNER_HTTP_EQUIV_CONTENT_TYPE 1
-#define NS_HTML5META_SCANNER_HTTP_EQUIV_OTHER 2
-
-
#endif
diff --git a/parser/html/nsHtml5Portability.h b/parser/html/nsHtml5Portability.h
index 8e384258b..77fa5c92e 100644
--- a/parser/html/nsHtml5Portability.h
+++ b/parser/html/nsHtml5Portability.h
@@ -47,11 +47,11 @@
class nsHtml5StreamParser;
+class nsHtml5AttributeName;
+class nsHtml5ElementName;
class nsHtml5Tokenizer;
class nsHtml5TreeBuilder;
class nsHtml5MetaScanner;
-class nsHtml5AttributeName;
-class nsHtml5ElementName;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
@@ -76,7 +76,5 @@ class nsHtml5Portability
static void releaseStatics();
};
-
-
#endif
diff --git a/parser/html/nsHtml5StackNode.cpp b/parser/html/nsHtml5StackNode.cpp
index 95e51fa1a..be344c386 100644
--- a/parser/html/nsHtml5StackNode.cpp
+++ b/parser/html/nsHtml5StackNode.cpp
@@ -44,12 +44,13 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
+#include "nsHtml5AttributeName.h"
+#include "nsHtml5ElementName.h"
#include "nsHtml5Tokenizer.h"
#include "nsHtml5TreeBuilder.h"
#include "nsHtml5MetaScanner.h"
-#include "nsHtml5AttributeName.h"
-#include "nsHtml5ElementName.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
#include "nsHtml5Portability.h"
@@ -59,31 +60,31 @@
int32_t
nsHtml5StackNode::getGroup()
{
- return flags & NS_HTML5ELEMENT_NAME_GROUP_MASK;
+ return flags & nsHtml5ElementName::GROUP_MASK;
}
bool
nsHtml5StackNode::isScoping()
{
- return (flags & NS_HTML5ELEMENT_NAME_SCOPING);
+ return (flags & nsHtml5ElementName::SCOPING);
}
bool
nsHtml5StackNode::isSpecial()
{
- return (flags & NS_HTML5ELEMENT_NAME_SPECIAL);
+ return (flags & nsHtml5ElementName::SPECIAL);
}
bool
nsHtml5StackNode::isFosterParenting()
{
- return (flags & NS_HTML5ELEMENT_NAME_FOSTER_PARENTING);
+ return (flags & nsHtml5ElementName::FOSTER_PARENTING);
}
bool
nsHtml5StackNode::isHtmlIntegrationPoint()
{
- return (flags & NS_HTML5ELEMENT_NAME_HTML_INTEGRATION_POINT);
+ return (flags & nsHtml5ElementName::HTML_INTEGRATION_POINT);
}
@@ -169,9 +170,9 @@ nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHa
int32_t
nsHtml5StackNode::prepareSvgFlags(int32_t flags)
{
- flags &= ~(NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- if ((flags & NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG)) {
- flags |= (NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_HTML_INTEGRATION_POINT);
+ flags &= ~(nsHtml5ElementName::FOSTER_PARENTING | nsHtml5ElementName::SCOPING | nsHtml5ElementName::SPECIAL | nsHtml5ElementName::OPTIONAL_END_TAG);
+ if ((flags & nsHtml5ElementName::SCOPING_AS_SVG)) {
+ flags |= (nsHtml5ElementName::SCOPING | nsHtml5ElementName::SPECIAL | nsHtml5ElementName::HTML_INTEGRATION_POINT);
}
return flags;
}
@@ -179,12 +180,12 @@ nsHtml5StackNode::prepareSvgFlags(int32_t flags)
int32_t
nsHtml5StackNode::prepareMathFlags(int32_t flags, bool markAsIntegrationPoint)
{
- flags &= ~(NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
- if ((flags & NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML)) {
- flags |= (NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL);
+ flags &= ~(nsHtml5ElementName::FOSTER_PARENTING | nsHtml5ElementName::SCOPING | nsHtml5ElementName::SPECIAL | nsHtml5ElementName::OPTIONAL_END_TAG);
+ if ((flags & nsHtml5ElementName::SCOPING_AS_MATHML)) {
+ flags |= (nsHtml5ElementName::SCOPING | nsHtml5ElementName::SPECIAL);
}
if (markAsIntegrationPoint) {
- flags |= NS_HTML5ELEMENT_NAME_HTML_INTEGRATION_POINT;
+ flags |= nsHtml5ElementName::HTML_INTEGRATION_POINT;
}
return flags;
}
diff --git a/parser/html/nsHtml5StackNode.h b/parser/html/nsHtml5StackNode.h
index 15922f3bb..a9fc42d98 100644
--- a/parser/html/nsHtml5StackNode.h
+++ b/parser/html/nsHtml5StackNode.h
@@ -45,14 +45,15 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
class nsHtml5StreamParser;
+class nsHtml5AttributeName;
+class nsHtml5ElementName;
class nsHtml5Tokenizer;
class nsHtml5TreeBuilder;
class nsHtml5MetaScanner;
-class nsHtml5AttributeName;
-class nsHtml5ElementName;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -98,7 +99,5 @@ class nsHtml5StackNode
static void releaseStatics();
};
-
-
#endif
diff --git a/parser/html/nsHtml5StateSnapshot.cpp b/parser/html/nsHtml5StateSnapshot.cpp
index c23963260..ecae631e5 100644
--- a/parser/html/nsHtml5StateSnapshot.cpp
+++ b/parser/html/nsHtml5StateSnapshot.cpp
@@ -43,12 +43,13 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
+#include "nsHtml5AttributeName.h"
+#include "nsHtml5ElementName.h"
#include "nsHtml5Tokenizer.h"
#include "nsHtml5TreeBuilder.h"
#include "nsHtml5MetaScanner.h"
-#include "nsHtml5AttributeName.h"
-#include "nsHtml5ElementName.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5Portability.h"
diff --git a/parser/html/nsHtml5StateSnapshot.h b/parser/html/nsHtml5StateSnapshot.h
index b820af980..ae5fc904e 100644
--- a/parser/html/nsHtml5StateSnapshot.h
+++ b/parser/html/nsHtml5StateSnapshot.h
@@ -44,14 +44,15 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
class nsHtml5StreamParser;
+class nsHtml5AttributeName;
+class nsHtml5ElementName;
class nsHtml5Tokenizer;
class nsHtml5TreeBuilder;
class nsHtml5MetaScanner;
-class nsHtml5AttributeName;
-class nsHtml5ElementName;
class nsHtml5UTF16Buffer;
class nsHtml5Portability;
@@ -91,7 +92,5 @@ class nsHtml5StateSnapshot : public nsAHtml5TreeBuilderState
static void releaseStatics();
};
-
-
#endif
diff --git a/parser/html/nsHtml5Tokenizer.cpp b/parser/html/nsHtml5Tokenizer.cpp
index 3b1c34b58..bb8d950d5 100644
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -48,10 +48,10 @@
#include "nsHtml5Highlighter.h"
#include "nsHtml5TokenizerLoopPolicies.h"
-#include "nsHtml5TreeBuilder.h"
-#include "nsHtml5MetaScanner.h"
#include "nsHtml5AttributeName.h"
#include "nsHtml5ElementName.h"
+#include "nsHtml5TreeBuilder.h"
+#include "nsHtml5MetaScanner.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
@@ -148,43 +148,43 @@ void
nsHtml5Tokenizer::endTagExpectationToArray()
{
switch(endTagExpectation->getGroup()) {
- case NS_HTML5TREE_BUILDER_TITLE: {
+ case nsHtml5TreeBuilder::TITLE: {
endTagExpectationAsArray = TITLE_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_SCRIPT: {
+ case nsHtml5TreeBuilder::SCRIPT: {
endTagExpectationAsArray = SCRIPT_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_STYLE: {
+ case nsHtml5TreeBuilder::STYLE: {
endTagExpectationAsArray = STYLE_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_PLAINTEXT: {
+ case nsHtml5TreeBuilder::PLAINTEXT: {
endTagExpectationAsArray = PLAINTEXT_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_XMP: {
+ case nsHtml5TreeBuilder::XMP: {
endTagExpectationAsArray = XMP_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_TEXTAREA: {
+ case nsHtml5TreeBuilder::TEXTAREA: {
endTagExpectationAsArray = TEXTAREA_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_IFRAME: {
+ case nsHtml5TreeBuilder::IFRAME: {
endTagExpectationAsArray = IFRAME_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_NOEMBED: {
+ case nsHtml5TreeBuilder::NOEMBED: {
endTagExpectationAsArray = NOEMBED_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_NOSCRIPT: {
+ case nsHtml5TreeBuilder::NOSCRIPT: {
endTagExpectationAsArray = NOSCRIPT_ARR;
return;
}
- case NS_HTML5TREE_BUILDER_NOFRAMES: {
+ case nsHtml5TreeBuilder::NOFRAMES: {
endTagExpectationAsArray = NOFRAMES_ARR;
return;
}
@@ -211,7 +211,7 @@ nsHtml5Tokenizer::emptyAttributes()
void
nsHtml5Tokenizer::emitOrAppendCharRefBuf(int32_t returnState)
{
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
appendCharRefBufToStrBuf();
} else {
if (charRefBufLen > 0) {
@@ -292,7 +292,7 @@ nsHtml5Tokenizer::emitCurrentTagToken(bool selfClosing, int32_t pos)
{
cstart = pos + 1;
maybeErrSlashInEndTag(selfClosing);
- stateSave = NS_HTML5TOKENIZER_DATA;
+ stateSave = nsHtml5Tokenizer::DATA;
nsHtml5HtmlAttributes* attrs = (!attributes ? nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES : attributes);
if (endTag) {
maybeErrAttributesOnEndTag(attrs);
@@ -385,23 +385,23 @@ nsHtml5Tokenizer::tokenizeBuffer(nsHtml5UTF16Buffer* buffer)
int32_t end = buffer->getEnd();
int32_t pos = start - 1;
switch(state) {
- case NS_HTML5TOKENIZER_DATA:
- case NS_HTML5TOKENIZER_RCDATA:
- case NS_HTML5TOKENIZER_SCRIPT_DATA:
- case NS_HTML5TOKENIZER_PLAINTEXT:
- case NS_HTML5TOKENIZER_RAWTEXT:
- case NS_HTML5TOKENIZER_CDATA_SECTION:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START_DASH:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH_DASH:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_START:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_END: {
+ case DATA:
+ case RCDATA:
+ case SCRIPT_DATA:
+ case PLAINTEXT:
+ case RAWTEXT:
+ case CDATA_SECTION:
+ case SCRIPT_DATA_ESCAPED:
+ case SCRIPT_DATA_ESCAPE_START:
+ case SCRIPT_DATA_ESCAPE_START_DASH:
+ case SCRIPT_DATA_ESCAPED_DASH:
+ case SCRIPT_DATA_ESCAPED_DASH_DASH:
+ case SCRIPT_DATA_DOUBLE_ESCAPE_START:
+ case SCRIPT_DATA_DOUBLE_ESCAPED:
+ case SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:
+ case SCRIPT_DATA_DOUBLE_ESCAPED_DASH:
+ case SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:
+ case SCRIPT_DATA_DOUBLE_ESCAPE_END: {
cstart = start;
break;
}
@@ -431,7 +431,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
{
stateloop: for (; ; ) {
switch(state) {
- case NS_HTML5TOKENIZER_DATA: {
+ case DATA: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -448,12 +448,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
appendCharRefBuf(c);
setAdditionalAndRememberAmpersandLocation('\0');
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CONSUME_CHARACTER_REFERENCE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '<': {
flushChars(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_TAG_OPEN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::TAG_OPEN, reconsume, pos);
NS_HTML5_BREAK(dataloop);
}
case '\0': {
@@ -474,7 +474,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
dataloop_end: ;
}
- case NS_HTML5TOKENIZER_TAG_OPEN: {
+ case TAG_OPEN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -484,27 +484,27 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
endTag = false;
clearStrBufBeforeUse();
appendStrBuf((char16_t) (c + 0x20));
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_TAG_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::TAG_NAME, reconsume, pos);
NS_HTML5_BREAK(tagopenloop);
} else if (c >= 'a' && c <= 'z') {
endTag = false;
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_TAG_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::TAG_NAME, reconsume, pos);
NS_HTML5_BREAK(tagopenloop);
}
switch(c) {
case '!': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_MARKUP_DECLARATION_OPEN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::MARKUP_DECLARATION_OPEN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '/': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CLOSE_TAG_OPEN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CLOSE_TAG_OPEN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\?': {
if (viewingXmlSource) {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::PROCESSING_INSTRUCTION, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
if (P::reportErrors) {
@@ -512,7 +512,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -521,7 +521,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 2);
cstart = pos + 1;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
@@ -531,14 +531,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
cstart = pos;
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
tagopenloop_end: ;
}
- case NS_HTML5TOKENIZER_TAG_NAME: {
+ case TAG_NAME: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -548,7 +548,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\r': {
silentCarriageReturn();
strBufToElementNameString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -558,12 +558,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\t':
case '\f': {
strBufToElementNameString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(tagnameloop);
}
case '/': {
strBufToElementNameString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SELF_CLOSING_START_TAG, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -588,7 +588,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
tagnameloop_end: ;
}
- case NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME: {
+ case BEFORE_ATTRIBUTE_NAME: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -612,7 +612,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
continue;
}
case '/': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SELF_CLOSING_START_TAG, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -640,14 +640,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
attributeLine = line;
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(beforeattributenameloop);
}
}
}
beforeattributenameloop_end: ;
}
- case NS_HTML5TOKENIZER_ATTRIBUTE_NAME: {
+ case ATTRIBUTE_NAME: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -657,7 +657,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\r': {
silentCarriageReturn();
attributeNameComplete();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -667,18 +667,18 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\t':
case '\f': {
attributeNameComplete();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '/': {
attributeNameComplete();
addAttributeWithoutValue();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SELF_CLOSING_START_TAG, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '=': {
attributeNameComplete();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_VALUE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_VALUE, reconsume, pos);
NS_HTML5_BREAK(attributenameloop);
}
case '>': {
@@ -711,7 +711,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
attributenameloop_end: ;
}
- case NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_VALUE: {
+ case BEFORE_ATTRIBUTE_VALUE: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -733,21 +733,21 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\"': {
attributeLine = line;
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::ATTRIBUTE_VALUE_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_BREAK(beforeattributevalueloop);
}
case '&': {
attributeLine = line;
clearStrBufBeforeUse();
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_UNQUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::ATTRIBUTE_VALUE_UNQUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\'': {
attributeLine = line;
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::ATTRIBUTE_VALUE_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -775,7 +775,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
attributeLine = line;
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_UNQUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::ATTRIBUTE_VALUE_UNQUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
@@ -783,7 +783,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
beforeattributevalueloop_end: ;
}
- case NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
+ case ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -796,7 +796,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\"': {
addAttributeWithValue();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_VALUE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_ATTRIBUTE_VALUE_QUOTED, reconsume, pos);
NS_HTML5_BREAK(attributevaluedoublequotedloop);
}
case '&': {
@@ -804,7 +804,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
appendCharRefBuf(c);
setAdditionalAndRememberAmpersandLocation('\"');
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CONSUME_CHARACTER_REFERENCE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -826,7 +826,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
attributevaluedoublequotedloop_end: ;
}
- case NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_VALUE_QUOTED: {
+ case AFTER_ATTRIBUTE_VALUE_QUOTED: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -835,7 +835,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
silentCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -844,11 +844,11 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case ' ':
case '\t':
case '\f': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '/': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SELF_CLOSING_START_TAG, reconsume, pos);
NS_HTML5_BREAK(afterattributevaluequotedloop);
}
case '>': {
@@ -863,14 +863,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenAttributes();
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
afterattributevaluequotedloop_end: ;
}
- case NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG: {
+ case SELF_CLOSING_START_TAG: {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
}
@@ -888,12 +888,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errSlashNotFollowedByGt();
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
- case NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_UNQUOTED: {
+ case ATTRIBUTE_VALUE_UNQUOTED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -907,7 +907,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\r': {
silentCarriageReturn();
addAttributeWithValue();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -917,7 +917,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\t':
case '\f': {
addAttributeWithValue();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '&': {
@@ -925,7 +925,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
appendCharRefBuf(c);
setAdditionalAndRememberAmpersandLocation('>');
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CONSUME_CHARACTER_REFERENCE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -956,7 +956,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
}
- case NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_NAME: {
+ case AFTER_ATTRIBUTE_NAME: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -977,11 +977,11 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '/': {
addAttributeWithoutValue();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SELF_CLOSING_START_TAG, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '=': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_VALUE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_VALUE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -1009,13 +1009,13 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_MARKUP_DECLARATION_OPEN: {
+ case MARKUP_DECLARATION_OPEN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1025,7 +1025,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '-': {
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_MARKUP_DECLARATION_HYPHEN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::MARKUP_DECLARATION_HYPHEN, reconsume, pos);
NS_HTML5_BREAK(markupdeclarationopenloop);
}
case 'd':
@@ -1033,7 +1033,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
clearStrBufBeforeUse();
appendStrBuf(c);
index = 0;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_MARKUP_DECLARATION_OCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::MARKUP_DECLARATION_OCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '[': {
@@ -1041,7 +1041,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
clearStrBufBeforeUse();
appendStrBuf(c);
index = 0;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CDATA_START, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CDATA_START, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
@@ -1051,14 +1051,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
markupdeclarationopenloop_end: ;
}
- case NS_HTML5TOKENIZER_MARKUP_DECLARATION_HYPHEN: {
+ case MARKUP_DECLARATION_HYPHEN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1067,7 +1067,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '-': {
clearStrBufAfterOneHyphen();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_START, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_START, reconsume, pos);
NS_HTML5_BREAK(markupdeclarationhyphenloop);
}
default: {
@@ -1075,14 +1075,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errBogusComment();
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
markupdeclarationhyphenloop_end: ;
}
- case NS_HTML5TOKENIZER_COMMENT_START: {
+ case COMMENT_START: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1091,7 +1091,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '-': {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_START_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_START_DASH, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -1099,17 +1099,17 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errPrematureEndOfComment();
}
emitComment(0, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
appendStrBufCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
appendStrBufLineFeed();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_BREAK(commentstartloop);
}
case '\0': {
@@ -1117,14 +1117,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
default: {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_BREAK(commentstartloop);
}
}
}
commentstartloop_end: ;
}
- case NS_HTML5TOKENIZER_COMMENT: {
+ case COMMENT: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1133,7 +1133,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '-': {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_END_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_END_DASH, reconsume, pos);
NS_HTML5_BREAK(commentloop);
}
case '\r': {
@@ -1155,7 +1155,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
commentloop_end: ;
}
- case NS_HTML5TOKENIZER_COMMENT_END_DASH: {
+ case COMMENT_END_DASH: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1164,17 +1164,17 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '-': {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_END, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_END, reconsume, pos);
NS_HTML5_BREAK(commentenddashloop);
}
case '\r': {
appendStrBufCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
appendStrBufLineFeed();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -1182,14 +1182,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
default: {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
commentenddashloop_end: ;
}
- case NS_HTML5TOKENIZER_COMMENT_END: {
+ case COMMENT_END: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1198,7 +1198,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '>': {
emitComment(2, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '-': {
@@ -1207,12 +1207,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '\r': {
adjustDoubleHyphenAndAppendToStrBufCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
adjustDoubleHyphenAndAppendToStrBufLineFeed();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '!': {
@@ -1220,7 +1220,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errHyphenHyphenBang();
}
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_END_BANG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_END_BANG, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -1228,14 +1228,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
default: {
adjustDoubleHyphenAndAppendToStrBufAndErr(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_COMMENT_END_BANG: {
+ case COMMENT_END_BANG: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1244,12 +1244,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '>': {
emitComment(3, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '-': {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_END_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_END_DASH, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -1265,13 +1265,13 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
default: {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_COMMENT_START_DASH: {
+ case COMMENT_START_DASH: {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
}
@@ -1279,7 +1279,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '-': {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT_END, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT_END, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -1287,17 +1287,17 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errPrematureEndOfComment();
}
emitComment(1, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
appendStrBufCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
appendStrBufLineFeed();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -1305,12 +1305,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
default: {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
- case NS_HTML5TOKENIZER_CDATA_START: {
+ case CDATA_START: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1324,7 +1324,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errBogusComment();
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
index++;
@@ -1333,12 +1333,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
clearStrBufAfterUse();
cstart = pos;
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CDATA_SECTION, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CDATA_SECTION, reconsume, pos);
break;
}
}
}
- case NS_HTML5TOKENIZER_CDATA_SECTION: {
+ case CDATA_SECTION: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -1351,7 +1351,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case ']': {
flushChars(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CDATA_RSQB, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CDATA_RSQB, reconsume, pos);
NS_HTML5_BREAK(cdatasectionloop);
}
case '\0': {
@@ -1372,7 +1372,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
cdatasectionloop_end: ;
}
- case NS_HTML5TOKENIZER_CDATA_RSQB: {
+ case CDATA_RSQB: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1380,21 +1380,21 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
c = checkChar(buf, pos);
switch(c) {
case ']': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CDATA_RSQB_RSQB, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CDATA_RSQB_RSQB, reconsume, pos);
NS_HTML5_BREAK(cdatarsqb);
}
default: {
tokenHandler->characters(nsHtml5Tokenizer::RSQB_RSQB, 0, 1);
cstart = pos;
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CDATA_SECTION, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CDATA_SECTION, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
cdatarsqb_end: ;
}
- case NS_HTML5TOKENIZER_CDATA_RSQB_RSQB: {
+ case CDATA_RSQB_RSQB: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1407,21 +1407,21 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '>': {
cstart = pos + 1;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
tokenHandler->characters(nsHtml5Tokenizer::RSQB_RSQB, 0, 2);
cstart = pos;
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CDATA_SECTION, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CDATA_SECTION, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_SINGLE_QUOTED: {
+ case ATTRIBUTE_VALUE_SINGLE_QUOTED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -1434,7 +1434,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\'': {
addAttributeWithValue();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_VALUE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_ATTRIBUTE_VALUE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '&': {
@@ -1442,7 +1442,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
appendCharRefBuf(c);
setAdditionalAndRememberAmpersandLocation('\'');
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CONSUME_CHARACTER_REFERENCE, reconsume, pos);
NS_HTML5_BREAK(attributevaluesinglequotedloop);
}
case '\r': {
@@ -1464,7 +1464,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
attributevaluesinglequotedloop_end: ;
}
- case NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE: {
+ case CONSUME_CHARACTER_REFERENCE: {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
}
@@ -1479,7 +1479,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '&':
case '\0': {
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
@@ -1488,7 +1488,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '#': {
appendCharRefBuf('#');
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CONSUME_NCR, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CONSUME_NCR, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
@@ -1507,7 +1507,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoNamedCharacterMatch();
}
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
@@ -1515,11 +1515,11 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_CONTINUE(stateloop);
}
appendCharRefBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CHARACTER_REFERENCE_HILO_LOOKUP, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CHARACTER_REFERENCE_HILO_LOOKUP, reconsume, pos);
}
}
}
- case NS_HTML5TOKENIZER_CHARACTER_REFERENCE_HILO_LOOKUP: {
+ case CHARACTER_REFERENCE_HILO_LOOKUP: {
{
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1537,7 +1537,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoNamedCharacterMatch();
}
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
@@ -1550,10 +1550,10 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
entCol = -1;
candidate = -1;
charRefBufMark = 0;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CHARACTER_REFERENCE_TAIL, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CHARACTER_REFERENCE_TAIL, reconsume, pos);
}
}
- case NS_HTML5TOKENIZER_CHARACTER_REFERENCE_TAIL: {
+ case CHARACTER_REFERENCE_TAIL: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1612,7 +1612,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoNamedCharacterMatch();
}
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
@@ -1621,7 +1621,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
} else {
const nsHtml5CharacterName& candidateName = nsHtml5NamedCharacters::NAMES[candidate];
if (!candidateName.length() || candidateName.charAt(candidateName.length() - 1) != ';') {
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
char16_t ch;
if (charRefBufMark == charRefBufLen) {
ch = c;
@@ -1638,7 +1638,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_CONTINUE(stateloop);
}
}
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
if (P::reportErrors) {
errUnescapedAmpersandInterpretedAsCharacterReference();
}
@@ -1656,7 +1656,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
emitOrAppendTwo(val, returnState);
}
if (charRefBufMark < charRefBufLen) {
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
appendStrBuf(charRefBuf, charRefBufMark, charRefBufLen - charRefBufMark);
} else {
tokenHandler->characters(charRefBuf, charRefBufMark, charRefBufLen - charRefBufMark);
@@ -1664,7 +1664,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
bool earlyBreak = (c == ';' && charRefBufMark == charRefBufLen);
charRefBufLen = 0;
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = earlyBreak ? pos + 1 : pos;
}
reconsume = !earlyBreak;
@@ -1672,7 +1672,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
NS_HTML5_CONTINUE(stateloop);
}
}
- case NS_HTML5TOKENIZER_CONSUME_NCR: {
+ case CONSUME_NCR: {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
}
@@ -1683,16 +1683,16 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case 'x':
case 'X': {
appendCharRefBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_HEX_NCR_LOOP, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::HEX_NCR_LOOP, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DECIMAL_NRC_LOOP, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DECIMAL_NRC_LOOP, reconsume, pos);
}
}
}
- case NS_HTML5TOKENIZER_DECIMAL_NRC_LOOP: {
+ case DECIMAL_NRC_LOOP: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -1712,10 +1712,10 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
continue;
} else if (c == ';') {
if (seenDigits) {
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos + 1;
}
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_HANDLE_NCR_VALUE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::HANDLE_NCR_VALUE, reconsume, pos);
NS_HTML5_BREAK(decimalloop);
} else {
if (P::reportErrors) {
@@ -1723,7 +1723,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
appendCharRefBuf(';');
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos + 1;
}
state = P::transition(mViewSource, returnState, reconsume, pos);
@@ -1735,7 +1735,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoDigitsInNCR();
}
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
@@ -1745,24 +1745,24 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
if (P::reportErrors) {
errCharRefLacksSemicolon();
}
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_HANDLE_NCR_VALUE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::HANDLE_NCR_VALUE, reconsume, pos);
NS_HTML5_BREAK(decimalloop);
}
}
}
decimalloop_end: ;
}
- case NS_HTML5TOKENIZER_HANDLE_NCR_VALUE: {
+ case HANDLE_NCR_VALUE: {
charRefBufLen = 0;
handleNcrValue(returnState);
state = P::transition(mViewSource, returnState, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
- case NS_HTML5TOKENIZER_HEX_NCR_LOOP: {
+ case HEX_NCR_LOOP: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -1792,10 +1792,10 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
continue;
} else if (c == ';') {
if (seenDigits) {
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos + 1;
}
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_HANDLE_NCR_VALUE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::HANDLE_NCR_VALUE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
} else {
if (P::reportErrors) {
@@ -1803,7 +1803,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
appendCharRefBuf(';');
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos + 1;
}
state = P::transition(mViewSource, returnState, reconsume, pos);
@@ -1815,7 +1815,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoDigitsInNCR();
}
emitOrAppendCharRefBuf(returnState);
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
@@ -1825,17 +1825,17 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
if (P::reportErrors) {
errCharRefLacksSemicolon();
}
- if (!(returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if (!(returnState & DATA_AND_RCDATA_MASK)) {
cstart = pos;
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_HANDLE_NCR_VALUE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::HANDLE_NCR_VALUE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_PLAINTEXT: {
+ case PLAINTEXT: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -1864,7 +1864,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
- case NS_HTML5TOKENIZER_CLOSE_TAG_OPEN: {
+ case CLOSE_TAG_OPEN: {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
}
@@ -1875,7 +1875,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errLtSlashGt();
}
cstart = pos + 1;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -1885,7 +1885,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
appendStrBuf('\n');
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -1895,7 +1895,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -1909,7 +1909,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
endTag = true;
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_TAG_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::TAG_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
} else {
if (P::reportErrors) {
@@ -1917,13 +1917,13 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_RCDATA: {
+ case RCDATA: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -1940,13 +1940,13 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
appendCharRefBuf(c);
setAdditionalAndRememberAmpersandLocation('\0');
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::CONSUME_CHARACTER_REFERENCE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '<': {
flushChars(buf, pos);
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_RAWTEXT_RCDATA_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::RAWTEXT_RCDATA_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -1967,7 +1967,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
- case NS_HTML5TOKENIZER_RAWTEXT: {
+ case RAWTEXT: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -1981,7 +1981,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '<': {
flushChars(buf, pos);
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_RAWTEXT_RCDATA_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::RAWTEXT_RCDATA_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_BREAK(rawtextloop);
}
case '\0': {
@@ -2002,7 +2002,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
rawtextloop_end: ;
}
- case NS_HTML5TOKENIZER_RAWTEXT_RCDATA_LESS_THAN_SIGN: {
+ case RAWTEXT_RCDATA_LESS_THAN_SIGN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2012,7 +2012,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '/': {
index = 0;
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_NON_DATA_END_TAG_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::NON_DATA_END_TAG_NAME, reconsume, pos);
NS_HTML5_BREAK(rawtextrcdatalessthansignloop);
}
default: {
@@ -2026,7 +2026,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
rawtextrcdatalessthansignloop_end: ;
}
- case NS_HTML5TOKENIZER_NON_DATA_END_TAG_NAME: {
+ case NON_DATA_END_TAG_NAME: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2062,7 +2062,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\r': {
silentCarriageReturn();
clearStrBufAfterUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -2072,12 +2072,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\t':
case '\f': {
clearStrBufAfterUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_ATTRIBUTE_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '/': {
clearStrBufAfterUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SELF_CLOSING_START_TAG, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -2100,7 +2100,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
}
- case NS_HTML5TOKENIZER_BOGUS_COMMENT: {
+ case BOGUS_COMMENT: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2113,12 +2113,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '>': {
emitComment(0, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '-': {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT_HYPHEN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT_HYPHEN, reconsume, pos);
NS_HTML5_BREAK(boguscommentloop);
}
case '\r': {
@@ -2140,7 +2140,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
boguscommentloop_end: ;
}
- case NS_HTML5TOKENIZER_BOGUS_COMMENT_HYPHEN: {
+ case BOGUS_COMMENT_HYPHEN: {
boguscommenthyphenloop: for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2149,7 +2149,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '>': {
emitComment(0, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '-': {
@@ -2158,12 +2158,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '\r': {
appendStrBufCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
appendStrBufLineFeed();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -2171,14 +2171,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
default: {
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA: {
+ case SCRIPT_DATA: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2192,7 +2192,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '<': {
flushChars(buf, pos);
returnState = state;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_BREAK(scriptdataloop);
}
case '\0': {
@@ -2213,7 +2213,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
scriptdataloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_LESS_THAN_SIGN: {
+ case SCRIPT_DATA_LESS_THAN_SIGN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2223,27 +2223,27 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '/': {
index = 0;
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_NON_DATA_END_TAG_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::NON_DATA_END_TAG_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '!': {
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
cstart = pos;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPE_START, reconsume, pos);
NS_HTML5_BREAK(scriptdatalessthansignloop);
}
default: {
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
cstart = pos;
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdatalessthansignloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START: {
+ case SCRIPT_DATA_ESCAPE_START: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2251,19 +2251,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
c = checkChar(buf, pos);
switch(c) {
case '-': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPE_START_DASH, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapestartloop);
}
default: {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdataescapestartloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START_DASH: {
+ case SCRIPT_DATA_ESCAPE_START_DASH: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2271,19 +2271,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
c = checkChar(buf, pos);
switch(c) {
case '-': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED_DASH_DASH, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapestartdashloop);
}
default: {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdataescapestartdashloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH_DASH: {
+ case SCRIPT_DATA_ESCAPED_DASH_DASH: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2295,35 +2295,35 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '<': {
flushChars(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
emitReplacementCharacter(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapeddashdashloop);
}
case '\r': {
emitCarriageReturn(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
silentLineFeed();
}
default: {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapeddashdashloop);
}
}
}
scriptdataescapeddashdashloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED: {
+ case SCRIPT_DATA_ESCAPED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2335,12 +2335,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
switch(c) {
case '-': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED_DASH, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapedloop);
}
case '<': {
flushChars(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -2361,7 +2361,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
scriptdataescapedloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH: {
+ case SCRIPT_DATA_ESCAPED_DASH: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2369,36 +2369,36 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
c = checkChar(buf, pos);
switch(c) {
case '-': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED_DASH_DASH, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '<': {
flushChars(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapeddashloop);
}
case '\0': {
emitReplacementCharacter(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
emitCarriageReturn(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
silentLineFeed();
}
default: {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdataescapeddashloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
+ case SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2408,8 +2408,8 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '/': {
index = 0;
clearStrBufBeforeUse();
- returnState = NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_NON_DATA_END_TAG_NAME, reconsume, pos);
+ returnState = nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED;
+ state = P::transition(mViewSource, nsHtml5Tokenizer::NON_DATA_END_TAG_NAME, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case 'S':
@@ -2417,21 +2417,21 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
cstart = pos;
index = 1;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_START, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPE_START, reconsume, pos);
NS_HTML5_BREAK(scriptdataescapedlessthanloop);
}
default: {
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
cstart = pos;
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdataescapedlessthanloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_START: {
+ case SCRIPT_DATA_DOUBLE_ESCAPE_START: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2445,7 +2445,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
if (folded != nsHtml5Tokenizer::SCRIPT_ARR[index]) {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
index++;
@@ -2454,7 +2454,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
emitCarriageReturn(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -2465,19 +2465,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\f':
case '/':
case '>': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(scriptdatadoubleescapestartloop);
}
default: {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdatadoubleescapestartloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED: {
+ case SCRIPT_DATA_DOUBLE_ESCAPED: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2489,11 +2489,11 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
switch(c) {
case '-': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED_DASH, reconsume, pos);
NS_HTML5_BREAK(scriptdatadoubleescapedloop);
}
case '<': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -2514,7 +2514,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
scriptdatadoubleescapedloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {
+ case SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2522,35 +2522,35 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
c = checkChar(buf, pos);
switch(c) {
case '-': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH, reconsume, pos);
NS_HTML5_BREAK(scriptdatadoubleescapeddashloop);
}
case '<': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
emitReplacementCharacter(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
emitCarriageReturn(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
silentLineFeed();
}
default: {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdatadoubleescapeddashloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {
+ case SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2561,35 +2561,35 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
continue;
}
case '<': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, reconsume, pos);
NS_HTML5_BREAK(scriptdatadoubleescapeddashdashloop);
}
case '>': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
emitReplacementCharacter(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
emitCarriageReturn(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
silentLineFeed();
}
default: {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdatadoubleescapeddashdashloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {
+ case SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2598,19 +2598,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '/': {
index = 0;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_END, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPE_END, reconsume, pos);
NS_HTML5_BREAK(scriptdatadoubleescapedlessthanloop);
}
default: {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
scriptdatadoubleescapedlessthanloop_end: ;
}
- case NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_END: {
+ case SCRIPT_DATA_DOUBLE_ESCAPE_END: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2623,7 +2623,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
if (folded != nsHtml5Tokenizer::SCRIPT_ARR[index]) {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
index++;
@@ -2632,7 +2632,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
emitCarriageReturn(buf, pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -2643,19 +2643,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\f':
case '/':
case '>': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::SCRIPT_DATA_DOUBLE_ESCAPED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
}
- case NS_HTML5TOKENIZER_MARKUP_DECLARATION_OCTYPE: {
+ case MARKUP_DECLARATION_OCTYPE: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2673,20 +2673,20 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errBogusComment();
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_COMMENT, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_COMMENT, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
index++;
continue;
} else {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE, reconsume, pos);
NS_HTML5_BREAK(markupdeclarationdoctypeloop);
}
}
markupdeclarationdoctypeloop_end: ;
}
- case NS_HTML5TOKENIZER_DOCTYPE: {
+ case DOCTYPE: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2700,7 +2700,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
silentCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -2709,7 +2709,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case ' ':
case '\t':
case '\f': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_NAME, reconsume, pos);
NS_HTML5_BREAK(doctypeloop);
}
default: {
@@ -2717,14 +2717,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errMissingSpaceBeforeDoctypeName();
}
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_NAME, reconsume, pos);
NS_HTML5_BREAK(doctypeloop);
}
}
}
doctypeloop_end: ;
}
- case NS_HTML5TOKENIZER_BEFORE_DOCTYPE_NAME: {
+ case BEFORE_DOCTYPE_NAME: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2753,7 +2753,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
forceQuirks = true;
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -2765,14 +2765,14 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
clearStrBufBeforeUse();
appendStrBuf(c);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_NAME, reconsume, pos);
NS_HTML5_BREAK(beforedoctypenameloop);
}
}
}
beforedoctypenameloop_end: ;
}
- case NS_HTML5TOKENIZER_DOCTYPE_NAME: {
+ case DOCTYPE_NAME: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2782,7 +2782,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\r': {
silentCarriageReturn();
strBufToDoctypeName();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_NAME, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -2792,13 +2792,13 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case '\t':
case '\f': {
strBufToDoctypeName();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_NAME, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_NAME, reconsume, pos);
NS_HTML5_BREAK(doctypenameloop);
}
case '>': {
strBufToDoctypeName();
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\0': {
@@ -2815,7 +2815,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
doctypenameloop_end: ;
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_NAME: {
+ case AFTER_DOCTYPE_NAME: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2836,31 +2836,31 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '>': {
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case 'p':
case 'P': {
index = 0;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_UBLIC, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_UBLIC, reconsume, pos);
NS_HTML5_BREAK(afterdoctypenameloop);
}
case 's':
case 'S': {
index = 0;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_YSTEM, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_YSTEM, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
afterdoctypenameloop_end: ;
}
- case NS_HTML5TOKENIZER_DOCTYPE_UBLIC: {
+ case DOCTYPE_UBLIC: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2874,20 +2874,20 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
if (folded != nsHtml5Tokenizer::UBLIC[index]) {
bogusDoctype();
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
index++;
continue;
} else {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_KEYWORD, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_PUBLIC_KEYWORD, reconsume, pos);
NS_HTML5_BREAK(doctypeublicloop);
}
}
doctypeublicloop_end: ;
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_KEYWORD: {
+ case AFTER_DOCTYPE_PUBLIC_KEYWORD: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -2900,7 +2900,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
silentCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -2909,7 +2909,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case ' ':
case '\t':
case '\f': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
NS_HTML5_BREAK(afterdoctypepublickeywordloop);
}
case '\"': {
@@ -2917,7 +2917,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenDoctypePublicKeywordAndQuote();
}
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\'': {
@@ -2925,7 +2925,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenDoctypePublicKeywordAndQuote();
}
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -2934,19 +2934,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
forceQuirks = true;
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
afterdoctypepublickeywordloop_end: ;
}
- case NS_HTML5TOKENIZER_BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
+ case BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -2967,12 +2967,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '\"': {
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_BREAK(beforedoctypepublicidentifierloop);
}
case '\'': {
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -2981,19 +2981,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
forceQuirks = true;
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
beforedoctypepublicidentifierloop_end: ;
}
- case NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {
+ case DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3002,7 +3002,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\"': {
publicIdentifier = strBufToString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
NS_HTML5_BREAK(doctypepublicidentifierdoublequotedloop);
}
case '>': {
@@ -3012,7 +3012,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
forceQuirks = true;
publicIdentifier = strBufToString();
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -3034,7 +3034,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
doctypepublicidentifierdoublequotedloop_end: ;
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {
+ case AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3043,7 +3043,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
silentCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -3052,12 +3052,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case ' ':
case '\t':
case '\f': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS, reconsume, pos);
NS_HTML5_BREAK(afterdoctypepublicidentifierloop);
}
case '>': {
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\"': {
@@ -3065,7 +3065,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenPublicAndSystemIds();
}
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\'': {
@@ -3073,19 +3073,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenPublicAndSystemIds();
}
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
afterdoctypepublicidentifierloop_end: ;
}
- case NS_HTML5TOKENIZER_BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
+ case BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3106,29 +3106,29 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '>': {
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\"': {
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_BREAK(betweendoctypepublicandsystemidentifiersloop);
}
case '\'': {
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
betweendoctypepublicandsystemidentifiersloop_end: ;
}
- case NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {
+ case DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3137,7 +3137,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\"': {
systemIdentifier = strBufToString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -3147,7 +3147,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
forceQuirks = true;
systemIdentifier = strBufToString();
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -3169,7 +3169,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
+ case AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3190,19 +3190,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '>': {
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctypeWithoutQuirks();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_BREAK(afterdoctypesystemidentifierloop);
}
}
}
afterdoctypesystemidentifierloop_end: ;
}
- case NS_HTML5TOKENIZER_BOGUS_DOCTYPE: {
+ case BOGUS_DOCTYPE: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -3215,7 +3215,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '>': {
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -3231,7 +3231,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
}
- case NS_HTML5TOKENIZER_DOCTYPE_YSTEM: {
+ case DOCTYPE_YSTEM: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3245,20 +3245,20 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
if (folded != nsHtml5Tokenizer::YSTEM[index]) {
bogusDoctype();
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
index++;
NS_HTML5_CONTINUE(stateloop);
} else {
reconsume = true;
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_KEYWORD, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_SYSTEM_KEYWORD, reconsume, pos);
NS_HTML5_BREAK(doctypeystemloop);
}
}
doctypeystemloop_end: ;
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_KEYWORD: {
+ case AFTER_DOCTYPE_SYSTEM_KEYWORD: {
for (; ; ) {
if (reconsume) {
reconsume = false;
@@ -3271,7 +3271,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\r': {
silentCarriageReturn();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
NS_HTML5_BREAK(stateloop);
}
case '\n': {
@@ -3280,7 +3280,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
case ' ':
case '\t':
case '\f': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BEFORE_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BEFORE_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
NS_HTML5_BREAK(afterdoctypesystemkeywordloop);
}
case '\"': {
@@ -3288,7 +3288,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenDoctypeSystemKeywordAndQuote();
}
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\'': {
@@ -3296,7 +3296,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
errNoSpaceBetweenDoctypeSystemKeywordAndQuote();
}
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -3305,19 +3305,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
forceQuirks = true;
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
afterdoctypesystemkeywordloop_end: ;
}
- case NS_HTML5TOKENIZER_BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {
+ case BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3338,12 +3338,12 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
case '\"': {
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\'': {
clearStrBufBeforeUse();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED, reconsume, pos);
NS_HTML5_BREAK(beforedoctypesystemidentifierloop);
}
case '>': {
@@ -3352,19 +3352,19 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
forceQuirks = true;
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
bogusDoctype();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_BOGUS_DOCTYPE, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::BOGUS_DOCTYPE, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
}
beforedoctypesystemidentifierloop_end: ;
}
- case NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
+ case DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3373,7 +3373,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\'': {
systemIdentifier = strBufToString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_SYSTEM_IDENTIFIER, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -3383,7 +3383,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
forceQuirks = true;
systemIdentifier = strBufToString();
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -3404,7 +3404,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
}
- case NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
+ case DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3413,7 +3413,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
switch(c) {
case '\'': {
publicIdentifier = strBufToString();
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::AFTER_DOCTYPE_PUBLIC_IDENTIFIER, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '>': {
@@ -3423,7 +3423,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
forceQuirks = true;
publicIdentifier = strBufToString();
emitDoctypeToken(pos);
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
case '\r': {
@@ -3444,7 +3444,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
}
}
- case NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION: {
+ case PROCESSING_INSTRUCTION: {
for (; ; ) {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
@@ -3452,7 +3452,7 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
c = checkChar(buf, pos);
switch(c) {
case '\?': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION_QUESTION_MARK, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::PROCESSING_INSTRUCTION_QUESTION_MARK, reconsume, pos);
NS_HTML5_BREAK(processinginstructionloop);
}
default: {
@@ -3462,18 +3462,18 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu
}
processinginstructionloop_end: ;
}
- case NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION_QUESTION_MARK: {
+ case PROCESSING_INSTRUCTION_QUESTION_MARK: {
if (++pos == endPos) {
NS_HTML5_BREAK(stateloop);
}
c = checkChar(buf, pos);
switch(c) {
case '>': {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_DATA, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::DATA, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
default: {
- state = P::transition(mViewSource, NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION, reconsume, pos);
+ state = P::transition(mViewSource, nsHtml5Tokenizer::PROCESSING_INSTRUCTION, reconsume, pos);
NS_HTML5_CONTINUE(stateloop);
}
}
@@ -3568,7 +3568,7 @@ nsHtml5Tokenizer::handleNcrValue(int32_t returnState)
emitOrAppendOne(bmpChar, returnState);
}
} else if (value <= 0x10FFFF) {
- astralChar[0] = (char16_t) (NS_HTML5TOKENIZER_LEAD_OFFSET + (value >> 10));
+ astralChar[0] = (char16_t) (nsHtml5Tokenizer::LEAD_OFFSET + (value >> 10));
astralChar[1] = (char16_t) (0xDC00 + (value & 0x3FF));
emitOrAppendTwo(astralChar, returnState);
} else {
@@ -3584,74 +3584,74 @@ nsHtml5Tokenizer::eof()
int32_t returnState = returnStateSave;
eofloop: for (; ; ) {
switch(state) {
- case NS_HTML5TOKENIZER_SCRIPT_DATA_LESS_THAN_SIGN:
- case NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
+ case SCRIPT_DATA_LESS_THAN_SIGN:
+ case SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_TAG_OPEN: {
+ case TAG_OPEN: {
errEofAfterLt();
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_RAWTEXT_RCDATA_LESS_THAN_SIGN: {
+ case RAWTEXT_RCDATA_LESS_THAN_SIGN: {
tokenHandler->characters(nsHtml5Tokenizer::LT_GT, 0, 1);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_NON_DATA_END_TAG_NAME: {
+ case NON_DATA_END_TAG_NAME: {
tokenHandler->characters(nsHtml5Tokenizer::LT_SOLIDUS, 0, 2);
emitStrBuf();
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_CLOSE_TAG_OPEN: {
+ case CLOSE_TAG_OPEN: {
errEofAfterLt();
tokenHandler->characters(nsHtml5Tokenizer::LT_SOLIDUS, 0, 2);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_TAG_NAME: {
+ case TAG_NAME: {
errEofInTagName();
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME:
- case NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_VALUE_QUOTED:
- case NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG: {
+ case BEFORE_ATTRIBUTE_NAME:
+ case AFTER_ATTRIBUTE_VALUE_QUOTED:
+ case SELF_CLOSING_START_TAG: {
errEofWithoutGt();
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_ATTRIBUTE_NAME: {
+ case ATTRIBUTE_NAME: {
errEofInAttributeName();
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_NAME:
- case NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_VALUE: {
+ case AFTER_ATTRIBUTE_NAME:
+ case BEFORE_ATTRIBUTE_VALUE: {
errEofWithoutGt();
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_DOUBLE_QUOTED:
- case NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_SINGLE_QUOTED:
- case NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_UNQUOTED: {
+ case ATTRIBUTE_VALUE_DOUBLE_QUOTED:
+ case ATTRIBUTE_VALUE_SINGLE_QUOTED:
+ case ATTRIBUTE_VALUE_UNQUOTED: {
errEofInAttributeValue();
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_BOGUS_COMMENT: {
+ case BOGUS_COMMENT: {
emitComment(0, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_BOGUS_COMMENT_HYPHEN: {
+ case BOGUS_COMMENT_HYPHEN: {
emitComment(0, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_MARKUP_DECLARATION_OPEN: {
+ case MARKUP_DECLARATION_OPEN: {
errBogusComment();
emitComment(0, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_MARKUP_DECLARATION_HYPHEN: {
+ case MARKUP_DECLARATION_HYPHEN: {
errBogusComment();
emitComment(0, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_MARKUP_DECLARATION_OCTYPE: {
+ case MARKUP_DECLARATION_OCTYPE: {
if (index < 6) {
errBogusComment();
emitComment(0, 0);
@@ -3672,99 +3672,99 @@ nsHtml5Tokenizer::eof()
}
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_COMMENT_START:
- case NS_HTML5TOKENIZER_COMMENT: {
+ case COMMENT_START:
+ case COMMENT: {
errEofInComment();
emitComment(0, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_COMMENT_END: {
+ case COMMENT_END: {
errEofInComment();
emitComment(2, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_COMMENT_END_DASH:
- case NS_HTML5TOKENIZER_COMMENT_START_DASH: {
+ case COMMENT_END_DASH:
+ case COMMENT_START_DASH: {
errEofInComment();
emitComment(1, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_COMMENT_END_BANG: {
+ case COMMENT_END_BANG: {
errEofInComment();
emitComment(3, 0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_DOCTYPE:
- case NS_HTML5TOKENIZER_BEFORE_DOCTYPE_NAME: {
+ case DOCTYPE:
+ case BEFORE_DOCTYPE_NAME: {
errEofInDoctype();
forceQuirks = true;
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_DOCTYPE_NAME: {
+ case DOCTYPE_NAME: {
errEofInDoctype();
strBufToDoctypeName();
forceQuirks = true;
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_DOCTYPE_UBLIC:
- case NS_HTML5TOKENIZER_DOCTYPE_YSTEM:
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_NAME:
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_KEYWORD:
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_KEYWORD:
- case NS_HTML5TOKENIZER_BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
+ case DOCTYPE_UBLIC:
+ case DOCTYPE_YSTEM:
+ case AFTER_DOCTYPE_NAME:
+ case AFTER_DOCTYPE_PUBLIC_KEYWORD:
+ case AFTER_DOCTYPE_SYSTEM_KEYWORD:
+ case BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
errEofInDoctype();
forceQuirks = true;
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:
- case NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
+ case DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:
+ case DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
errEofInPublicId();
forceQuirks = true;
publicIdentifier = strBufToString();
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_IDENTIFIER:
- case NS_HTML5TOKENIZER_BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:
- case NS_HTML5TOKENIZER_BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
+ case AFTER_DOCTYPE_PUBLIC_IDENTIFIER:
+ case BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:
+ case BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
errEofInDoctype();
forceQuirks = true;
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:
- case NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
+ case DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:
+ case DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
errEofInSystemId();
forceQuirks = true;
systemIdentifier = strBufToString();
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
+ case AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
errEofInDoctype();
forceQuirks = true;
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_BOGUS_DOCTYPE: {
+ case BOGUS_DOCTYPE: {
emitDoctypeToken(0);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE: {
+ case CONSUME_CHARACTER_REFERENCE: {
emitOrAppendCharRefBuf(returnState);
state = returnState;
continue;
}
- case NS_HTML5TOKENIZER_CHARACTER_REFERENCE_HILO_LOOKUP: {
+ case CHARACTER_REFERENCE_HILO_LOOKUP: {
errNoNamedCharacterMatch();
emitOrAppendCharRefBuf(returnState);
state = returnState;
continue;
}
- case NS_HTML5TOKENIZER_CHARACTER_REFERENCE_TAIL: {
+ case CHARACTER_REFERENCE_TAIL: {
for (; ; ) {
char16_t c = '\0';
entCol++;
@@ -3815,7 +3815,7 @@ nsHtml5Tokenizer::eof()
} else {
const nsHtml5CharacterName& candidateName = nsHtml5NamedCharacters::NAMES[candidate];
if (!candidateName.length() || candidateName.charAt(candidateName.length() - 1) != ';') {
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
char16_t ch;
if (charRefBufMark == charRefBufLen) {
ch = '\0';
@@ -3829,7 +3829,7 @@ nsHtml5Tokenizer::eof()
NS_HTML5_CONTINUE(eofloop);
}
}
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
errUnescapedAmpersandInterpretedAsCharacterReference();
} else {
errNotSemicolonTerminated();
@@ -3842,7 +3842,7 @@ nsHtml5Tokenizer::eof()
emitOrAppendTwo(val, returnState);
}
if (charRefBufMark < charRefBufLen) {
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
appendStrBuf(charRefBuf, charRefBufMark, charRefBufLen - charRefBufMark);
} else {
tokenHandler->characters(charRefBuf, charRefBufMark, charRefBufLen - charRefBufMark);
@@ -3853,9 +3853,9 @@ nsHtml5Tokenizer::eof()
NS_HTML5_CONTINUE(eofloop);
}
}
- case NS_HTML5TOKENIZER_CONSUME_NCR:
- case NS_HTML5TOKENIZER_DECIMAL_NRC_LOOP:
- case NS_HTML5TOKENIZER_HEX_NCR_LOOP: {
+ case CONSUME_NCR:
+ case DECIMAL_NRC_LOOP:
+ case HEX_NCR_LOOP: {
if (!seenDigits) {
errNoDigitsInNCR();
emitOrAppendCharRefBuf(returnState);
@@ -3868,15 +3868,15 @@ nsHtml5Tokenizer::eof()
state = returnState;
continue;
}
- case NS_HTML5TOKENIZER_CDATA_RSQB: {
+ case CDATA_RSQB: {
tokenHandler->characters(nsHtml5Tokenizer::RSQB_RSQB, 0, 1);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_CDATA_RSQB_RSQB: {
+ case CDATA_RSQB_RSQB: {
tokenHandler->characters(nsHtml5Tokenizer::RSQB_RSQB, 0, 2);
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TOKENIZER_DATA:
+ case DATA:
default: {
NS_HTML5_BREAK(eofloop);
}
@@ -3911,7 +3911,7 @@ nsHtml5Tokenizer::internalEncodingDeclaration(nsHtml5String internalCharset)
void
nsHtml5Tokenizer::emitOrAppendTwo(const char16_t* val, int32_t returnState)
{
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
appendStrBuf(val[0]);
appendStrBuf(val[1]);
} else {
@@ -3922,7 +3922,7 @@ nsHtml5Tokenizer::emitOrAppendTwo(const char16_t* val, int32_t returnState)
void
nsHtml5Tokenizer::emitOrAppendOne(const char16_t* val, int32_t returnState)
{
- if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
+ if ((returnState & DATA_AND_RCDATA_MASK)) {
appendStrBuf(val[0]);
} else {
tokenHandler->characters(val, 0, 1);
@@ -3961,7 +3961,7 @@ nsHtml5Tokenizer::requestSuspension()
bool
nsHtml5Tokenizer::isInDataState()
{
- return (stateSave == NS_HTML5TOKENIZER_DATA);
+ return (stateSave == DATA);
}
void
@@ -3969,7 +3969,7 @@ nsHtml5Tokenizer::resetToDataState()
{
clearStrBufAfterUse();
charRefBufLen = 0;
- stateSave = NS_HTML5TOKENIZER_DATA;
+ stateSave = nsHtml5Tokenizer::DATA;
lastCR = false;
index = 0;
forceQuirks = false;
@@ -4053,7 +4053,7 @@ nsHtml5Tokenizer::loadState(nsHtml5Tokenizer* other)
} else if (other->attributeName->isInterned()) {
attributeName = other->attributeName;
} else {
- nonInternedAttributeName->setNameForNonInterned(nsHtml5Portability::newLocalFromLocal(other->attributeName->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML), interner));
+ nonInternedAttributeName->setNameForNonInterned(nsHtml5Portability::newLocalFromLocal(other->attributeName->getLocal(nsHtml5AttributeName::HTML), interner));
attributeName = nonInternedAttributeName;
}
delete attributes;
diff --git a/parser/html/nsHtml5Tokenizer.h b/parser/html/nsHtml5Tokenizer.h
index fedf06e0d..c93271dcb 100644
--- a/parser/html/nsHtml5Tokenizer.h
+++ b/parser/html/nsHtml5Tokenizer.h
@@ -51,10 +51,10 @@
class nsHtml5StreamParser;
-class nsHtml5TreeBuilder;
-class nsHtml5MetaScanner;
class nsHtml5AttributeName;
class nsHtml5ElementName;
+class nsHtml5TreeBuilder;
+class nsHtml5MetaScanner;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -63,6 +63,162 @@ class nsHtml5Portability;
class nsHtml5Tokenizer
{
private:
+ static const int32_t DATA_AND_RCDATA_MASK = ~1;
+
+ public:
+ static const int32_t DATA = 0;
+
+ static const int32_t RCDATA = 1;
+
+ static const int32_t SCRIPT_DATA = 2;
+
+ static const int32_t RAWTEXT = 3;
+
+ static const int32_t SCRIPT_DATA_ESCAPED = 4;
+
+ static const int32_t ATTRIBUTE_VALUE_DOUBLE_QUOTED = 5;
+
+ static const int32_t ATTRIBUTE_VALUE_SINGLE_QUOTED = 6;
+
+ static const int32_t ATTRIBUTE_VALUE_UNQUOTED = 7;
+
+ static const int32_t PLAINTEXT = 8;
+
+ static const int32_t TAG_OPEN = 9;
+
+ static const int32_t CLOSE_TAG_OPEN = 10;
+
+ static const int32_t TAG_NAME = 11;
+
+ static const int32_t BEFORE_ATTRIBUTE_NAME = 12;
+
+ static const int32_t ATTRIBUTE_NAME = 13;
+
+ static const int32_t AFTER_ATTRIBUTE_NAME = 14;
+
+ static const int32_t BEFORE_ATTRIBUTE_VALUE = 15;
+
+ static const int32_t AFTER_ATTRIBUTE_VALUE_QUOTED = 16;
+
+ static const int32_t BOGUS_COMMENT = 17;
+
+ static const int32_t MARKUP_DECLARATION_OPEN = 18;
+
+ static const int32_t DOCTYPE = 19;
+
+ static const int32_t BEFORE_DOCTYPE_NAME = 20;
+
+ static const int32_t DOCTYPE_NAME = 21;
+
+ static const int32_t AFTER_DOCTYPE_NAME = 22;
+
+ static const int32_t BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 23;
+
+ static const int32_t DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 24;
+
+ static const int32_t DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 25;
+
+ static const int32_t AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 26;
+
+ static const int32_t BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 27;
+
+ static const int32_t DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 28;
+
+ static const int32_t DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 29;
+
+ static const int32_t AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 30;
+
+ static const int32_t BOGUS_DOCTYPE = 31;
+
+ static const int32_t COMMENT_START = 32;
+
+ static const int32_t COMMENT_START_DASH = 33;
+
+ static const int32_t COMMENT = 34;
+
+ static const int32_t COMMENT_END_DASH = 35;
+
+ static const int32_t COMMENT_END = 36;
+
+ static const int32_t COMMENT_END_BANG = 37;
+
+ static const int32_t NON_DATA_END_TAG_NAME = 38;
+
+ static const int32_t MARKUP_DECLARATION_HYPHEN = 39;
+
+ static const int32_t MARKUP_DECLARATION_OCTYPE = 40;
+
+ static const int32_t DOCTYPE_UBLIC = 41;
+
+ static const int32_t DOCTYPE_YSTEM = 42;
+
+ static const int32_t AFTER_DOCTYPE_PUBLIC_KEYWORD = 43;
+
+ static const int32_t BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 44;
+
+ static const int32_t AFTER_DOCTYPE_SYSTEM_KEYWORD = 45;
+
+ static const int32_t CONSUME_CHARACTER_REFERENCE = 46;
+
+ static const int32_t CONSUME_NCR = 47;
+
+ static const int32_t CHARACTER_REFERENCE_TAIL = 48;
+
+ static const int32_t HEX_NCR_LOOP = 49;
+
+ static const int32_t DECIMAL_NRC_LOOP = 50;
+
+ static const int32_t HANDLE_NCR_VALUE = 51;
+
+ static const int32_t HANDLE_NCR_VALUE_RECONSUME = 52;
+
+ static const int32_t CHARACTER_REFERENCE_HILO_LOOKUP = 53;
+
+ static const int32_t SELF_CLOSING_START_TAG = 54;
+
+ static const int32_t CDATA_START = 55;
+
+ static const int32_t CDATA_SECTION = 56;
+
+ static const int32_t CDATA_RSQB = 57;
+
+ static const int32_t CDATA_RSQB_RSQB = 58;
+
+ static const int32_t SCRIPT_DATA_LESS_THAN_SIGN = 59;
+
+ static const int32_t SCRIPT_DATA_ESCAPE_START = 60;
+
+ static const int32_t SCRIPT_DATA_ESCAPE_START_DASH = 61;
+
+ static const int32_t SCRIPT_DATA_ESCAPED_DASH = 62;
+
+ static const int32_t SCRIPT_DATA_ESCAPED_DASH_DASH = 63;
+
+ static const int32_t BOGUS_COMMENT_HYPHEN = 64;
+
+ static const int32_t RAWTEXT_RCDATA_LESS_THAN_SIGN = 65;
+
+ static const int32_t SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 66;
+
+ static const int32_t SCRIPT_DATA_DOUBLE_ESCAPE_START = 67;
+
+ static const int32_t SCRIPT_DATA_DOUBLE_ESCAPED = 68;
+
+ static const int32_t SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 69;
+
+ static const int32_t SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 70;
+
+ static const int32_t SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 71;
+
+ static const int32_t SCRIPT_DATA_DOUBLE_ESCAPE_END = 72;
+
+ static const int32_t PROCESSING_INSTRUCTION = 73;
+
+ static const int32_t PROCESSING_INSTRUCTION_QUESTION_MARK = 74;
+
+ private:
+ static const int32_t LEAD_OFFSET = (0xD800 - (0x10000 >> 10));
+
static char16_t LT_GT[];
static char16_t LT_SOLIDUS[];
static char16_t RSQB_RSQB[];
@@ -307,84 +463,5 @@ class nsHtml5Tokenizer
#include "nsHtml5TokenizerHSupplement.h"
};
-#define NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK ~1
-#define NS_HTML5TOKENIZER_DATA 0
-#define NS_HTML5TOKENIZER_RCDATA 1
-#define NS_HTML5TOKENIZER_SCRIPT_DATA 2
-#define NS_HTML5TOKENIZER_RAWTEXT 3
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED 4
-#define NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_DOUBLE_QUOTED 5
-#define NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_SINGLE_QUOTED 6
-#define NS_HTML5TOKENIZER_ATTRIBUTE_VALUE_UNQUOTED 7
-#define NS_HTML5TOKENIZER_PLAINTEXT 8
-#define NS_HTML5TOKENIZER_TAG_OPEN 9
-#define NS_HTML5TOKENIZER_CLOSE_TAG_OPEN 10
-#define NS_HTML5TOKENIZER_TAG_NAME 11
-#define NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_NAME 12
-#define NS_HTML5TOKENIZER_ATTRIBUTE_NAME 13
-#define NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_NAME 14
-#define NS_HTML5TOKENIZER_BEFORE_ATTRIBUTE_VALUE 15
-#define NS_HTML5TOKENIZER_AFTER_ATTRIBUTE_VALUE_QUOTED 16
-#define NS_HTML5TOKENIZER_BOGUS_COMMENT 17
-#define NS_HTML5TOKENIZER_MARKUP_DECLARATION_OPEN 18
-#define NS_HTML5TOKENIZER_DOCTYPE 19
-#define NS_HTML5TOKENIZER_BEFORE_DOCTYPE_NAME 20
-#define NS_HTML5TOKENIZER_DOCTYPE_NAME 21
-#define NS_HTML5TOKENIZER_AFTER_DOCTYPE_NAME 22
-#define NS_HTML5TOKENIZER_BEFORE_DOCTYPE_PUBLIC_IDENTIFIER 23
-#define NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED 24
-#define NS_HTML5TOKENIZER_DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED 25
-#define NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_IDENTIFIER 26
-#define NS_HTML5TOKENIZER_BEFORE_DOCTYPE_SYSTEM_IDENTIFIER 27
-#define NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED 28
-#define NS_HTML5TOKENIZER_DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED 29
-#define NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_IDENTIFIER 30
-#define NS_HTML5TOKENIZER_BOGUS_DOCTYPE 31
-#define NS_HTML5TOKENIZER_COMMENT_START 32
-#define NS_HTML5TOKENIZER_COMMENT_START_DASH 33
-#define NS_HTML5TOKENIZER_COMMENT 34
-#define NS_HTML5TOKENIZER_COMMENT_END_DASH 35
-#define NS_HTML5TOKENIZER_COMMENT_END 36
-#define NS_HTML5TOKENIZER_COMMENT_END_BANG 37
-#define NS_HTML5TOKENIZER_NON_DATA_END_TAG_NAME 38
-#define NS_HTML5TOKENIZER_MARKUP_DECLARATION_HYPHEN 39
-#define NS_HTML5TOKENIZER_MARKUP_DECLARATION_OCTYPE 40
-#define NS_HTML5TOKENIZER_DOCTYPE_UBLIC 41
-#define NS_HTML5TOKENIZER_DOCTYPE_YSTEM 42
-#define NS_HTML5TOKENIZER_AFTER_DOCTYPE_PUBLIC_KEYWORD 43
-#define NS_HTML5TOKENIZER_BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS 44
-#define NS_HTML5TOKENIZER_AFTER_DOCTYPE_SYSTEM_KEYWORD 45
-#define NS_HTML5TOKENIZER_CONSUME_CHARACTER_REFERENCE 46
-#define NS_HTML5TOKENIZER_CONSUME_NCR 47
-#define NS_HTML5TOKENIZER_CHARACTER_REFERENCE_TAIL 48
-#define NS_HTML5TOKENIZER_HEX_NCR_LOOP 49
-#define NS_HTML5TOKENIZER_DECIMAL_NRC_LOOP 50
-#define NS_HTML5TOKENIZER_HANDLE_NCR_VALUE 51
-#define NS_HTML5TOKENIZER_HANDLE_NCR_VALUE_RECONSUME 52
-#define NS_HTML5TOKENIZER_CHARACTER_REFERENCE_HILO_LOOKUP 53
-#define NS_HTML5TOKENIZER_SELF_CLOSING_START_TAG 54
-#define NS_HTML5TOKENIZER_CDATA_START 55
-#define NS_HTML5TOKENIZER_CDATA_SECTION 56
-#define NS_HTML5TOKENIZER_CDATA_RSQB 57
-#define NS_HTML5TOKENIZER_CDATA_RSQB_RSQB 58
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_LESS_THAN_SIGN 59
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START 60
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPE_START_DASH 61
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH 62
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_DASH_DASH 63
-#define NS_HTML5TOKENIZER_BOGUS_COMMENT_HYPHEN 64
-#define NS_HTML5TOKENIZER_RAWTEXT_RCDATA_LESS_THAN_SIGN 65
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN 66
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_START 67
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED 68
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN 69
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH 70
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH 71
-#define NS_HTML5TOKENIZER_SCRIPT_DATA_DOUBLE_ESCAPE_END 72
-#define NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION 73
-#define NS_HTML5TOKENIZER_PROCESSING_INSTRUCTION_QUESTION_MARK 74
-#define NS_HTML5TOKENIZER_LEAD_OFFSET (0xD800 - (0x10000 >> 10))
-
-
#endif
diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp
index d909c223c..03bff8a58 100644
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -58,10 +58,10 @@
#include "nsIContentHandle.h"
#include "nsHtml5OplessBuilder.h"
-#include "nsHtml5Tokenizer.h"
-#include "nsHtml5MetaScanner.h"
#include "nsHtml5AttributeName.h"
#include "nsHtml5ElementName.h"
+#include "nsHtml5Tokenizer.h"
+#include "nsHtml5MetaScanner.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5UTF16Buffer.h"
#include "nsHtml5StateSnapshot.h"
@@ -80,7 +80,7 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
templateModeStack = jArray<int32_t,int32_t>::newJArray(64);
listOfActiveFormattingElements = jArray<nsHtml5StackNode*,int32_t>::newJArray(64);
needToDropLF = false;
- originalMode = NS_HTML5TREE_BUILDER_INITIAL;
+ originalMode = INITIAL;
templateModePtr = -1;
currentPtr = -1;
listPtr = -1;
@@ -106,8 +106,8 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elementName->getCamelCaseName(), elt);
currentPtr++;
stack[currentPtr] = node;
- tokenizer->setState(NS_HTML5TOKENIZER_DATA);
- mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
+ tokenizer->setState(nsHtml5Tokenizer::DATA);
+ mode = FRAMESET_OK;
} else if (contextNamespace == kNameSpaceID_MathML) {
nsHtml5ElementName* elementName = nsHtml5ElementName::ELT_MATH;
if (nsHtml5Atoms::mi == contextName || nsHtml5Atoms::mo == contextName || nsHtml5Atoms::mn == contextName || nsHtml5Atoms::ms == contextName || nsHtml5Atoms::mtext == contextName) {
@@ -118,33 +118,33 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, elementName->getName(), false);
currentPtr++;
stack[currentPtr] = node;
- tokenizer->setState(NS_HTML5TOKENIZER_DATA);
- mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
+ tokenizer->setState(nsHtml5Tokenizer::DATA);
+ mode = FRAMESET_OK;
} else {
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HTML, elt);
currentPtr++;
stack[currentPtr] = node;
if (nsHtml5Atoms::template_ == contextName) {
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_TEMPLATE);
+ pushTemplateMode(IN_TEMPLATE);
}
resetTheInsertionMode();
formPointer = getFormPointerForContext(contextNode);
if (nsHtml5Atoms::title == contextName || nsHtml5Atoms::textarea == contextName) {
- tokenizer->setState(NS_HTML5TOKENIZER_RCDATA);
+ tokenizer->setState(nsHtml5Tokenizer::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);
+ tokenizer->setState(nsHtml5Tokenizer::RAWTEXT);
} else if (nsHtml5Atoms::plaintext == contextName) {
- tokenizer->setState(NS_HTML5TOKENIZER_PLAINTEXT);
+ tokenizer->setState(nsHtml5Tokenizer::PLAINTEXT);
} else if (nsHtml5Atoms::script == contextName) {
- tokenizer->setState(NS_HTML5TOKENIZER_SCRIPT_DATA);
+ tokenizer->setState(nsHtml5Tokenizer::SCRIPT_DATA);
} else {
- tokenizer->setState(NS_HTML5TOKENIZER_DATA);
+ tokenizer->setState(nsHtml5Tokenizer::DATA);
}
}
contextName = nullptr;
contextNode = nullptr;
} else {
- mode = NS_HTML5TREE_BUILDER_INITIAL;
+ mode = INITIAL;
if (tokenizer->isViewingXmlSource()) {
nsIContentHandle* elt = createElement(kNameSpaceID_SVG, nsHtml5Atoms::svg, tokenizer->emptyAttributes(), nullptr);
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_SVG, nsHtml5Atoms::svg, elt);
@@ -158,7 +158,7 @@ void
nsHtml5TreeBuilder::doctype(nsIAtom* name, nsHtml5String publicIdentifier, nsHtml5String systemIdentifier, bool forceQuirks)
{
needToDropLF = false;
- if (!isInForeign() && mode == NS_HTML5TREE_BUILDER_INITIAL) {
+ if (!isInForeign() && mode == INITIAL) {
nsHtml5String emptyString = nsHtml5Portability::newEmptyString();
appendDoctypeToDocument(!name ? nsHtml5Atoms::emptystring : name, !publicIdentifier ? emptyString : publicIdentifier, !systemIdentifier ? emptyString : systemIdentifier);
emptyString.Release();
@@ -171,7 +171,7 @@ nsHtml5TreeBuilder::doctype(nsIAtom* name, nsHtml5String publicIdentifier, nsHtm
} else {
documentModeInternal(STANDARDS_MODE, publicIdentifier, systemIdentifier, false);
}
- mode = NS_HTML5TREE_BUILDER_BEFORE_HTML;
+ mode = BEFORE_HTML;
return;
}
errStrayDoctype();
@@ -184,14 +184,14 @@ nsHtml5TreeBuilder::comment(char16_t* buf, int32_t start, int32_t length)
needToDropLF = false;
if (!isInForeign()) {
switch(mode) {
- case NS_HTML5TREE_BUILDER_INITIAL:
- case NS_HTML5TREE_BUILDER_BEFORE_HTML:
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY:
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET: {
+ case INITIAL:
+ case BEFORE_HTML:
+ case AFTER_AFTER_BODY:
+ case AFTER_AFTER_FRAMESET: {
appendCommentToDocument(buf, start, length);
return;
}
- case NS_HTML5TREE_BUILDER_AFTER_BODY: {
+ case AFTER_BODY: {
flushCharacters();
appendComment(stack[0]->node, buf, start, length);
return;
@@ -223,20 +223,20 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
}
}
switch(mode) {
- case NS_HTML5TREE_BUILDER_IN_BODY:
- case NS_HTML5TREE_BUILDER_IN_CELL:
- case NS_HTML5TREE_BUILDER_IN_CAPTION: {
+ case IN_BODY:
+ case IN_CELL:
+ case IN_CAPTION: {
if (!isInForeignButNotHtmlOrMathTextIntegrationPoint()) {
reconstructTheActiveFormattingElements();
}
}
- case NS_HTML5TREE_BUILDER_TEXT: {
+ case TEXT: {
accumulateCharacters(buf, start, length);
return;
}
- case NS_HTML5TREE_BUILDER_IN_TABLE:
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY:
- case NS_HTML5TREE_BUILDER_IN_ROW: {
+ case IN_TABLE:
+ case IN_TABLE_BODY:
+ case IN_ROW: {
accumulateCharactersForced(buf, start, length);
return;
}
@@ -250,25 +250,25 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
case '\r':
case '\f': {
switch(mode) {
- case NS_HTML5TREE_BUILDER_INITIAL:
- case NS_HTML5TREE_BUILDER_BEFORE_HTML:
- case NS_HTML5TREE_BUILDER_BEFORE_HEAD: {
+ case INITIAL:
+ case BEFORE_HTML:
+ case BEFORE_HEAD: {
start = i + 1;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD:
- case NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT:
- case NS_HTML5TREE_BUILDER_AFTER_HEAD:
- case NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP:
- case NS_HTML5TREE_BUILDER_IN_FRAMESET:
- case NS_HTML5TREE_BUILDER_AFTER_FRAMESET: {
+ case IN_HEAD:
+ case IN_HEAD_NOSCRIPT:
+ case AFTER_HEAD:
+ case IN_COLUMN_GROUP:
+ case IN_FRAMESET:
+ case AFTER_FRAMESET: {
continue;
}
- case NS_HTML5TREE_BUILDER_FRAMESET_OK:
- case NS_HTML5TREE_BUILDER_IN_TEMPLATE:
- case NS_HTML5TREE_BUILDER_IN_BODY:
- case NS_HTML5TREE_BUILDER_IN_CELL:
- case NS_HTML5TREE_BUILDER_IN_CAPTION: {
+ case FRAMESET_OK:
+ case IN_TEMPLATE:
+ case IN_BODY:
+ case IN_CELL:
+ case IN_CAPTION: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
@@ -279,20 +279,20 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
}
NS_HTML5_BREAK(charactersloop);
}
- case NS_HTML5TREE_BUILDER_IN_SELECT:
- case NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE: {
+ case IN_SELECT:
+ case IN_SELECT_IN_TABLE: {
NS_HTML5_BREAK(charactersloop);
}
- case NS_HTML5TREE_BUILDER_IN_TABLE:
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY:
- case NS_HTML5TREE_BUILDER_IN_ROW: {
+ case IN_TABLE:
+ case IN_TABLE_BODY:
+ case IN_ROW: {
accumulateCharactersForced(buf, i, 1);
start = i + 1;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_BODY:
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY:
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET: {
+ case AFTER_BODY:
+ case AFTER_AFTER_BODY:
+ case AFTER_AFTER_FRAMESET: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
@@ -305,41 +305,41 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
}
default: {
switch(mode) {
- case NS_HTML5TREE_BUILDER_INITIAL: {
+ case INITIAL: {
documentModeInternal(QUIRKS_MODE, nullptr, nullptr, false);
- mode = NS_HTML5TREE_BUILDER_BEFORE_HTML;
+ mode = BEFORE_HTML;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_BEFORE_HTML: {
+ case BEFORE_HTML: {
appendHtmlElementToDocumentAndPush();
- mode = NS_HTML5TREE_BUILDER_BEFORE_HEAD;
+ mode = BEFORE_HEAD;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_BEFORE_HEAD: {
+ case BEFORE_HEAD: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
}
flushCharacters();
appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD: {
+ case IN_HEAD: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
}
flushCharacters();
pop();
- mode = NS_HTML5TREE_BUILDER_AFTER_HEAD;
+ mode = AFTER_HEAD;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT: {
+ case IN_HEAD_NOSCRIPT: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
@@ -347,31 +347,31 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
errNonSpaceInNoscriptInHead();
flushCharacters();
pop();
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_HEAD: {
+ case AFTER_HEAD: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
}
flushCharacters();
appendToCurrentNodeAndPushBodyElement();
- mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
+ mode = FRAMESET_OK;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_FRAMESET_OK: {
+ case FRAMESET_OK: {
framesetOk = false;
- mode = NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = IN_BODY;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_TEMPLATE:
- case NS_HTML5TREE_BUILDER_IN_BODY:
- case NS_HTML5TREE_BUILDER_IN_CELL:
- case NS_HTML5TREE_BUILDER_IN_CAPTION: {
+ case IN_TEMPLATE:
+ case IN_BODY:
+ case IN_CELL:
+ case IN_CAPTION: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
@@ -382,41 +382,41 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
}
NS_HTML5_BREAK(charactersloop);
}
- case NS_HTML5TREE_BUILDER_IN_TABLE:
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY:
- case NS_HTML5TREE_BUILDER_IN_ROW: {
+ case IN_TABLE:
+ case IN_TABLE_BODY:
+ case IN_ROW: {
accumulateCharactersForced(buf, i, 1);
start = i + 1;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP: {
+ case IN_COLUMN_GROUP: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
start = i;
}
- if (!currentPtr || stack[currentPtr]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ if (!currentPtr || stack[currentPtr]->getGroup() == nsHtml5TreeBuilder::TEMPLATE) {
errNonSpaceInColgroupInFragment();
start = i + 1;
continue;
}
flushCharacters();
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_SELECT:
- case NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE: {
+ case IN_SELECT:
+ case IN_SELECT_IN_TABLE: {
NS_HTML5_BREAK(charactersloop);
}
- case NS_HTML5TREE_BUILDER_AFTER_BODY: {
+ case AFTER_BODY: {
errNonSpaceAfterBody();
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_FRAMESET: {
+ case IN_FRAMESET: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
}
@@ -424,7 +424,7 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
start = i + 1;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_FRAMESET: {
+ case AFTER_FRAMESET: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
}
@@ -432,13 +432,13 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
start = i + 1;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY: {
+ case AFTER_AFTER_BODY: {
errNonSpaceInTrailer();
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
i--;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET: {
+ case AFTER_AFTER_FRAMESET: {
if (start < i) {
accumulateCharacters(buf, start, i - start);
}
@@ -461,7 +461,7 @@ nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t lengt
void
nsHtml5TreeBuilder::zeroOriginatingReplacementCharacter()
{
- if (mode == NS_HTML5TREE_BUILDER_TEXT) {
+ if (mode == TEXT) {
accumulateCharacters(REPLACEMENT_CHARACTER, 0, 1);
return;
}
@@ -479,57 +479,57 @@ nsHtml5TreeBuilder::eof()
flushCharacters();
for (; ; ) {
switch(mode) {
- case NS_HTML5TREE_BUILDER_INITIAL: {
+ case INITIAL: {
documentModeInternal(QUIRKS_MODE, nullptr, nullptr, false);
- mode = NS_HTML5TREE_BUILDER_BEFORE_HTML;
+ mode = BEFORE_HTML;
continue;
}
- case NS_HTML5TREE_BUILDER_BEFORE_HTML: {
+ case BEFORE_HTML: {
appendHtmlElementToDocumentAndPush();
- mode = NS_HTML5TREE_BUILDER_BEFORE_HEAD;
+ mode = BEFORE_HEAD;
continue;
}
- case NS_HTML5TREE_BUILDER_BEFORE_HEAD: {
+ case BEFORE_HEAD: {
appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD: {
+ case IN_HEAD: {
while (currentPtr > 0) {
popOnEof();
}
- mode = NS_HTML5TREE_BUILDER_AFTER_HEAD;
+ mode = AFTER_HEAD;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT: {
+ case IN_HEAD_NOSCRIPT: {
while (currentPtr > 1) {
popOnEof();
}
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_HEAD: {
+ case AFTER_HEAD: {
appendToCurrentNodeAndPushBodyElement();
- mode = NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = IN_BODY;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY:
- case NS_HTML5TREE_BUILDER_IN_ROW:
- case NS_HTML5TREE_BUILDER_IN_TABLE:
- case NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE:
- case NS_HTML5TREE_BUILDER_IN_SELECT:
- case NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP:
- case NS_HTML5TREE_BUILDER_FRAMESET_OK:
- case NS_HTML5TREE_BUILDER_IN_CAPTION:
- case NS_HTML5TREE_BUILDER_IN_CELL:
- case NS_HTML5TREE_BUILDER_IN_BODY: {
+ case IN_TABLE_BODY:
+ case IN_ROW:
+ case IN_TABLE:
+ case IN_SELECT_IN_TABLE:
+ case IN_SELECT:
+ case IN_COLUMN_GROUP:
+ case FRAMESET_OK:
+ case IN_CAPTION:
+ case IN_CELL:
+ case IN_BODY: {
if (isTemplateModeStackEmpty()) {
NS_HTML5_BREAK(eofloop);
}
}
- case NS_HTML5TREE_BUILDER_IN_TEMPLATE: {
+ case IN_TEMPLATE: {
int32_t eltPos = findLast(nsHtml5Atoms::template_);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment);
NS_HTML5_BREAK(eofloop);
}
@@ -544,21 +544,21 @@ nsHtml5TreeBuilder::eof()
resetTheInsertionMode();
continue;
}
- case NS_HTML5TREE_BUILDER_TEXT: {
- if (originalMode == NS_HTML5TREE_BUILDER_AFTER_HEAD) {
+ case TEXT: {
+ if (originalMode == AFTER_HEAD) {
popOnEof();
}
popOnEof();
mode = originalMode;
continue;
}
- case NS_HTML5TREE_BUILDER_IN_FRAMESET: {
+ case IN_FRAMESET: {
NS_HTML5_BREAK(eofloop);
}
- case NS_HTML5TREE_BUILDER_AFTER_BODY:
- case NS_HTML5TREE_BUILDER_AFTER_FRAMESET:
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY:
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET:
+ case AFTER_BODY:
+ case AFTER_FRAMESET:
+ case AFTER_AFTER_BODY:
+ case AFTER_AFTER_FRAMESET:
default: {
NS_HTML5_BREAK(eofloop);
}
@@ -612,28 +612,28 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
if (isInForeign()) {
nsHtml5StackNode* currentNode = stack[currentPtr];
int32_t currNs = currentNode->ns;
- if (!(currentNode->isHtmlIntegrationPoint() || (currNs == kNameSpaceID_MathML && ((currentNode->getGroup() == NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT && group != NS_HTML5TREE_BUILDER_MGLYPH_OR_MALIGNMARK) || (currentNode->getGroup() == NS_HTML5TREE_BUILDER_ANNOTATION_XML && group == NS_HTML5TREE_BUILDER_SVG))))) {
+ if (!(currentNode->isHtmlIntegrationPoint() || (currNs == kNameSpaceID_MathML && ((currentNode->getGroup() == MI_MO_MN_MS_MTEXT && group != MGLYPH_OR_MALIGNMARK) || (currentNode->getGroup() == ANNOTATION_XML && group == SVG))))) {
switch(group) {
- case NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U:
- case NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU:
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_BR:
- case NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR:
- case NS_HTML5TREE_BUILDER_DD_OR_DT:
- case NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL:
- case NS_HTML5TREE_BUILDER_EMBED:
- case NS_HTML5TREE_BUILDER_IMG:
- case NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6:
- case NS_HTML5TREE_BUILDER_HEAD:
- case NS_HTML5TREE_BUILDER_HR:
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_META:
- case NS_HTML5TREE_BUILDER_NOBR:
- case NS_HTML5TREE_BUILDER_P:
- case NS_HTML5TREE_BUILDER_PRE_OR_LISTING:
- case NS_HTML5TREE_BUILDER_TABLE:
- case NS_HTML5TREE_BUILDER_FONT: {
- if (!(group == NS_HTML5TREE_BUILDER_FONT && !(attributes->contains(nsHtml5AttributeName::ATTR_COLOR) || attributes->contains(nsHtml5AttributeName::ATTR_FACE) || attributes->contains(nsHtml5AttributeName::ATTR_SIZE)))) {
+ case B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U:
+ case DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU:
+ case BODY:
+ case BR:
+ case RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR:
+ case DD_OR_DT:
+ case UL_OR_OL_OR_DL:
+ case EMBED:
+ case IMG:
+ case H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6:
+ case HEAD:
+ case HR:
+ case LI:
+ case META:
+ case NOBR:
+ case P:
+ case PRE_OR_LISTING:
+ case TABLE:
+ case FONT: {
+ if (!(group == FONT && !(attributes->contains(nsHtml5AttributeName::ATTR_COLOR) || attributes->contains(nsHtml5AttributeName::ATTR_FACE) || attributes->contains(nsHtml5AttributeName::ATTR_SIZE)))) {
errHtmlStartTagInForeignContext(name);
if (!fragment) {
while (!isSpecialParentInForeign(stack[currentPtr])) {
@@ -670,93 +670,93 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
}
switch(mode) {
- case NS_HTML5TREE_BUILDER_IN_TEMPLATE: {
+ case IN_TEMPLATE: {
switch(group) {
- case NS_HTML5TREE_BUILDER_COL: {
+ case COL: {
popTemplateMode();
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP);
- mode = NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP;
+ pushTemplateMode(IN_COLUMN_GROUP);
+ mode = IN_COLUMN_GROUP;
continue;
}
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
+ case CAPTION:
+ case COLGROUP:
+ case TBODY_OR_THEAD_OR_TFOOT: {
popTemplateMode();
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_TABLE);
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ pushTemplateMode(IN_TABLE);
+ mode = IN_TABLE;
continue;
}
- case NS_HTML5TREE_BUILDER_TR: {
+ case TR: {
popTemplateMode();
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_TABLE_BODY);
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ pushTemplateMode(IN_TABLE_BODY);
+ mode = IN_TABLE_BODY;
continue;
}
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case TD_OR_TH: {
popTemplateMode();
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_ROW);
- mode = NS_HTML5TREE_BUILDER_IN_ROW;
+ pushTemplateMode(IN_ROW);
+ mode = IN_ROW;
continue;
}
- case NS_HTML5TREE_BUILDER_META: {
+ case META: {
checkMetaCharset(attributes);
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TITLE: {
+ case TITLE: {
startTagTitleInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BASE:
- case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND: {
+ case BASE:
+ case LINK_OR_BASEFONT_OR_BGSOUND: {
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SCRIPT: {
+ case SCRIPT: {
startTagScriptInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOFRAMES:
- case NS_HTML5TREE_BUILDER_STYLE: {
+ case NOFRAMES:
+ case STYLE: {
startTagGenericRawText(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
startTagTemplateInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
default: {
popTemplateMode();
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_BODY);
- mode = NS_HTML5TREE_BUILDER_IN_BODY;
+ pushTemplateMode(IN_BODY);
+ mode = IN_BODY;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_IN_ROW: {
+ case IN_ROW: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
- clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TR));
+ case TD_OR_TH: {
+ clearStackBackTo(findLastOrRoot(nsHtml5TreeBuilder::TR));
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_CELL;
+ mode = IN_CELL;
insertMarker();
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR: {
- eltPos = findLastOrRoot(NS_HTML5TREE_BUILDER_TR);
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR: {
+ eltPos = findLastOrRoot(nsHtml5TreeBuilder::TR);
if (!eltPos) {
MOZ_ASSERT(fragment || isTemplateContents());
errNoTableRowToClose();
@@ -764,42 +764,42 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
continue;
}
default:
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY: {
+ case IN_TABLE_BODY: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TR: {
+ case TR: {
clearStackBackTo(findLastInTableScopeOrRootTemplateTbodyTheadTfoot());
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_ROW;
+ mode = IN_ROW;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case TD_OR_TH: {
errStartTagInTableBody(name);
clearStackBackTo(findLastInTableScopeOrRootTemplateTbodyTheadTfoot());
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_TR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_ROW;
+ mode = IN_ROW;
continue;
}
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case TBODY_OR_THEAD_OR_TFOOT: {
eltPos = findLastInTableScopeOrRootTemplateTbodyTheadTfoot();
- if (!eltPos || stack[eltPos]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ if (!eltPos || stack[eltPos]->getGroup() == TEMPLATE) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayStartTag(name);
NS_HTML5_BREAK(starttagloop);
} else {
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
continue;
}
}
@@ -807,51 +807,51 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_TABLE: {
+ case IN_TABLE: {
for (; ; ) {
switch(group) {
- case NS_HTML5TREE_BUILDER_CAPTION: {
- clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
+ case CAPTION: {
+ clearStackBackTo(findLastOrRoot(nsHtml5TreeBuilder::TABLE));
insertMarker();
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_CAPTION;
+ mode = IN_CAPTION;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_COLGROUP: {
- clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
+ case COLGROUP: {
+ clearStackBackTo(findLastOrRoot(nsHtml5TreeBuilder::TABLE));
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP;
+ mode = IN_COLUMN_GROUP;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_COL: {
- clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
+ case COL: {
+ clearStackBackTo(findLastOrRoot(nsHtml5TreeBuilder::TABLE));
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_COLGROUP, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP;
+ mode = IN_COLUMN_GROUP;
NS_HTML5_CONTINUE(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
- clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
+ case TBODY_OR_THEAD_OR_TFOOT: {
+ clearStackBackTo(findLastOrRoot(nsHtml5TreeBuilder::TABLE));
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TR:
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
- clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
+ case TR:
+ case TD_OR_TH: {
+ clearStackBackTo(findLastOrRoot(nsHtml5TreeBuilder::TABLE));
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_TBODY, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
NS_HTML5_CONTINUE(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
NS_HTML5_BREAK(intableloop);
}
- case NS_HTML5TREE_BUILDER_TABLE: {
+ case TABLE: {
errTableSeenWhileTableOpen();
eltPos = findLastInTableScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment || isTemplateContents());
NS_HTML5_BREAK(starttagloop);
}
@@ -865,23 +865,23 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
resetTheInsertionMode();
NS_HTML5_CONTINUE(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SCRIPT: {
+ case SCRIPT: {
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::SCRIPT_DATA, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_STYLE: {
+ case STYLE: {
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_INPUT: {
+ case INPUT: {
errStartTagInTable(name);
if (!nsHtml5Portability::lowerCaseLiteralEqualsIgnoreAsciiCaseString("hidden", attributes->getValue(nsHtml5AttributeName::ATTR_TYPE))) {
NS_HTML5_BREAK(intableloop);
@@ -891,7 +891,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_FORM: {
+ case FORM: {
if (!!formPointer || isTemplateContents()) {
errFormWhenFormOpen();
NS_HTML5_BREAK(starttagloop);
@@ -910,17 +910,17 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
intableloop_end: ;
}
- case NS_HTML5TREE_BUILDER_IN_CAPTION: {
+ case IN_CAPTION: {
switch(group) {
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR:
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR:
+ case TD_OR_TH: {
errStrayStartTag(name);
eltPos = findLastInTableScope(nsHtml5Atoms::caption);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
NS_HTML5_BREAK(starttagloop);
}
generateImpliedEndTags();
@@ -931,23 +931,23 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
pop();
}
clearTheListOfActiveFormattingElementsUpToTheLastMarker();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
continue;
}
default:
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_CELL: {
+ case IN_CELL: {
switch(group) {
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR:
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR:
+ case TD_OR_TH: {
eltPos = findLastInTableScopeTdTh();
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errNoCellToClose();
NS_HTML5_BREAK(starttagloop);
} else {
@@ -959,11 +959,11 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_FRAMESET_OK: {
+ case FRAMESET_OK: {
switch(group) {
- case NS_HTML5TREE_BUILDER_FRAMESET: {
- if (mode == NS_HTML5TREE_BUILDER_FRAMESET_OK) {
- if (!currentPtr || stack[1]->getGroup() != NS_HTML5TREE_BUILDER_BODY) {
+ case FRAMESET: {
+ if (mode == FRAMESET_OK) {
+ if (!currentPtr || stack[1]->getGroup() != BODY) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayStartTag(name);
NS_HTML5_BREAK(starttagloop);
@@ -974,7 +974,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
pop();
}
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_FRAMESET;
+ mode = IN_FRAMESET;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
@@ -983,37 +983,37 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
NS_HTML5_BREAK(starttagloop);
}
}
- case NS_HTML5TREE_BUILDER_PRE_OR_LISTING:
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_DD_OR_DT:
- case NS_HTML5TREE_BUILDER_BUTTON:
- case NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET:
- case NS_HTML5TREE_BUILDER_OBJECT:
- case NS_HTML5TREE_BUILDER_TABLE:
- case NS_HTML5TREE_BUILDER_AREA_OR_WBR:
- case NS_HTML5TREE_BUILDER_BR:
- case NS_HTML5TREE_BUILDER_EMBED:
- case NS_HTML5TREE_BUILDER_IMG:
- case NS_HTML5TREE_BUILDER_INPUT:
- case NS_HTML5TREE_BUILDER_KEYGEN:
- case NS_HTML5TREE_BUILDER_HR:
- case NS_HTML5TREE_BUILDER_TEXTAREA:
- case NS_HTML5TREE_BUILDER_XMP:
- case NS_HTML5TREE_BUILDER_IFRAME:
- case NS_HTML5TREE_BUILDER_SELECT: {
- if (mode == NS_HTML5TREE_BUILDER_FRAMESET_OK && !(group == NS_HTML5TREE_BUILDER_INPUT && nsHtml5Portability::lowerCaseLiteralEqualsIgnoreAsciiCaseString("hidden", attributes->getValue(nsHtml5AttributeName::ATTR_TYPE)))) {
+ case PRE_OR_LISTING:
+ case LI:
+ case DD_OR_DT:
+ case BUTTON:
+ case MARQUEE_OR_APPLET:
+ case OBJECT:
+ case TABLE:
+ case AREA_OR_WBR:
+ case BR:
+ case EMBED:
+ case IMG:
+ case INPUT:
+ case KEYGEN:
+ case HR:
+ case TEXTAREA:
+ case XMP:
+ case IFRAME:
+ case SELECT: {
+ if (mode == FRAMESET_OK && !(group == INPUT && nsHtml5Portability::lowerCaseLiteralEqualsIgnoreAsciiCaseString("hidden", attributes->getValue(nsHtml5AttributeName::ATTR_TYPE)))) {
framesetOk = false;
- mode = NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = IN_BODY;
}
}
default:
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_BODY: {
+ case IN_BODY: {
for (; ; ) {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1021,43 +1021,43 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BASE:
- case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND:
- case NS_HTML5TREE_BUILDER_META:
- case NS_HTML5TREE_BUILDER_STYLE:
- case NS_HTML5TREE_BUILDER_SCRIPT:
- case NS_HTML5TREE_BUILDER_TITLE:
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case BASE:
+ case LINK_OR_BASEFONT_OR_BGSOUND:
+ case META:
+ case STYLE:
+ case SCRIPT:
+ case TITLE:
+ case TEMPLATE: {
NS_HTML5_BREAK(inbodyloop);
}
- case NS_HTML5TREE_BUILDER_BODY: {
- if (!currentPtr || stack[1]->getGroup() != NS_HTML5TREE_BUILDER_BODY || isTemplateContents()) {
+ case BODY: {
+ if (!currentPtr || stack[1]->getGroup() != BODY || isTemplateContents()) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayStartTag(name);
NS_HTML5_BREAK(starttagloop);
}
errFooSeenWhenFooOpen(name);
framesetOk = false;
- if (mode == NS_HTML5TREE_BUILDER_FRAMESET_OK) {
- mode = NS_HTML5TREE_BUILDER_IN_BODY;
+ if (mode == FRAMESET_OK) {
+ mode = IN_BODY;
}
if (addAttributesToBody(attributes)) {
attributes = nullptr;
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_P:
- case NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU:
- case NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL:
- case NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY: {
+ case P:
+ case DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU:
+ case UL_OR_OL_OR_DL:
+ case ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY: {
implicitlyCloseP();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6: {
+ case H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6: {
implicitlyCloseP();
- if (stack[currentPtr]->getGroup() == NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) {
+ if (stack[currentPtr]->getGroup() == H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) {
errHeadingWhenHeadingOpen();
pop();
}
@@ -1065,20 +1065,20 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_FIELDSET: {
+ case FIELDSET: {
implicitlyCloseP();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_PRE_OR_LISTING: {
+ case PRE_OR_LISTING: {
implicitlyCloseP();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
needToDropLF = true;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_FORM: {
+ case FORM: {
if (!!formPointer && !isTemplateContents()) {
errFormWhenFormOpen();
NS_HTML5_BREAK(starttagloop);
@@ -1089,8 +1089,8 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
NS_HTML5_BREAK(starttagloop);
}
}
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_DD_OR_DT: {
+ case LI:
+ case DD_OR_DT: {
eltPos = currentPtr;
for (; ; ) {
nsHtml5StackNode* node = stack[eltPos];
@@ -1113,14 +1113,14 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_PLAINTEXT: {
+ case PLAINTEXT: {
implicitlyCloseP();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_PLAINTEXT, elementName);
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::PLAINTEXT, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_A: {
+ case A: {
int32_t activeAPos = findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(nsHtml5Atoms::a);
if (activeAPos != -1) {
errFooSeenWhenFooOpen(name);
@@ -1139,17 +1139,17 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U:
- case NS_HTML5TREE_BUILDER_FONT: {
+ case B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U:
+ case FONT: {
reconstructTheActiveFormattingElements();
maybeForgetEarlierDuplicateFormattingElement(elementName->getName(), attributes);
appendToCurrentNodeAndPushFormattingElementMayFoster(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOBR: {
+ case NOBR: {
reconstructTheActiveFormattingElements();
- if (NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK != findLastInScope(nsHtml5Atoms::nobr)) {
+ if (nsHtml5TreeBuilder::NOT_FOUND_ON_STACK != findLastInScope(nsHtml5Atoms::nobr)) {
errFooSeenWhenFooOpen(name);
adoptionAgencyEndTag(nsHtml5Atoms::nobr);
reconstructTheActiveFormattingElements();
@@ -1158,9 +1158,9 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BUTTON: {
+ case BUTTON: {
eltPos = findLastInScope(name);
- if (eltPos != NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos != nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errFooSeenWhenFooOpen(name);
generateImpliedEndTags();
if (!!MOZ_UNLIKELY(mViewSource) && !isCurrent(name)) {
@@ -1177,65 +1177,65 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
NS_HTML5_BREAK(starttagloop);
}
}
- case NS_HTML5TREE_BUILDER_OBJECT: {
+ case OBJECT: {
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
insertMarker();
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET: {
+ case MARQUEE_OR_APPLET: {
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
insertMarker();
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TABLE: {
+ case TABLE: {
if (!quirks) {
implicitlyCloseP();
}
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BR:
- case NS_HTML5TREE_BUILDER_EMBED:
- case NS_HTML5TREE_BUILDER_AREA_OR_WBR: {
+ case BR:
+ case EMBED:
+ case AREA_OR_WBR: {
reconstructTheActiveFormattingElements();
}
#ifdef ENABLE_VOID_MENUITEM
- case NS_HTML5TREE_BUILDER_MENUITEM:
+ case MENUITEM:
#endif
- case NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK: {
+ case PARAM_OR_SOURCE_OR_TRACK: {
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_HR: {
+ case HR: {
implicitlyCloseP();
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_IMAGE: {
+ case IMAGE: {
errImage();
elementName = nsHtml5ElementName::ELT_IMG;
NS_HTML5_CONTINUE(starttagloop);
}
- case NS_HTML5TREE_BUILDER_IMG:
- case NS_HTML5TREE_BUILDER_KEYGEN:
- case NS_HTML5TREE_BUILDER_INPUT: {
+ case IMG:
+ case KEYGEN:
+ case INPUT: {
reconstructTheActiveFormattingElements();
appendVoidElementToCurrentMayFoster(name, attributes, formPointer);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_ISINDEX: {
+ case ISINDEX: {
errIsindex();
if (!!formPointer && !isTemplateContents()) {
NS_HTML5_BREAK(starttagloop);
@@ -1277,26 +1277,26 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
selfClosing = false;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEXTAREA: {
+ case TEXTAREA: {
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, elementName);
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RCDATA, elementName);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
+ mode = TEXT;
needToDropLF = true;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_XMP: {
+ case XMP: {
implicitlyCloseP();
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOSCRIPT: {
+ case NOSCRIPT: {
if (!scriptingEnabled) {
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
@@ -1305,36 +1305,36 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
} else {
}
}
- case NS_HTML5TREE_BUILDER_NOFRAMES:
- case NS_HTML5TREE_BUILDER_IFRAME:
- case NS_HTML5TREE_BUILDER_NOEMBED: {
+ case NOFRAMES:
+ case IFRAME:
+ case NOEMBED: {
startTagGenericRawText(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SELECT: {
+ case SELECT: {
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
switch(mode) {
- case NS_HTML5TREE_BUILDER_IN_TABLE:
- case NS_HTML5TREE_BUILDER_IN_CAPTION:
- case NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP:
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY:
- case NS_HTML5TREE_BUILDER_IN_ROW:
- case NS_HTML5TREE_BUILDER_IN_CELL: {
- mode = NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE;
+ case IN_TABLE:
+ case IN_CAPTION:
+ case IN_COLUMN_GROUP:
+ case IN_TABLE_BODY:
+ case IN_ROW:
+ case IN_CELL: {
+ mode = IN_SELECT_IN_TABLE;
break;
}
default: {
- mode = NS_HTML5TREE_BUILDER_IN_SELECT;
+ mode = IN_SELECT;
break;
}
}
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_OPTGROUP:
- case NS_HTML5TREE_BUILDER_OPTION: {
+ case OPTGROUP:
+ case OPTION: {
if (isCurrent(nsHtml5Atoms::option)) {
pop();
}
@@ -1343,13 +1343,13 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_RB_OR_RTC: {
+ case RB_OR_RTC: {
eltPos = findLastInScope(nsHtml5Atoms::ruby);
- if (eltPos != NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos != NOT_FOUND_ON_STACK) {
generateImpliedEndTags();
}
if (eltPos != currentPtr) {
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == NOT_FOUND_ON_STACK) {
errStartTagSeenWithoutRuby(name);
} else {
errUnclosedChildrenInRuby();
@@ -1359,14 +1359,14 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_RT_OR_RP: {
+ case RT_OR_RP: {
eltPos = findLastInScope(nsHtml5Atoms::ruby);
- if (eltPos != NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos != NOT_FOUND_ON_STACK) {
generateImpliedEndTagsExceptFor(nsHtml5Atoms::rtc);
}
if (eltPos != currentPtr) {
if (!isCurrent(nsHtml5Atoms::rtc)) {
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == NOT_FOUND_ON_STACK) {
errStartTagSeenWithoutRuby(name);
} else {
errUnclosedChildrenInRuby();
@@ -1377,7 +1377,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_MATH: {
+ case MATH: {
reconstructTheActiveFormattingElements();
attributes->adjustForMath();
if (selfClosing) {
@@ -1389,7 +1389,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SVG: {
+ case SVG: {
reconstructTheActiveFormattingElements();
attributes->adjustForSvg();
if (selfClosing) {
@@ -1401,19 +1401,19 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_FRAME:
- case NS_HTML5TREE_BUILDER_FRAMESET:
- case NS_HTML5TREE_BUILDER_HEAD: {
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR:
+ case TD_OR_TH:
+ case FRAME:
+ case FRAMESET:
+ case HEAD: {
errStrayStartTag(name);
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_OUTPUT: {
+ case OUTPUT: {
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
attributes = nullptr;
@@ -1429,10 +1429,10 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
inbodyloop_end: ;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD: {
+ case IN_HEAD: {
for (; ; ) {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1440,66 +1440,66 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BASE:
- case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND: {
+ case BASE:
+ case LINK_OR_BASEFONT_OR_BGSOUND: {
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_META: {
+ case META: {
NS_HTML5_BREAK(inheadloop);
}
- case NS_HTML5TREE_BUILDER_TITLE: {
+ case TITLE: {
startTagTitleInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOSCRIPT: {
+ case NOSCRIPT: {
if (scriptingEnabled) {
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
} else {
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT;
+ mode = IN_HEAD_NOSCRIPT;
}
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SCRIPT: {
+ case SCRIPT: {
startTagScriptInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_STYLE:
- case NS_HTML5TREE_BUILDER_NOFRAMES: {
+ case STYLE:
+ case NOFRAMES: {
startTagGenericRawText(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_HEAD: {
+ case HEAD: {
errFooSeenWhenFooOpen(name);
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
startTagTemplateInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
default: {
pop();
- mode = NS_HTML5TREE_BUILDER_AFTER_HEAD;
+ mode = AFTER_HEAD;
NS_HTML5_CONTINUE(starttagloop);
}
}
}
inheadloop_end: ;
}
- case NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT: {
+ case IN_HEAD_NOSCRIPT: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1507,47 +1507,47 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND: {
+ case LINK_OR_BASEFONT_OR_BGSOUND: {
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_META: {
+ case META: {
checkMetaCharset(attributes);
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_STYLE:
- case NS_HTML5TREE_BUILDER_NOFRAMES: {
+ case STYLE:
+ case NOFRAMES: {
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_HEAD: {
+ case HEAD: {
errFooSeenWhenFooOpen(name);
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOSCRIPT: {
+ case NOSCRIPT: {
errFooSeenWhenFooOpen(name);
NS_HTML5_BREAK(starttagloop);
}
default: {
errBadStartTagInHead(name);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP: {
+ case IN_COLUMN_GROUP: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1555,39 +1555,39 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_COL: {
+ case COL: {
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
startTagTemplateInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
default: {
- if (!currentPtr || stack[currentPtr]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ if (!currentPtr || stack[currentPtr]->getGroup() == TEMPLATE) {
MOZ_ASSERT(fragment || isTemplateContents());
errGarbageInColgroup();
NS_HTML5_BREAK(starttagloop);
}
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE: {
+ case IN_SELECT_IN_TABLE: {
switch(group) {
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_TABLE: {
+ case CAPTION:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR:
+ case TD_OR_TH:
+ case TABLE: {
errStartTagWithSelectOpen(name);
eltPos = findLastInTableScope(nsHtml5Atoms::select);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment);
NS_HTML5_BREAK(starttagloop);
}
@@ -1601,9 +1601,9 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_SELECT: {
+ case IN_SELECT: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment) {
addAttributesToHtml(attributes);
@@ -1611,7 +1611,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_OPTION: {
+ case OPTION: {
if (isCurrent(nsHtml5Atoms::option)) {
pop();
}
@@ -1619,7 +1619,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_OPTGROUP: {
+ case OPTGROUP: {
if (isCurrent(nsHtml5Atoms::option)) {
pop();
}
@@ -1630,10 +1630,10 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SELECT: {
+ case SELECT: {
errStartSelectWhereEndSelectExpected();
eltPos = findLastInTableScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment);
errNoSelectInTableScope();
NS_HTML5_BREAK(starttagloop);
@@ -1645,12 +1645,12 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
NS_HTML5_BREAK(starttagloop);
}
}
- case NS_HTML5TREE_BUILDER_INPUT:
- case NS_HTML5TREE_BUILDER_TEXTAREA:
- case NS_HTML5TREE_BUILDER_KEYGEN: {
+ case INPUT:
+ case TEXTAREA:
+ case KEYGEN: {
errStartTagWithSelectOpen(name);
eltPos = findLastInTableScope(nsHtml5Atoms::select);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment);
NS_HTML5_BREAK(starttagloop);
}
@@ -1660,12 +1660,12 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
resetTheInsertionMode();
continue;
}
- case NS_HTML5TREE_BUILDER_SCRIPT: {
+ case SCRIPT: {
startTagScriptInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
startTagTemplateInHead(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
@@ -1676,9 +1676,9 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_BODY: {
+ case AFTER_BODY: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1688,19 +1688,19 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
default: {
errStrayStartTag(name);
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_IN_FRAMESET: {
+ case IN_FRAMESET: {
switch(group) {
- case NS_HTML5TREE_BUILDER_FRAMESET: {
+ case FRAMESET: {
appendToCurrentNodeAndPushElement(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_FRAME: {
+ case FRAME: {
appendVoidElementToCurrentMayFoster(elementName, attributes);
selfClosing = false;
attributes = nullptr;
@@ -1710,9 +1710,9 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_AFTER_FRAMESET: {
+ case AFTER_FRAMESET: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1720,11 +1720,11 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOFRAMES: {
+ case NOFRAMES: {
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
@@ -1734,34 +1734,34 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
}
}
- case NS_HTML5TREE_BUILDER_INITIAL: {
+ case INITIAL: {
errStartTagWithoutDoctype();
documentModeInternal(QUIRKS_MODE, nullptr, nullptr, false);
- mode = NS_HTML5TREE_BUILDER_BEFORE_HTML;
+ mode = BEFORE_HTML;
continue;
}
- case NS_HTML5TREE_BUILDER_BEFORE_HTML: {
+ case BEFORE_HTML: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
if (attributes == nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES) {
appendHtmlElementToDocumentAndPush();
} else {
appendHtmlElementToDocumentAndPush(attributes);
}
- mode = NS_HTML5TREE_BUILDER_BEFORE_HEAD;
+ mode = BEFORE_HEAD;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
default: {
appendHtmlElementToDocumentAndPush();
- mode = NS_HTML5TREE_BUILDER_BEFORE_HEAD;
+ mode = BEFORE_HEAD;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_BEFORE_HEAD: {
+ case BEFORE_HEAD: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1769,22 +1769,22 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_HEAD: {
+ case HEAD: {
appendToCurrentNodeAndPushHeadElement(attributes);
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
default: {
appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_HEAD: {
+ case AFTER_HEAD: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1792,24 +1792,24 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BODY: {
+ case BODY: {
if (!attributes->getLength()) {
appendToCurrentNodeAndPushBodyElement();
} else {
appendToCurrentNodeAndPushBodyElement(attributes);
}
framesetOk = false;
- mode = NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = IN_BODY;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_FRAMESET: {
+ case FRAMESET: {
appendToCurrentNodeAndPushElement(elementName, attributes);
- mode = NS_HTML5TREE_BUILDER_IN_FRAMESET;
+ mode = IN_FRAMESET;
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
errFooBetweenHeadAndBody(name);
pushHeadPointerOntoStack();
nsHtml5StackNode* headOnStack = stack[currentPtr];
@@ -1818,8 +1818,8 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_BASE:
- case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND: {
+ case BASE:
+ case LINK_OR_BASEFONT_OR_BGSOUND: {
errFooBetweenHeadAndBody(name);
pushHeadPointerOntoStack();
appendVoidElementToCurrentMayFoster(elementName, attributes);
@@ -1828,7 +1828,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_META: {
+ case META: {
errFooBetweenHeadAndBody(name);
checkMetaCharset(attributes);
pushHeadPointerOntoStack();
@@ -1838,51 +1838,51 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_SCRIPT: {
+ case SCRIPT: {
errFooBetweenHeadAndBody(name);
pushHeadPointerOntoStack();
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::SCRIPT_DATA, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_STYLE:
- case NS_HTML5TREE_BUILDER_NOFRAMES: {
+ case STYLE:
+ case NOFRAMES: {
errFooBetweenHeadAndBody(name);
pushHeadPointerOntoStack();
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_TITLE: {
+ case TITLE: {
errFooBetweenHeadAndBody(name);
pushHeadPointerOntoStack();
appendToCurrentNodeAndPushElement(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RCDATA, elementName);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_HEAD: {
+ case HEAD: {
errStrayStartTag(name);
NS_HTML5_BREAK(starttagloop);
}
default: {
appendToCurrentNodeAndPushBodyElement();
- mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
+ mode = FRAMESET_OK;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY: {
+ case AFTER_AFTER_BODY: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1893,14 +1893,14 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
default: {
errStrayStartTag(name);
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET: {
+ case AFTER_AFTER_FRAMESET: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
errStrayStartTag(name);
if (!fragment && !isTemplateContents()) {
addAttributesToHtml(attributes);
@@ -1908,7 +1908,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
NS_HTML5_BREAK(starttagloop);
}
- case NS_HTML5TREE_BUILDER_NOFRAMES: {
+ case NOFRAMES: {
startTagGenericRawText(elementName, attributes);
attributes = nullptr;
NS_HTML5_BREAK(starttagloop);
@@ -1919,7 +1919,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
}
}
- case NS_HTML5TREE_BUILDER_TEXT: {
+ case TEXT: {
MOZ_ASSERT(false);
NS_HTML5_BREAK(starttagloop);
}
@@ -1939,8 +1939,8 @@ nsHtml5TreeBuilder::startTagTitleInHead(nsHtml5ElementName* elementName, nsHtml5
{
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RCDATA, elementName);
}
void
@@ -1948,8 +1948,8 @@ nsHtml5TreeBuilder::startTagGenericRawText(nsHtml5ElementName* elementName, nsHt
{
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::RAWTEXT, elementName);
}
void
@@ -1957,8 +1957,8 @@ nsHtml5TreeBuilder::startTagScriptInHead(nsHtml5ElementName* elementName, nsHtml
{
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_TEXT;
- tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
+ mode = TEXT;
+ tokenizer->setStateAndEndTagExpectation(nsHtml5Tokenizer::SCRIPT_DATA, elementName);
}
void
@@ -1968,14 +1968,14 @@ nsHtml5TreeBuilder::startTagTemplateInHead(nsHtml5ElementName* elementName, nsHt
insertMarker();
framesetOk = false;
originalMode = mode;
- mode = NS_HTML5TREE_BUILDER_IN_TEMPLATE;
- pushTemplateMode(NS_HTML5TREE_BUILDER_IN_TEMPLATE);
+ mode = IN_TEMPLATE;
+ pushTemplateMode(IN_TEMPLATE);
}
bool
nsHtml5TreeBuilder::isTemplateContents()
{
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK != findLast(nsHtml5Atoms::template_);
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK != findLast(nsHtml5Atoms::template_);
}
bool
@@ -1988,24 +1988,24 @@ bool
nsHtml5TreeBuilder::isSpecialParentInForeign(nsHtml5StackNode* stackNode)
{
int32_t ns = stackNode->ns;
- return (kNameSpaceID_XHTML == ns) || (stackNode->isHtmlIntegrationPoint()) || ((kNameSpaceID_MathML == ns) && (stackNode->getGroup() == NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT));
+ return (kNameSpaceID_XHTML == ns) || (stackNode->isHtmlIntegrationPoint()) || ((kNameSpaceID_MathML == ns) && (stackNode->getGroup() == MI_MO_MN_MS_MTEXT));
}
nsHtml5String
nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHtml5TreeBuilder* tb)
{
- int32_t charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ int32_t charsetState = CHARSET_INITIAL;
int32_t start = -1;
int32_t end = -1;
autoJArray<char16_t,int32_t> buffer = nsHtml5Portability::newCharArrayFromString(attributeValue);
for (int32_t i = 0; i < buffer.length; i++) {
char16_t c = buffer[i];
switch(charsetState) {
- case NS_HTML5TREE_BUILDER_CHARSET_INITIAL: {
+ case CHARSET_INITIAL: {
switch(c) {
case 'c':
case 'C': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_C;
+ charsetState = CHARSET_C;
continue;
}
default: {
@@ -2013,85 +2013,85 @@ nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHt
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_C: {
+ case CHARSET_C: {
switch(c) {
case 'h':
case 'H': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_H;
+ charsetState = CHARSET_H;
continue;
}
default: {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ charsetState = CHARSET_INITIAL;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_H: {
+ case CHARSET_H: {
switch(c) {
case 'a':
case 'A': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_A;
+ charsetState = CHARSET_A;
continue;
}
default: {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ charsetState = CHARSET_INITIAL;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_A: {
+ case CHARSET_A: {
switch(c) {
case 'r':
case 'R': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_R;
+ charsetState = CHARSET_R;
continue;
}
default: {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ charsetState = CHARSET_INITIAL;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_R: {
+ case CHARSET_R: {
switch(c) {
case 's':
case 'S': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_S;
+ charsetState = CHARSET_S;
continue;
}
default: {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ charsetState = CHARSET_INITIAL;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_S: {
+ case CHARSET_S: {
switch(c) {
case 'e':
case 'E': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_E;
+ charsetState = CHARSET_E;
continue;
}
default: {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ charsetState = CHARSET_INITIAL;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_E: {
+ case CHARSET_E: {
switch(c) {
case 't':
case 'T': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_T;
+ charsetState = CHARSET_T;
continue;
}
default: {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_INITIAL;
+ charsetState = CHARSET_INITIAL;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_T: {
+ case CHARSET_T: {
switch(c) {
case '\t':
case '\n':
@@ -2101,7 +2101,7 @@ nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHt
continue;
}
case '=': {
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_EQUALS;
+ charsetState = CHARSET_EQUALS;
continue;
}
default: {
@@ -2109,7 +2109,7 @@ nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHt
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_EQUALS: {
+ case CHARSET_EQUALS: {
switch(c) {
case '\t':
case '\n':
@@ -2120,22 +2120,22 @@ nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHt
}
case '\'': {
start = i + 1;
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_SINGLE_QUOTED;
+ charsetState = CHARSET_SINGLE_QUOTED;
continue;
}
case '\"': {
start = i + 1;
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_DOUBLE_QUOTED;
+ charsetState = CHARSET_DOUBLE_QUOTED;
continue;
}
default: {
start = i;
- charsetState = NS_HTML5TREE_BUILDER_CHARSET_UNQUOTED;
+ charsetState = CHARSET_UNQUOTED;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_SINGLE_QUOTED: {
+ case CHARSET_SINGLE_QUOTED: {
switch(c) {
case '\'': {
end = i;
@@ -2146,7 +2146,7 @@ nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHt
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_DOUBLE_QUOTED: {
+ case CHARSET_DOUBLE_QUOTED: {
switch(c) {
case '\"': {
end = i;
@@ -2157,7 +2157,7 @@ nsHtml5TreeBuilder::extractCharsetFromContent(nsHtml5String attributeValue, nsHt
}
}
}
- case NS_HTML5TREE_BUILDER_CHARSET_UNQUOTED: {
+ case CHARSET_UNQUOTED: {
switch(c) {
case '\t':
case '\n':
@@ -2247,9 +2247,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
switch(mode) {
- case NS_HTML5TREE_BUILDER_IN_TEMPLATE: {
+ case IN_TEMPLATE: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
break;
}
default: {
@@ -2258,10 +2258,10 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_IN_ROW: {
+ case IN_ROW: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TR: {
- eltPos = findLastOrRoot(NS_HTML5TREE_BUILDER_TR);
+ case TR: {
+ eltPos = findLastOrRoot(nsHtml5TreeBuilder::TR);
if (!eltPos) {
MOZ_ASSERT(fragment || isTemplateContents());
errNoTableRowToClose();
@@ -2269,11 +2269,11 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TABLE: {
- eltPos = findLastOrRoot(NS_HTML5TREE_BUILDER_TR);
+ case TABLE: {
+ eltPos = findLastOrRoot(nsHtml5TreeBuilder::TR);
if (!eltPos) {
MOZ_ASSERT(fragment || isTemplateContents());
errNoTableRowToClose();
@@ -2281,15 +2281,15 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
continue;
}
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
- if (findLastInTableScope(name) == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ case TBODY_OR_THEAD_OR_TFOOT: {
+ if (findLastInTableScope(name) == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
- eltPos = findLastOrRoot(NS_HTML5TREE_BUILDER_TR);
+ eltPos = findLastOrRoot(nsHtml5TreeBuilder::TR);
if (!eltPos) {
MOZ_ASSERT(fragment || isTemplateContents());
errNoTableRowToClose();
@@ -2297,15 +2297,15 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
continue;
}
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case BODY:
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case HTML:
+ case TD_OR_TH: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2313,9 +2313,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_TABLE_BODY: {
+ case IN_TABLE_BODY: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
+ case TBODY_OR_THEAD_OR_TFOOT: {
eltPos = findLastOrRoot(name);
if (!eltPos) {
errStrayEndTag(name);
@@ -2323,28 +2323,28 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TABLE: {
+ case TABLE: {
eltPos = findLastInTableScopeOrRootTemplateTbodyTheadTfoot();
- if (!eltPos || stack[eltPos]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ if (!eltPos || stack[eltPos]->getGroup() == TEMPLATE) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
clearStackBackTo(eltPos);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
continue;
}
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_TR: {
+ case BODY:
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case HTML:
+ case TD_OR_TH:
+ case TR: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2352,11 +2352,11 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_TABLE: {
+ case IN_TABLE: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TABLE: {
+ case TABLE: {
eltPos = findLast(nsHtml5Atoms::table);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
@@ -2367,18 +2367,18 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
resetTheInsertionMode();
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_TR: {
+ case BODY:
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case HTML:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TD_OR_TH:
+ case TR: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
break;
}
default: {
@@ -2386,11 +2386,11 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_IN_CAPTION: {
+ case IN_CAPTION: {
switch(group) {
- case NS_HTML5TREE_BUILDER_CAPTION: {
+ case CAPTION: {
eltPos = findLastInTableScope(nsHtml5Atoms::caption);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
NS_HTML5_BREAK(endtagloop);
}
generateImpliedEndTags();
@@ -2401,13 +2401,13 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
pop();
}
clearTheListOfActiveFormattingElementsUpToTheLastMarker();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TABLE: {
+ case TABLE: {
errTableClosedWhileCaptionOpen();
eltPos = findLastInTableScope(nsHtml5Atoms::caption);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
NS_HTML5_BREAK(endtagloop);
}
generateImpliedEndTags();
@@ -2418,16 +2418,16 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
pop();
}
clearTheListOfActiveFormattingElementsUpToTheLastMarker();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
continue;
}
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_TR: {
+ case BODY:
+ case COL:
+ case COLGROUP:
+ case HTML:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TD_OR_TH:
+ case TR: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2435,11 +2435,11 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_CELL: {
+ case IN_CELL: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case TD_OR_TH: {
eltPos = findLastInTableScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2451,13 +2451,13 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
pop();
}
clearTheListOfActiveFormattingElementsUpToTheLastMarker();
- mode = NS_HTML5TREE_BUILDER_IN_ROW;
+ mode = IN_ROW;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TABLE:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR: {
- if (findLastInTableScope(name) == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ case TABLE:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR: {
+ if (findLastInTableScope(name) == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(name == nsHtml5Atoms::tbody || name == nsHtml5Atoms::tfoot || name == nsHtml5Atoms::thead || fragment || isTemplateContents());
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
@@ -2465,11 +2465,11 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
closeTheCell(findLastInTableScopeTdTh());
continue;
}
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_COL:
- case NS_HTML5TREE_BUILDER_COLGROUP:
- case NS_HTML5TREE_BUILDER_HTML: {
+ case BODY:
+ case CAPTION:
+ case COL:
+ case COLGROUP:
+ case HTML: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2477,10 +2477,10 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_FRAMESET_OK:
- case NS_HTML5TREE_BUILDER_IN_BODY: {
+ case FRAMESET_OK:
+ case IN_BODY: {
switch(group) {
- case NS_HTML5TREE_BUILDER_BODY: {
+ case BODY: {
if (!isSecondOnStackBody()) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayEndTag(name);
@@ -2490,15 +2490,15 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
if (MOZ_UNLIKELY(mViewSource)) {
for (int32_t i = 2; i <= currentPtr; i++) {
switch(stack[i]->getGroup()) {
- case NS_HTML5TREE_BUILDER_DD_OR_DT:
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_OPTGROUP:
- case NS_HTML5TREE_BUILDER_OPTION:
- case NS_HTML5TREE_BUILDER_P:
- case NS_HTML5TREE_BUILDER_RB_OR_RTC:
- case NS_HTML5TREE_BUILDER_RT_OR_RP:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
+ case DD_OR_DT:
+ case LI:
+ case OPTGROUP:
+ case OPTION:
+ case P:
+ case RB_OR_RTC:
+ case RT_OR_RP:
+ case TD_OR_TH:
+ case TBODY_OR_THEAD_OR_TFOOT: {
break;
}
default: {
@@ -2509,10 +2509,10 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
uncloseloop1_end: ;
}
- mode = NS_HTML5TREE_BUILDER_AFTER_BODY;
+ mode = AFTER_BODY;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
if (!isSecondOnStackBody()) {
MOZ_ASSERT(fragment || isTemplateContents());
errStrayEndTag(name);
@@ -2521,15 +2521,15 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
if (MOZ_UNLIKELY(mViewSource)) {
for (int32_t i = 0; i <= currentPtr; i++) {
switch(stack[i]->getGroup()) {
- case NS_HTML5TREE_BUILDER_DD_OR_DT:
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_P:
- case NS_HTML5TREE_BUILDER_RB_OR_RTC:
- case NS_HTML5TREE_BUILDER_RT_OR_RP:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TD_OR_TH:
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_HTML: {
+ case DD_OR_DT:
+ case LI:
+ case P:
+ case RB_OR_RTC:
+ case RT_OR_RP:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TD_OR_TH:
+ case BODY:
+ case HTML: {
break;
}
default: {
@@ -2540,17 +2540,17 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
uncloseloop2_end: ;
}
- mode = NS_HTML5TREE_BUILDER_AFTER_BODY;
+ mode = AFTER_BODY;
continue;
}
- case NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU:
- case NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL:
- case NS_HTML5TREE_BUILDER_PRE_OR_LISTING:
- case NS_HTML5TREE_BUILDER_FIELDSET:
- case NS_HTML5TREE_BUILDER_BUTTON:
- case NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY: {
+ case DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU:
+ case UL_OR_OL_OR_DL:
+ case PRE_OR_LISTING:
+ case FIELDSET:
+ case BUTTON:
+ case ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY: {
eltPos = findLastInScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
} else {
generateImpliedEndTags();
@@ -2563,7 +2563,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_FORM: {
+ case FORM: {
if (!isTemplateContents()) {
if (!formPointer) {
errStrayEndTag(name);
@@ -2571,7 +2571,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
formPointer = nullptr;
eltPos = findLastInScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2583,7 +2583,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
NS_HTML5_BREAK(endtagloop);
} else {
eltPos = findLastInScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
@@ -2597,9 +2597,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
NS_HTML5_BREAK(endtagloop);
}
}
- case NS_HTML5TREE_BUILDER_P: {
+ case P: {
eltPos = findLastInButtonScope(nsHtml5Atoms::p);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errNoElementToCloseButEndTagSeen(nsHtml5Atoms::p);
if (isInForeign()) {
errHtmlStartTagInForeignContext(name);
@@ -2611,7 +2611,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
NS_HTML5_BREAK(endtagloop);
}
generateImpliedEndTagsExceptFor(nsHtml5Atoms::p);
- MOZ_ASSERT(eltPos != NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK);
+ MOZ_ASSERT(eltPos != nsHtml5TreeBuilder::NOT_FOUND_ON_STACK);
if (!!MOZ_UNLIKELY(mViewSource) && eltPos != currentPtr) {
errUnclosedElements(eltPos, name);
}
@@ -2620,9 +2620,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_LI: {
+ case LI: {
eltPos = findLastInListScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errNoElementToCloseButEndTagSeen(name);
} else {
generateImpliedEndTagsExceptFor(name);
@@ -2635,9 +2635,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_DD_OR_DT: {
+ case DD_OR_DT: {
eltPos = findLastInScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errNoElementToCloseButEndTagSeen(name);
} else {
generateImpliedEndTagsExceptFor(name);
@@ -2650,9 +2650,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6: {
+ case H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6: {
eltPos = findLastInScopeHn();
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
} else {
generateImpliedEndTags();
@@ -2665,10 +2665,10 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_OBJECT:
- case NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET: {
+ case OBJECT:
+ case MARQUEE_OR_APPLET: {
eltPos = findLastInScope(name);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(name);
} else {
generateImpliedEndTags();
@@ -2682,7 +2682,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_BR: {
+ case BR: {
errEndTagBr();
if (isInForeign()) {
errHtmlStartTagInForeignContext(name);
@@ -2694,41 +2694,41 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
appendVoidElementToCurrentMayFoster(elementName, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
break;
}
- case NS_HTML5TREE_BUILDER_AREA_OR_WBR:
+ case AREA_OR_WBR:
#ifdef ENABLE_VOID_MENUITEM
- case NS_HTML5TREE_BUILDER_MENUITEM:
+ case MENUITEM:
#endif
- case NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK:
- case NS_HTML5TREE_BUILDER_EMBED:
- case NS_HTML5TREE_BUILDER_IMG:
- case NS_HTML5TREE_BUILDER_IMAGE:
- case NS_HTML5TREE_BUILDER_INPUT:
- case NS_HTML5TREE_BUILDER_KEYGEN:
- case NS_HTML5TREE_BUILDER_HR:
- case NS_HTML5TREE_BUILDER_ISINDEX:
- case NS_HTML5TREE_BUILDER_IFRAME:
- case NS_HTML5TREE_BUILDER_NOEMBED:
- case NS_HTML5TREE_BUILDER_NOFRAMES:
- case NS_HTML5TREE_BUILDER_SELECT:
- case NS_HTML5TREE_BUILDER_TABLE:
- case NS_HTML5TREE_BUILDER_TEXTAREA: {
+ case PARAM_OR_SOURCE_OR_TRACK:
+ case EMBED:
+ case IMG:
+ case IMAGE:
+ case INPUT:
+ case KEYGEN:
+ case HR:
+ case ISINDEX:
+ case IFRAME:
+ case NOEMBED:
+ case NOFRAMES:
+ case SELECT:
+ case TABLE:
+ case TEXTAREA: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_NOSCRIPT: {
+ case NOSCRIPT: {
if (scriptingEnabled) {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
} else {
}
}
- case NS_HTML5TREE_BUILDER_A:
- case NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U:
- case NS_HTML5TREE_BUILDER_FONT:
- case NS_HTML5TREE_BUILDER_NOBR: {
+ case A:
+ case B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U:
+ case FONT:
+ case NOBR: {
if (adoptionAgencyEndTag(name)) {
NS_HTML5_BREAK(endtagloop);
}
@@ -2759,21 +2759,21 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_IN_HEAD: {
+ case IN_HEAD: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HEAD: {
+ case HEAD: {
pop();
- mode = NS_HTML5TREE_BUILDER_AFTER_HEAD;
+ mode = AFTER_HEAD;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_BR:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_BODY: {
+ case BR:
+ case HTML:
+ case BODY: {
pop();
- mode = NS_HTML5TREE_BUILDER_AFTER_HEAD;
+ mode = AFTER_HEAD;
continue;
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
endTagTemplateInHead();
NS_HTML5_BREAK(endtagloop);
}
@@ -2783,17 +2783,17 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT: {
+ case IN_HEAD_NOSCRIPT: {
switch(group) {
- case NS_HTML5TREE_BUILDER_NOSCRIPT: {
+ case NOSCRIPT: {
pop();
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_BR: {
+ case BR: {
errStrayEndTag(name);
pop();
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
continue;
}
default: {
@@ -2802,49 +2802,49 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP: {
+ case IN_COLUMN_GROUP: {
switch(group) {
- case NS_HTML5TREE_BUILDER_COLGROUP: {
- if (!currentPtr || stack[currentPtr]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ case COLGROUP: {
+ if (!currentPtr || stack[currentPtr]->getGroup() == nsHtml5TreeBuilder::TEMPLATE) {
MOZ_ASSERT(fragment || isTemplateContents());
errGarbageInColgroup();
NS_HTML5_BREAK(endtagloop);
}
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_COL: {
+ case COL: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
endTagTemplateInHead();
NS_HTML5_BREAK(endtagloop);
}
default: {
- if (!currentPtr || stack[currentPtr]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ if (!currentPtr || stack[currentPtr]->getGroup() == nsHtml5TreeBuilder::TEMPLATE) {
MOZ_ASSERT(fragment || isTemplateContents());
errGarbageInColgroup();
NS_HTML5_BREAK(endtagloop);
}
pop();
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE: {
+ case IN_SELECT_IN_TABLE: {
switch(group) {
- case NS_HTML5TREE_BUILDER_CAPTION:
- case NS_HTML5TREE_BUILDER_TABLE:
- case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT:
- case NS_HTML5TREE_BUILDER_TR:
- case NS_HTML5TREE_BUILDER_TD_OR_TH: {
+ case CAPTION:
+ case TABLE:
+ case TBODY_OR_THEAD_OR_TFOOT:
+ case TR:
+ case TD_OR_TH: {
errEndTagSeenWithSelectOpen(name);
- if (findLastInTableScope(name) != NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (findLastInTableScope(name) != nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
eltPos = findLastInTableScope(nsHtml5Atoms::select);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment);
NS_HTML5_BREAK(endtagloop);
}
@@ -2861,9 +2861,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
; // fall through
}
}
- case NS_HTML5TREE_BUILDER_IN_SELECT: {
+ case IN_SELECT: {
switch(group) {
- case NS_HTML5TREE_BUILDER_OPTION: {
+ case OPTION: {
if (isCurrent(nsHtml5Atoms::option)) {
pop();
NS_HTML5_BREAK(endtagloop);
@@ -2872,7 +2872,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
NS_HTML5_BREAK(endtagloop);
}
}
- case NS_HTML5TREE_BUILDER_OPTGROUP: {
+ case OPTGROUP: {
if (isCurrent(nsHtml5Atoms::option) && nsHtml5Atoms::optgroup == stack[currentPtr - 1]->name) {
pop();
}
@@ -2883,9 +2883,9 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_SELECT: {
+ case SELECT: {
eltPos = findLastInTableScope(nsHtml5Atoms::select);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
MOZ_ASSERT(fragment);
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
@@ -2896,7 +2896,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
resetTheInsertionMode();
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
endTagTemplateInHead();
NS_HTML5_BREAK(endtagloop);
}
@@ -2906,27 +2906,27 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_BODY: {
+ case AFTER_BODY: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
+ case HTML: {
if (fragment) {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
} else {
- mode = NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY;
+ mode = AFTER_AFTER_BODY;
NS_HTML5_BREAK(endtagloop);
}
}
default: {
errEndTagAfterBody();
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
continue;
}
}
}
- case NS_HTML5TREE_BUILDER_IN_FRAMESET: {
+ case IN_FRAMESET: {
switch(group) {
- case NS_HTML5TREE_BUILDER_FRAMESET: {
+ case FRAMESET: {
if (!currentPtr) {
MOZ_ASSERT(fragment);
errStrayEndTag(name);
@@ -2934,7 +2934,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
pop();
if ((!fragment) && !isCurrent(nsHtml5Atoms::frameset)) {
- mode = NS_HTML5TREE_BUILDER_AFTER_FRAMESET;
+ mode = AFTER_FRAMESET;
}
NS_HTML5_BREAK(endtagloop);
}
@@ -2944,10 +2944,10 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_FRAMESET: {
+ case AFTER_FRAMESET: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HTML: {
- mode = NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET;
+ case HTML: {
+ mode = AFTER_AFTER_FRAMESET;
NS_HTML5_BREAK(endtagloop);
}
default: {
@@ -2956,20 +2956,20 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_INITIAL: {
+ case INITIAL: {
errEndTagSeenWithoutDoctype();
documentModeInternal(QUIRKS_MODE, nullptr, nullptr, false);
- mode = NS_HTML5TREE_BUILDER_BEFORE_HTML;
+ mode = BEFORE_HTML;
continue;
}
- case NS_HTML5TREE_BUILDER_BEFORE_HTML: {
+ case BEFORE_HTML: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HEAD:
- case NS_HTML5TREE_BUILDER_BR:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_BODY: {
+ case HEAD:
+ case BR:
+ case HTML:
+ case BODY: {
appendHtmlElementToDocumentAndPush();
- mode = NS_HTML5TREE_BUILDER_BEFORE_HEAD;
+ mode = BEFORE_HEAD;
continue;
}
default: {
@@ -2978,14 +2978,14 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_BEFORE_HEAD: {
+ case BEFORE_HEAD: {
switch(group) {
- case NS_HTML5TREE_BUILDER_HEAD:
- case NS_HTML5TREE_BUILDER_BR:
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_BODY: {
+ case HEAD:
+ case BR:
+ case HTML:
+ case BODY: {
appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
continue;
}
default: {
@@ -2994,17 +2994,17 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_HEAD: {
+ case AFTER_HEAD: {
switch(group) {
- case NS_HTML5TREE_BUILDER_TEMPLATE: {
+ case TEMPLATE: {
endTagTemplateInHead();
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_HTML:
- case NS_HTML5TREE_BUILDER_BODY:
- case NS_HTML5TREE_BUILDER_BR: {
+ case HTML:
+ case BODY:
+ case BR: {
appendToCurrentNodeAndPushBodyElement();
- mode = NS_HTML5TREE_BUILDER_FRAMESET_OK;
+ mode = FRAMESET_OK;
continue;
}
default: {
@@ -3013,18 +3013,18 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
}
}
}
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY: {
+ case AFTER_AFTER_BODY: {
errStrayEndTag(name);
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
continue;
}
- case NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET: {
+ case AFTER_AFTER_FRAMESET: {
errStrayEndTag(name);
NS_HTML5_BREAK(endtagloop);
}
- case NS_HTML5TREE_BUILDER_TEXT: {
+ case TEXT: {
pop();
- if (originalMode == NS_HTML5TREE_BUILDER_AFTER_HEAD) {
+ if (originalMode == AFTER_HEAD) {
silentPop();
}
mode = originalMode;
@@ -3039,7 +3039,7 @@ void
nsHtml5TreeBuilder::endTagTemplateInHead()
{
int32_t eltPos = findLast(nsHtml5Atoms::template_);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
errStrayEndTag(nsHtml5Atoms::template_);
return;
}
@@ -3059,7 +3059,7 @@ int32_t
nsHtml5TreeBuilder::findLastInTableScopeOrRootTemplateTbodyTheadTfoot()
{
for (int32_t i = currentPtr; i > 0; i--) {
- if (stack[i]->getGroup() == NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT || stack[i]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE) {
+ if (stack[i]->getGroup() == nsHtml5TreeBuilder::TBODY_OR_THEAD_OR_TFOOT || stack[i]->getGroup() == nsHtml5TreeBuilder::TEMPLATE) {
return i;
}
}
@@ -3074,7 +3074,7 @@ nsHtml5TreeBuilder::findLast(nsIAtom* name)
return i;
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
int32_t
@@ -3085,11 +3085,11 @@ nsHtml5TreeBuilder::findLastInTableScope(nsIAtom* name)
if (stack[i]->name == name) {
return i;
} else if (stack[i]->name == nsHtml5Atoms::table || stack[i]->name == nsHtml5Atoms::template_) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
int32_t
@@ -3100,14 +3100,14 @@ nsHtml5TreeBuilder::findLastInButtonScope(nsIAtom* name)
if (stack[i]->name == name) {
return i;
} else if (stack[i]->name == nsHtml5Atoms::button) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
if (stack[i]->isScoping()) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
int32_t
@@ -3117,10 +3117,10 @@ nsHtml5TreeBuilder::findLastInScope(nsIAtom* name)
if (stack[i]->ns == kNameSpaceID_XHTML && stack[i]->name == name) {
return i;
} else if (stack[i]->isScoping()) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
int32_t
@@ -3131,27 +3131,27 @@ nsHtml5TreeBuilder::findLastInListScope(nsIAtom* name)
if (stack[i]->name == name) {
return i;
} else if (stack[i]->name == nsHtml5Atoms::ul || stack[i]->name == nsHtml5Atoms::ol) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
if (stack[i]->isScoping()) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
int32_t
nsHtml5TreeBuilder::findLastInScopeHn()
{
for (int32_t i = currentPtr; i > 0; i--) {
- if (stack[i]->getGroup() == NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) {
+ if (stack[i]->getGroup() == nsHtml5TreeBuilder::H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) {
return i;
} else if (stack[i]->isScoping()) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
void
@@ -3160,13 +3160,13 @@ nsHtml5TreeBuilder::generateImpliedEndTagsExceptFor(nsIAtom* name)
for (; ; ) {
nsHtml5StackNode* node = stack[currentPtr];
switch(node->getGroup()) {
- case NS_HTML5TREE_BUILDER_P:
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_DD_OR_DT:
- case NS_HTML5TREE_BUILDER_OPTION:
- case NS_HTML5TREE_BUILDER_OPTGROUP:
- case NS_HTML5TREE_BUILDER_RB_OR_RTC:
- case NS_HTML5TREE_BUILDER_RT_OR_RP: {
+ case P:
+ case LI:
+ case DD_OR_DT:
+ case OPTION:
+ case OPTGROUP:
+ case RB_OR_RTC:
+ case RT_OR_RP: {
if (node->ns == kNameSpaceID_XHTML && node->name == name) {
return;
}
@@ -3185,13 +3185,13 @@ nsHtml5TreeBuilder::generateImpliedEndTags()
{
for (; ; ) {
switch(stack[currentPtr]->getGroup()) {
- case NS_HTML5TREE_BUILDER_P:
- case NS_HTML5TREE_BUILDER_LI:
- case NS_HTML5TREE_BUILDER_DD_OR_DT:
- case NS_HTML5TREE_BUILDER_OPTION:
- case NS_HTML5TREE_BUILDER_OPTGROUP:
- case NS_HTML5TREE_BUILDER_RB_OR_RTC:
- case NS_HTML5TREE_BUILDER_RT_OR_RP: {
+ case P:
+ case LI:
+ case DD_OR_DT:
+ case OPTION:
+ case OPTGROUP:
+ case RB_OR_RTC:
+ case RT_OR_RP: {
pop();
continue;
}
@@ -3205,7 +3205,7 @@ nsHtml5TreeBuilder::generateImpliedEndTags()
bool
nsHtml5TreeBuilder::isSecondOnStackBody()
{
- return currentPtr >= 1 && stack[1]->getGroup() == NS_HTML5TREE_BUILDER_BODY;
+ return currentPtr >= 1 && stack[1]->getGroup() == nsHtml5TreeBuilder::BODY;
}
void
@@ -3282,7 +3282,7 @@ nsHtml5TreeBuilder::closeTheCell(int32_t eltPos)
pop();
}
clearTheListOfActiveFormattingElementsUpToTheLastMarker();
- mode = NS_HTML5TREE_BUILDER_IN_ROW;
+ mode = IN_ROW;
return;
}
@@ -3295,11 +3295,11 @@ nsHtml5TreeBuilder::findLastInTableScopeTdTh()
if (nsHtml5Atoms::td == name || nsHtml5Atoms::th == name) {
return i;
} else if (name == nsHtml5Atoms::table || name == nsHtml5Atoms::template_) {
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
}
}
- return NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK;
+ return nsHtml5TreeBuilder::NOT_FOUND_ON_STACK;
}
void
@@ -3307,7 +3307,7 @@ nsHtml5TreeBuilder::clearStackBackTo(int32_t eltPos)
{
int32_t eltGroup = stack[eltPos]->getGroup();
while (currentPtr > eltPos) {
- if (stack[currentPtr]->ns == kNameSpaceID_XHTML && stack[currentPtr]->getGroup() == NS_HTML5TREE_BUILDER_TEMPLATE && (eltGroup == NS_HTML5TREE_BUILDER_TABLE || eltGroup == NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT || eltGroup == NS_HTML5TREE_BUILDER_TR || !eltPos)) {
+ if (stack[currentPtr]->ns == kNameSpaceID_XHTML && stack[currentPtr]->getGroup() == TEMPLATE && (eltGroup == TABLE || eltGroup == TBODY_OR_THEAD_OR_TFOOT || eltGroup == TR || !eltPos)) {
return;
}
pop();
@@ -3331,7 +3331,7 @@ nsHtml5TreeBuilder::resetTheInsertionMode()
ns = contextNamespace;
}
} else {
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
return;
}
}
@@ -3344,33 +3344,33 @@ nsHtml5TreeBuilder::resetTheInsertionMode()
break;
}
if (nsHtml5Atoms::table == ancestor->name) {
- mode = NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE;
+ mode = IN_SELECT_IN_TABLE;
return;
}
}
}
- mode = NS_HTML5TREE_BUILDER_IN_SELECT;
+ mode = IN_SELECT;
return;
} else if (nsHtml5Atoms::td == name || nsHtml5Atoms::th == name) {
- mode = NS_HTML5TREE_BUILDER_IN_CELL;
+ mode = IN_CELL;
return;
} else if (nsHtml5Atoms::tr == name) {
- mode = NS_HTML5TREE_BUILDER_IN_ROW;
+ mode = IN_ROW;
return;
} else if (nsHtml5Atoms::tbody == name || nsHtml5Atoms::thead == name || nsHtml5Atoms::tfoot == name) {
- mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
+ mode = IN_TABLE_BODY;
return;
} else if (nsHtml5Atoms::caption == name) {
- mode = NS_HTML5TREE_BUILDER_IN_CAPTION;
+ mode = IN_CAPTION;
return;
} else if (nsHtml5Atoms::colgroup == name) {
- mode = NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP;
+ mode = IN_COLUMN_GROUP;
return;
} else if (nsHtml5Atoms::table == name) {
- mode = NS_HTML5TREE_BUILDER_IN_TABLE;
+ mode = IN_TABLE;
return;
} else if (kNameSpaceID_XHTML != ns) {
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
return;
} else if (nsHtml5Atoms::template_ == name) {
MOZ_ASSERT(templateModePtr >= 0);
@@ -3378,26 +3378,26 @@ nsHtml5TreeBuilder::resetTheInsertionMode()
return;
} else if (nsHtml5Atoms::head == name) {
if (name == contextName) {
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
} else {
- mode = NS_HTML5TREE_BUILDER_IN_HEAD;
+ mode = IN_HEAD;
}
return;
} else if (nsHtml5Atoms::body == name) {
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
return;
} else if (nsHtml5Atoms::frameset == name) {
- mode = NS_HTML5TREE_BUILDER_IN_FRAMESET;
+ mode = IN_FRAMESET;
return;
} else if (nsHtml5Atoms::html == name) {
if (!headPointer) {
- mode = NS_HTML5TREE_BUILDER_BEFORE_HEAD;
+ mode = BEFORE_HEAD;
} else {
- mode = NS_HTML5TREE_BUILDER_AFTER_HEAD;
+ mode = AFTER_HEAD;
}
return;
} else if (!i) {
- mode = framesetOk ? NS_HTML5TREE_BUILDER_FRAMESET_OK : NS_HTML5TREE_BUILDER_IN_BODY;
+ mode = framesetOk ? FRAMESET_OK : IN_BODY;
return;
}
}
@@ -3407,7 +3407,7 @@ void
nsHtml5TreeBuilder::implicitlyCloseP()
{
int32_t eltPos = findLastInButtonScope(nsHtml5Atoms::p);
- if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
+ if (eltPos == nsHtml5TreeBuilder::NOT_FOUND_ON_STACK) {
return;
}
generateImpliedEndTagsExceptFor(nsHtml5Atoms::p);
@@ -3777,7 +3777,7 @@ nsHtml5TreeBuilder::addAttributesToBody(nsHtml5HtmlAttributes* attributes)
{
if (currentPtr >= 1) {
nsHtml5StackNode* body = stack[1];
- if (body->getGroup() == NS_HTML5TREE_BUILDER_BODY) {
+ if (body->getGroup() == nsHtml5TreeBuilder::BODY) {
addAttributesToElement(body->node, attributes);
return true;
}
@@ -3795,7 +3795,7 @@ void
nsHtml5TreeBuilder::pushHeadPointerOntoStack()
{
MOZ_ASSERT(!!headPointer);
- MOZ_ASSERT(mode == NS_HTML5TREE_BUILDER_AFTER_HEAD);
+ MOZ_ASSERT(mode == AFTER_HEAD);
silentPush(new nsHtml5StackNode(nsHtml5ElementName::ELT_HEAD, headPointer));
}
@@ -3846,8 +3846,8 @@ nsHtml5TreeBuilder::reconstructTheActiveFormattingElements()
void
nsHtml5TreeBuilder::insertIntoFosterParent(nsIContentHandle* child)
{
- int32_t tablePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE);
- int32_t templatePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TEMPLATE);
+ int32_t tablePos = findLastOrRoot(nsHtml5TreeBuilder::TABLE);
+ int32_t templatePos = findLastOrRoot(nsHtml5TreeBuilder::TEMPLATE);
if (templatePos >= tablePos) {
appendElement(child, stack[templatePos]->node);
return;
@@ -3865,8 +3865,8 @@ nsHtml5TreeBuilder::createAndInsertFosterParentedElement(int32_t ns, nsIAtom* na
nsIContentHandle*
nsHtml5TreeBuilder::createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form)
{
- int32_t tablePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE);
- int32_t templatePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TEMPLATE);
+ int32_t tablePos = findLastOrRoot(nsHtml5TreeBuilder::TABLE);
+ int32_t templatePos = findLastOrRoot(nsHtml5TreeBuilder::TEMPLATE);
if (templatePos >= tablePos) {
nsIContentHandle* child = createElement(ns, name, attributes, form, stack[templatePos]->node);
appendElement(child, stack[templatePos]->node);
@@ -4241,7 +4241,7 @@ void
nsHtml5TreeBuilder::flushCharacters()
{
if (charBufferLen > 0) {
- if ((mode == NS_HTML5TREE_BUILDER_IN_TABLE || mode == NS_HTML5TREE_BUILDER_IN_TABLE_BODY || mode == NS_HTML5TREE_BUILDER_IN_ROW) && charBufferContainsNonWhitespace()) {
+ if ((mode == IN_TABLE || mode == IN_TABLE_BODY || mode == IN_ROW) && charBufferContainsNonWhitespace()) {
errNonSpaceInTable();
reconstructTheActiveFormattingElements();
if (!stack[currentPtr]->isFosterParenting()) {
@@ -4249,8 +4249,8 @@ nsHtml5TreeBuilder::flushCharacters()
charBufferLen = 0;
return;
}
- int32_t tablePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE);
- int32_t templatePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TEMPLATE);
+ int32_t tablePos = findLastOrRoot(nsHtml5TreeBuilder::TABLE);
+ int32_t templatePos = findLastOrRoot(nsHtml5TreeBuilder::TEMPLATE);
if (templatePos >= tablePos) {
appendCharacters(stack[templatePos]->node, charBuffer, 0, charBufferLen);
charBufferLen = 0;
diff --git a/parser/html/nsHtml5TreeBuilder.h b/parser/html/nsHtml5TreeBuilder.h
index 5b314a5ce..91ba79ee2 100644
--- a/parser/html/nsHtml5TreeBuilder.h
+++ b/parser/html/nsHtml5TreeBuilder.h
@@ -61,10 +61,10 @@
class nsHtml5StreamParser;
-class nsHtml5Tokenizer;
-class nsHtml5MetaScanner;
class nsHtml5AttributeName;
class nsHtml5ElementName;
+class nsHtml5Tokenizer;
+class nsHtml5MetaScanner;
class nsHtml5UTF16Buffer;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -74,7 +74,217 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
{
private:
static char16_t REPLACEMENT_CHARACTER[];
+ public:
+ static const int32_t OTHER = 0;
+
+ static const int32_t A = 1;
+
+ static const int32_t BASE = 2;
+
+ static const int32_t BODY = 3;
+
+ static const int32_t BR = 4;
+
+ static const int32_t BUTTON = 5;
+
+ static const int32_t CAPTION = 6;
+
+ static const int32_t COL = 7;
+
+ static const int32_t COLGROUP = 8;
+
+ static const int32_t FORM = 9;
+
+ static const int32_t FRAME = 10;
+
+ static const int32_t FRAMESET = 11;
+
+ static const int32_t IMAGE = 12;
+
+ static const int32_t INPUT = 13;
+
+ static const int32_t ISINDEX = 14;
+
+ static const int32_t LI = 15;
+
+ static const int32_t LINK_OR_BASEFONT_OR_BGSOUND = 16;
+
+ static const int32_t MATH = 17;
+
+ static const int32_t META = 18;
+
+ static const int32_t SVG = 19;
+
+ static const int32_t HEAD = 20;
+
+ static const int32_t HR = 22;
+
+ static const int32_t HTML = 23;
+
+ static const int32_t NOBR = 24;
+
+ static const int32_t NOFRAMES = 25;
+
+ static const int32_t NOSCRIPT = 26;
+
+ static const int32_t OPTGROUP = 27;
+
+ static const int32_t OPTION = 28;
+
+ static const int32_t P = 29;
+
+ static const int32_t PLAINTEXT = 30;
+
+ static const int32_t SCRIPT = 31;
+
+ static const int32_t SELECT = 32;
+
+ static const int32_t STYLE = 33;
+
+ static const int32_t TABLE = 34;
+
+ static const int32_t TEXTAREA = 35;
+
+ static const int32_t TITLE = 36;
+
+ static const int32_t TR = 37;
+
+ static const int32_t XMP = 38;
+
+ static const int32_t TBODY_OR_THEAD_OR_TFOOT = 39;
+
+ static const int32_t TD_OR_TH = 40;
+
+ static const int32_t DD_OR_DT = 41;
+
+ static const int32_t H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 = 42;
+
+ static const int32_t MARQUEE_OR_APPLET = 43;
+
+ static const int32_t PRE_OR_LISTING = 44;
+
+ static const int32_t B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U = 45;
+
+ static const int32_t UL_OR_OL_OR_DL = 46;
+
+ static const int32_t IFRAME = 47;
+
+ static const int32_t EMBED = 48;
+
+ static const int32_t AREA_OR_WBR = 49;
+
+ static const int32_t DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU = 50;
+
+ static const int32_t ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY = 51;
+
+ static const int32_t RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR = 52;
+
+ static const int32_t RB_OR_RTC = 53;
+
+ static const int32_t PARAM_OR_SOURCE_OR_TRACK = 55;
+
+ static const int32_t MGLYPH_OR_MALIGNMARK = 56;
+
+ static const int32_t MI_MO_MN_MS_MTEXT = 57;
+
+ static const int32_t ANNOTATION_XML = 58;
+
+ static const int32_t FOREIGNOBJECT_OR_DESC = 59;
+
+ static const int32_t NOEMBED = 60;
+
+ static const int32_t FIELDSET = 61;
+
+ static const int32_t OUTPUT = 62;
+
+ static const int32_t OBJECT = 63;
+
+ static const int32_t FONT = 64;
+
+ static const int32_t KEYGEN = 65;
+
+ static const int32_t MENUITEM = 66;
+
+ static const int32_t TEMPLATE = 67;
+
+ static const int32_t IMG = 68;
+
+ static const int32_t RT_OR_RP = 69;
+
+ private:
+ static const int32_t IN_ROW = 0;
+
+ static const int32_t IN_TABLE_BODY = 1;
+
+ static const int32_t IN_TABLE = 2;
+
+ static const int32_t IN_CAPTION = 3;
+
+ static const int32_t IN_CELL = 4;
+
+ static const int32_t FRAMESET_OK = 5;
+
+ static const int32_t IN_BODY = 6;
+
+ static const int32_t IN_HEAD = 7;
+
+ static const int32_t IN_HEAD_NOSCRIPT = 8;
+
+ static const int32_t IN_COLUMN_GROUP = 9;
+
+ static const int32_t IN_SELECT_IN_TABLE = 10;
+
+ static const int32_t IN_SELECT = 11;
+
+ static const int32_t AFTER_BODY = 12;
+
+ static const int32_t IN_FRAMESET = 13;
+
+ static const int32_t AFTER_FRAMESET = 14;
+
+ static const int32_t INITIAL = 15;
+
+ static const int32_t BEFORE_HTML = 16;
+
+ static const int32_t BEFORE_HEAD = 17;
+
+ static const int32_t AFTER_HEAD = 18;
+
+ static const int32_t AFTER_AFTER_BODY = 19;
+
+ static const int32_t AFTER_AFTER_FRAMESET = 20;
+
+ static const int32_t TEXT = 21;
+
+ static const int32_t IN_TEMPLATE = 22;
+
+ static const int32_t CHARSET_INITIAL = 0;
+
+ static const int32_t CHARSET_C = 1;
+
+ static const int32_t CHARSET_H = 2;
+
+ static const int32_t CHARSET_A = 3;
+
+ static const int32_t CHARSET_R = 4;
+
+ static const int32_t CHARSET_S = 5;
+
+ static const int32_t CHARSET_E = 6;
+
+ static const int32_t CHARSET_T = 7;
+
+ static const int32_t CHARSET_EQUALS = 8;
+
+ static const int32_t CHARSET_SINGLE_QUOTED = 9;
+
+ static const int32_t CHARSET_DOUBLE_QUOTED = 10;
+
+ static const int32_t CHARSET_UNQUOTED = 11;
+
static staticJArray<const char*,int32_t> QUIRKY_PUBLIC_IDS;
+ static const int32_t NOT_FOUND_ON_STACK = INT32_MAX;
+
int32_t mode;
int32_t originalMode;
bool framesetOk;
@@ -275,111 +485,5 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
#include "nsHtml5TreeBuilderHSupplement.h"
};
-#define NS_HTML5TREE_BUILDER_OTHER 0
-#define NS_HTML5TREE_BUILDER_A 1
-#define NS_HTML5TREE_BUILDER_BASE 2
-#define NS_HTML5TREE_BUILDER_BODY 3
-#define NS_HTML5TREE_BUILDER_BR 4
-#define NS_HTML5TREE_BUILDER_BUTTON 5
-#define NS_HTML5TREE_BUILDER_CAPTION 6
-#define NS_HTML5TREE_BUILDER_COL 7
-#define NS_HTML5TREE_BUILDER_COLGROUP 8
-#define NS_HTML5TREE_BUILDER_FORM 9
-#define NS_HTML5TREE_BUILDER_FRAME 10
-#define NS_HTML5TREE_BUILDER_FRAMESET 11
-#define NS_HTML5TREE_BUILDER_IMAGE 12
-#define NS_HTML5TREE_BUILDER_INPUT 13
-#define NS_HTML5TREE_BUILDER_ISINDEX 14
-#define NS_HTML5TREE_BUILDER_LI 15
-#define NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND 16
-#define NS_HTML5TREE_BUILDER_MATH 17
-#define NS_HTML5TREE_BUILDER_META 18
-#define NS_HTML5TREE_BUILDER_SVG 19
-#define NS_HTML5TREE_BUILDER_HEAD 20
-#define NS_HTML5TREE_BUILDER_HR 22
-#define NS_HTML5TREE_BUILDER_HTML 23
-#define NS_HTML5TREE_BUILDER_NOBR 24
-#define NS_HTML5TREE_BUILDER_NOFRAMES 25
-#define NS_HTML5TREE_BUILDER_NOSCRIPT 26
-#define NS_HTML5TREE_BUILDER_OPTGROUP 27
-#define NS_HTML5TREE_BUILDER_OPTION 28
-#define NS_HTML5TREE_BUILDER_P 29
-#define NS_HTML5TREE_BUILDER_PLAINTEXT 30
-#define NS_HTML5TREE_BUILDER_SCRIPT 31
-#define NS_HTML5TREE_BUILDER_SELECT 32
-#define NS_HTML5TREE_BUILDER_STYLE 33
-#define NS_HTML5TREE_BUILDER_TABLE 34
-#define NS_HTML5TREE_BUILDER_TEXTAREA 35
-#define NS_HTML5TREE_BUILDER_TITLE 36
-#define NS_HTML5TREE_BUILDER_TR 37
-#define NS_HTML5TREE_BUILDER_XMP 38
-#define NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT 39
-#define NS_HTML5TREE_BUILDER_TD_OR_TH 40
-#define NS_HTML5TREE_BUILDER_DD_OR_DT 41
-#define NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 42
-#define NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET 43
-#define NS_HTML5TREE_BUILDER_PRE_OR_LISTING 44
-#define NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U 45
-#define NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL 46
-#define NS_HTML5TREE_BUILDER_IFRAME 47
-#define NS_HTML5TREE_BUILDER_EMBED 48
-#define NS_HTML5TREE_BUILDER_AREA_OR_WBR 49
-#define NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU 50
-#define NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY 51
-#define NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR 52
-#define NS_HTML5TREE_BUILDER_RB_OR_RTC 53
-#define NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK 55
-#define NS_HTML5TREE_BUILDER_MGLYPH_OR_MALIGNMARK 56
-#define NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT 57
-#define NS_HTML5TREE_BUILDER_ANNOTATION_XML 58
-#define NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC 59
-#define NS_HTML5TREE_BUILDER_NOEMBED 60
-#define NS_HTML5TREE_BUILDER_FIELDSET 61
-#define NS_HTML5TREE_BUILDER_OUTPUT 62
-#define NS_HTML5TREE_BUILDER_OBJECT 63
-#define NS_HTML5TREE_BUILDER_FONT 64
-#define NS_HTML5TREE_BUILDER_KEYGEN 65
-#define NS_HTML5TREE_BUILDER_MENUITEM 66
-#define NS_HTML5TREE_BUILDER_TEMPLATE 67
-#define NS_HTML5TREE_BUILDER_IMG 68
-#define NS_HTML5TREE_BUILDER_RT_OR_RP 69
-#define NS_HTML5TREE_BUILDER_IN_ROW 0
-#define NS_HTML5TREE_BUILDER_IN_TABLE_BODY 1
-#define NS_HTML5TREE_BUILDER_IN_TABLE 2
-#define NS_HTML5TREE_BUILDER_IN_CAPTION 3
-#define NS_HTML5TREE_BUILDER_IN_CELL 4
-#define NS_HTML5TREE_BUILDER_FRAMESET_OK 5
-#define NS_HTML5TREE_BUILDER_IN_BODY 6
-#define NS_HTML5TREE_BUILDER_IN_HEAD 7
-#define NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT 8
-#define NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP 9
-#define NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE 10
-#define NS_HTML5TREE_BUILDER_IN_SELECT 11
-#define NS_HTML5TREE_BUILDER_AFTER_BODY 12
-#define NS_HTML5TREE_BUILDER_IN_FRAMESET 13
-#define NS_HTML5TREE_BUILDER_AFTER_FRAMESET 14
-#define NS_HTML5TREE_BUILDER_INITIAL 15
-#define NS_HTML5TREE_BUILDER_BEFORE_HTML 16
-#define NS_HTML5TREE_BUILDER_BEFORE_HEAD 17
-#define NS_HTML5TREE_BUILDER_AFTER_HEAD 18
-#define NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY 19
-#define NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET 20
-#define NS_HTML5TREE_BUILDER_TEXT 21
-#define NS_HTML5TREE_BUILDER_IN_TEMPLATE 22
-#define NS_HTML5TREE_BUILDER_CHARSET_INITIAL 0
-#define NS_HTML5TREE_BUILDER_CHARSET_C 1
-#define NS_HTML5TREE_BUILDER_CHARSET_H 2
-#define NS_HTML5TREE_BUILDER_CHARSET_A 3
-#define NS_HTML5TREE_BUILDER_CHARSET_R 4
-#define NS_HTML5TREE_BUILDER_CHARSET_S 5
-#define NS_HTML5TREE_BUILDER_CHARSET_E 6
-#define NS_HTML5TREE_BUILDER_CHARSET_T 7
-#define NS_HTML5TREE_BUILDER_CHARSET_EQUALS 8
-#define NS_HTML5TREE_BUILDER_CHARSET_SINGLE_QUOTED 9
-#define NS_HTML5TREE_BUILDER_CHARSET_DOUBLE_QUOTED 10
-#define NS_HTML5TREE_BUILDER_CHARSET_UNQUOTED 11
-#define NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK INT32_MAX
-
-
#endif
diff --git a/parser/html/nsHtml5UTF16Buffer.cpp b/parser/html/nsHtml5UTF16Buffer.cpp
index d2f8b9832..81bdee6e3 100644
--- a/parser/html/nsHtml5UTF16Buffer.cpp
+++ b/parser/html/nsHtml5UTF16Buffer.cpp
@@ -43,12 +43,13 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
+#include "nsHtml5AttributeName.h"
+#include "nsHtml5ElementName.h"
#include "nsHtml5Tokenizer.h"
#include "nsHtml5TreeBuilder.h"
#include "nsHtml5MetaScanner.h"
-#include "nsHtml5AttributeName.h"
-#include "nsHtml5ElementName.h"
#include "nsHtml5StackNode.h"
#include "nsHtml5StateSnapshot.h"
#include "nsHtml5Portability.h"
diff --git a/parser/html/nsHtml5UTF16Buffer.h b/parser/html/nsHtml5UTF16Buffer.h
index 6214d6d07..a76a4b7b7 100644
--- a/parser/html/nsHtml5UTF16Buffer.h
+++ b/parser/html/nsHtml5UTF16Buffer.h
@@ -44,14 +44,15 @@
#include "nsIUnicodeDecoder.h"
#include "nsHtml5Macros.h"
#include "nsIContentHandle.h"
+#include "nsHtml5Portability.h"
class nsHtml5StreamParser;
+class nsHtml5AttributeName;
+class nsHtml5ElementName;
class nsHtml5Tokenizer;
class nsHtml5TreeBuilder;
class nsHtml5MetaScanner;
-class nsHtml5AttributeName;
-class nsHtml5ElementName;
class nsHtml5StateSnapshot;
class nsHtml5Portability;
@@ -77,7 +78,5 @@ class nsHtml5UTF16Buffer
#include "nsHtml5UTF16BufferHSupplement.h"
};
-
-
#endif