diff --git a/parser/html/javasrc/TreeBuilder.java b/parser/html/javasrc/TreeBuilder.java
index 16c64d56099d..73bc8629db74 100644
--- a/parser/html/javasrc/TreeBuilder.java
+++ b/parser/html/javasrc/TreeBuilder.java
@@ -6218,6 +6218,7 @@ public abstract class TreeBuilder implements TokenHandler,
@SuppressWarnings("unchecked") public void loadState(
TreeBuilderState snapshot, Interner interner)
throws SAXException {
+ // CPPONLY: mCurrentHtmlScriptIsAsyncOrDefer = false;
StackNode[] stackCopy = snapshot.getStack();
int stackLen = snapshot.getStackLength();
StackNode[] listCopy = snapshot.getListOfActiveFormattingElements();
diff --git a/parser/html/nsHtml5AttributeName.h b/parser/html/nsHtml5AttributeName.h
index b945fbc5c57f..92284ef1240d 100644
--- a/parser/html/nsHtml5AttributeName.h
+++ b/parser/html/nsHtml5AttributeName.h
@@ -58,15 +58,12 @@ class nsHtml5AttributeName
{
public:
static int32_t* ALL_NO_NS;
-
private:
static int32_t* XMLNS_NS;
static int32_t* XML_NS;
static int32_t* XLINK_NS;
-
public:
static nsAtom** ALL_NO_PREFIX;
-
private:
static nsAtom** XMLNS_PREFIX;
static nsAtom** XLINK_PREFIX;
@@ -74,7 +71,6 @@ private:
static nsAtom** SVG_DIFFERENT(nsAtom* name, nsAtom* camel);
static nsAtom** MATH_DIFFERENT(nsAtom* name, nsAtom* camel);
static nsAtom** COLONIFIED_LOCAL(nsAtom* name, nsAtom* suffix);
-
public:
static nsAtom** SAME_LOCAL(nsAtom* name);
inline static int32_t levelOrderBinarySearch(jArray data,
@@ -162,7 +158,6 @@ private:
nsAtom** prefix;
bool custom;
nsHtml5AttributeName(int32_t* uri, nsAtom** local, nsAtom** prefix);
-
public:
nsHtml5AttributeName();
inline bool isInterned() { return !custom; }
@@ -673,11 +668,9 @@ public:
static nsHtml5AttributeName* ATTR_FY;
static nsHtml5AttributeName* ATTR_RY;
static nsHtml5AttributeName* ATTR_REFY;
-
private:
static nsHtml5AttributeName** ATTRIBUTE_NAMES;
static staticJArray ATTRIBUTE_HASHES;
-
public:
static void initializeStatics();
static void releaseStatics();
diff --git a/parser/html/nsHtml5ElementName.h b/parser/html/nsHtml5ElementName.h
index f38f7ec03716..924ef02732a9 100644
--- a/parser/html/nsHtml5ElementName.h
+++ b/parser/html/nsHtml5ElementName.h
@@ -80,7 +80,6 @@ private:
nsAtom* camelCaseName;
mozilla::dom::HTMLContentCreatorFunction htmlCreator;
mozilla::dom::SVGContentCreatorFunction svgCreator;
-
public:
int32_t flags;
inline nsAtom* getName() { return name; }
@@ -405,11 +404,9 @@ public:
static nsHtml5ElementName* ELT_RUBY;
static nsHtml5ElementName* ELT_SUMMARY;
static nsHtml5ElementName* ELT_TBODY;
-
private:
static nsHtml5ElementName** ELEMENT_NAMES;
static staticJArray ELEMENT_HASHES;
-
public:
static void initializeStatics();
static void releaseStatics();
diff --git a/parser/html/nsHtml5MetaScanner.h b/parser/html/nsHtml5MetaScanner.h
index c10f8db3be36..4fba26d785ed 100644
--- a/parser/html/nsHtml5MetaScanner.h
+++ b/parser/html/nsHtml5MetaScanner.h
@@ -120,17 +120,14 @@ private:
protected:
nsHtml5ByteReadable* readable;
-
private:
int32_t metaState;
int32_t contentIndex;
int32_t charsetIndex;
int32_t httpEquivIndex;
int32_t contentTypeIndex;
-
protected:
int32_t stateSave;
-
private:
int32_t strBufLen;
autoJArray strBuf;
@@ -138,14 +135,11 @@ private:
nsHtml5String charset;
int32_t httpEquivState;
nsHtml5TreeBuilder* treeBuilder;
-
public:
explicit nsHtml5MetaScanner(nsHtml5TreeBuilder* tb);
~nsHtml5MetaScanner();
-
protected:
void stateLoop(int32_t state);
-
private:
void handleCharInAttributeValue(int32_t c);
inline int32_t toAsciiLowerCase(int32_t c)
@@ -160,10 +154,8 @@ private:
void handleAttributeValue();
bool handleTag();
bool handleTagInner();
-
protected:
bool tryCharset(nsHtml5String encoding);
-
public:
static void initializeStatics();
static void releaseStatics();
diff --git a/parser/html/nsHtml5StackNode.h b/parser/html/nsHtml5StackNode.h
index 2b1726be1a72..4c242674b9d0 100644
--- a/parser/html/nsHtml5StackNode.h
+++ b/parser/html/nsHtml5StackNode.h
@@ -66,11 +66,9 @@ public:
int32_t ns;
nsIContentHandle* node;
nsHtml5HtmlAttributes* attributes;
-
private:
int32_t refcount;
mozilla::dom::HTMLContentCreatorFunction htmlCreator;
-
public:
inline int32_t getFlags() { return flags; }
@@ -106,7 +104,6 @@ public:
private:
static int32_t prepareSvgFlags(int32_t flags);
static int32_t prepareMathFlags(int32_t flags, bool markAsIntegrationPoint);
-
public:
~nsHtml5StackNode();
void dropAttributes();
diff --git a/parser/html/nsHtml5StateSnapshot.h b/parser/html/nsHtml5StateSnapshot.h
index 8d58470ed321..d1d9b0743f7b 100644
--- a/parser/html/nsHtml5StateSnapshot.h
+++ b/parser/html/nsHtml5StateSnapshot.h
@@ -68,7 +68,6 @@ private:
bool framesetOk;
bool needToDropLF;
bool quirks;
-
public:
nsHtml5StateSnapshot(
jArray stack,
diff --git a/parser/html/nsHtml5Tokenizer.h b/parser/html/nsHtml5Tokenizer.h
index 32b002fab453..d7bda0a35c61 100644
--- a/parser/html/nsHtml5Tokenizer.h
+++ b/parser/html/nsHtml5Tokenizer.h
@@ -235,19 +235,15 @@ private:
static staticJArray NOEMBED_ARR;
static staticJArray NOSCRIPT_ARR;
static staticJArray NOFRAMES_ARR;
-
protected:
nsHtml5TreeBuilder* tokenHandler;
nsHtml5StreamParser* encodingDeclarationHandler;
bool lastCR;
int32_t stateSave;
-
private:
int32_t returnStateSave;
-
protected:
int32_t index;
-
private:
bool forceQuirks;
char16_t additional;
@@ -257,16 +253,12 @@ private:
int32_t hi;
int32_t candidate;
int32_t charRefBufMark;
-
protected:
int32_t value;
-
private:
bool seenDigits;
-
protected:
int32_t cstart;
-
private:
nsHtml5String publicId;
nsHtml5String systemId;
@@ -276,24 +268,18 @@ private:
int32_t charRefBufLen;
autoJArray bmpChar;
autoJArray astralChar;
-
protected:
nsHtml5ElementName* endTagExpectation;
-
private:
jArray endTagExpectationAsArray;
-
protected:
bool endTag;
-
private:
bool containsHyphen;
nsHtml5ElementName* tagName;
nsHtml5ElementName* nonInternedTagName;
-
protected:
nsHtml5AttributeName* attributeName;
-
private:
nsHtml5AttributeName* nonInternedAttributeName;
nsAtom* doctypeName;
@@ -302,16 +288,13 @@ private:
nsHtml5HtmlAttributes* attributes;
bool newAttributesEachTime;
bool shouldSuspend;
-
protected:
bool confident;
-
private:
int32_t line;
int32_t attributeLine;
nsHtml5AtomTable* interner;
bool viewingXmlSource;
-
public:
nsHtml5Tokenizer(nsHtml5TreeBuilder* tokenHandler, bool viewingXmlSource);
void setInterner(nsHtml5AtomTable* interner);
@@ -324,13 +307,11 @@ public:
private:
void endTagExpectationToArray();
-
public:
void setLineNumber(int32_t line);
inline int32_t getLineNumber() { return line; }
nsHtml5HtmlAttributes* emptyAttributes();
-
private:
inline void appendCharRefBuf(char16_t c)
{
@@ -369,7 +350,6 @@ private:
protected:
nsHtml5String strBufToString();
-
private:
void strBufToDoctypeName();
void emitStrBuf();
@@ -389,21 +369,17 @@ private:
}
void emitComment(int32_t provisionalHyphens, int32_t pos);
-
protected:
void flushChars(char16_t* buf, int32_t pos);
-
private:
void strBufToElementNameString();
int32_t emitCurrentTagToken(bool selfClosing, int32_t pos);
void attributeNameComplete();
void addAttributeWithoutValue();
void addAttributeWithValue();
-
public:
void start();
bool tokenizeBuffer(nsHtml5UTF16Buffer* buffer);
-
private:
template
int32_t stateLoop(int32_t state,
@@ -455,23 +431,18 @@ private:
void bogusDoctype();
void bogusDoctypeWithoutQuirks();
void handleNcrValue(int32_t returnState);
-
public:
void eof();
-
private:
void emitDoctypeToken(int32_t pos);
-
protected:
inline char16_t checkChar(char16_t* buf, int32_t pos) { return buf[pos]; }
public:
bool internalEncodingDeclaration(nsHtml5String internalCharset);
-
private:
void emitOrAppendTwo(const char16_t* val, int32_t returnState);
void emitOrAppendOne(const char16_t* val, int32_t returnState);
-
public:
void end();
void requestSuspension();
diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp
index 30b792916cee..9ed3cd391935 100644
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -4928,6 +4928,7 @@ void
nsHtml5TreeBuilder::loadState(nsAHtml5TreeBuilderState* snapshot,
nsHtml5AtomTable* interner)
{
+ mCurrentHtmlScriptIsAsyncOrDefer = false;
jArray stackCopy = snapshot->getStack();
int32_t stackLen = snapshot->getStackLength();
jArray listCopy =
diff --git a/parser/html/nsHtml5TreeBuilder.h b/parser/html/nsHtml5TreeBuilder.h
index cb2156c6310d..5ece486a2316 100644
--- a/parser/html/nsHtml5TreeBuilder.h
+++ b/parser/html/nsHtml5TreeBuilder.h
@@ -71,7 +71,6 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
{
private:
static char16_t REPLACEMENT_CHARACTER[];
-
public:
static const int32_t OTHER = 0;
@@ -288,10 +287,8 @@ private:
int32_t mode;
int32_t originalMode;
bool framesetOk;
-
protected:
nsHtml5Tokenizer* tokenizer;
-
private:
bool scriptingEnabled;
bool needToDropLF;
@@ -311,11 +308,9 @@ private:
nsIContentHandle* formPointer;
nsIContentHandle* headPointer;
nsIContentHandle* deepTreeSurrogateParent;
-
protected:
autoJArray charBuffer;
int32_t charBufferLen;
-
private:
bool quirks;
bool isSrcdocDocument;
@@ -362,17 +357,14 @@ private:
bool isTemplateContents();
bool isTemplateModeStackEmpty();
bool isSpecialParentInForeign(nsHtml5StackNode* stackNode);
-
public:
static nsHtml5String extractCharsetFromContent(nsHtml5String attributeValue,
nsHtml5TreeBuilder* tb);
private:
void checkMetaCharset(nsHtml5HtmlAttributes* attributes);
-
public:
void endTag(nsHtml5ElementName* elementName);
-
private:
void endTagTemplateInHead();
int32_t findLastInTableScopeOrRootTemplateTbodyTheadTfoot();
@@ -435,10 +427,8 @@ private:
void addAttributesToHtml(nsHtml5HtmlAttributes* attributes);
void pushHeadPointerOntoStack();
void reconstructTheActiveFormattingElements();
-
public:
void notifyUnusedStackNode(int32_t idxInStackNodes);
-
private:
nsHtml5StackNode* getUnusedStackNode();
nsHtml5StackNode* createStackNode(
@@ -521,7 +511,6 @@ private:
void appendVoidInputToCurrent(nsHtml5HtmlAttributes* attributes,
nsIContentHandle* form);
void appendVoidFormToCurrent(nsHtml5HtmlAttributes* attributes);
-
protected:
void accumulateCharacters(const char16_t* buf, int32_t start, int32_t length);
void requestSuspension();
@@ -579,14 +568,12 @@ protected:
nsHtml5String systemIdentifier);
void elementPushed(int32_t ns, nsAtom* name, nsIContentHandle* node);
void elementPopped(int32_t ns, nsAtom* name, nsIContentHandle* node);
-
public:
inline bool cdataSectionAllowed() { return isInForeign(); }
private:
bool isInForeign();
bool isInForeignButNotHtmlOrMathTextIntegrationPoint();
-
public:
void setFragmentContext(nsAtom* context,
int32_t ns,
@@ -595,16 +582,13 @@ public:
protected:
nsIContentHandle* currentNode();
-
public:
bool isScriptingEnabled();
void setScriptingEnabled(bool scriptingEnabled);
void setIsSrcdocDocument(bool isSrcdocDocument);
void flushCharacters();
-
private:
bool charBufferContainsNonWhitespace();
-
public:
nsAHtml5TreeBuilderState* newSnapshot();
bool snapshotMatches(nsAHtml5TreeBuilderState* snapshot);
diff --git a/parser/html/nsHtml5UTF16Buffer.h b/parser/html/nsHtml5UTF16Buffer.h
index b748014dbc88..686cfdf68d41 100644
--- a/parser/html/nsHtml5UTF16Buffer.h
+++ b/parser/html/nsHtml5UTF16Buffer.h
@@ -60,7 +60,6 @@ private:
char16_t* buffer;
int32_t start;
int32_t end;
-
public:
int32_t getStart();
void setStart(int32_t start);