Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | /* |
michael@0 | 2 | * Copyright (c) 2007 Henri Sivonen |
michael@0 | 3 | * Copyright (c) 2007-2011 Mozilla Foundation |
michael@0 | 4 | * Portions of comments Copyright 2004-2008 Apple Computer, Inc., Mozilla |
michael@0 | 5 | * Foundation, and Opera Software ASA. |
michael@0 | 6 | * |
michael@0 | 7 | * Permission is hereby granted, free of charge, to any person obtaining a |
michael@0 | 8 | * copy of this software and associated documentation files (the "Software"), |
michael@0 | 9 | * to deal in the Software without restriction, including without limitation |
michael@0 | 10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
michael@0 | 11 | * and/or sell copies of the Software, and to permit persons to whom the |
michael@0 | 12 | * Software is furnished to do so, subject to the following conditions: |
michael@0 | 13 | * |
michael@0 | 14 | * The above copyright notice and this permission notice shall be included in |
michael@0 | 15 | * all copies or substantial portions of the Software. |
michael@0 | 16 | * |
michael@0 | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
michael@0 | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
michael@0 | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
michael@0 | 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
michael@0 | 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
michael@0 | 22 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
michael@0 | 23 | * DEALINGS IN THE SOFTWARE. |
michael@0 | 24 | */ |
michael@0 | 25 | |
michael@0 | 26 | /* |
michael@0 | 27 | * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. |
michael@0 | 28 | * Please edit TreeBuilder.java instead and regenerate. |
michael@0 | 29 | */ |
michael@0 | 30 | |
michael@0 | 31 | #ifndef nsHtml5TreeBuilder_h |
michael@0 | 32 | #define nsHtml5TreeBuilder_h |
michael@0 | 33 | |
michael@0 | 34 | #include "nsContentUtils.h" |
michael@0 | 35 | #include "nsIAtom.h" |
michael@0 | 36 | #include "nsHtml5AtomTable.h" |
michael@0 | 37 | #include "nsITimer.h" |
michael@0 | 38 | #include "nsString.h" |
michael@0 | 39 | #include "nsNameSpaceManager.h" |
michael@0 | 40 | #include "nsIContent.h" |
michael@0 | 41 | #include "nsTraceRefcnt.h" |
michael@0 | 42 | #include "jArray.h" |
michael@0 | 43 | #include "nsHtml5DocumentMode.h" |
michael@0 | 44 | #include "nsHtml5ArrayCopy.h" |
michael@0 | 45 | #include "nsHtml5Parser.h" |
michael@0 | 46 | #include "nsHtml5Atoms.h" |
michael@0 | 47 | #include "nsHtml5TreeOperation.h" |
michael@0 | 48 | #include "nsHtml5PendingNotification.h" |
michael@0 | 49 | #include "nsHtml5StateSnapshot.h" |
michael@0 | 50 | #include "nsHtml5StackNode.h" |
michael@0 | 51 | #include "nsHtml5TreeOpExecutor.h" |
michael@0 | 52 | #include "nsHtml5StreamParser.h" |
michael@0 | 53 | #include "nsAHtml5TreeBuilderState.h" |
michael@0 | 54 | #include "nsHtml5Highlighter.h" |
michael@0 | 55 | #include "nsHtml5PlainTextUtils.h" |
michael@0 | 56 | #include "nsHtml5ViewSourceUtils.h" |
michael@0 | 57 | #include "mozilla/Likely.h" |
michael@0 | 58 | #include "nsIContentHandle.h" |
michael@0 | 59 | #include "nsHtml5OplessBuilder.h" |
michael@0 | 60 | |
michael@0 | 61 | class nsHtml5StreamParser; |
michael@0 | 62 | |
michael@0 | 63 | class nsHtml5Tokenizer; |
michael@0 | 64 | class nsHtml5MetaScanner; |
michael@0 | 65 | class nsHtml5AttributeName; |
michael@0 | 66 | class nsHtml5ElementName; |
michael@0 | 67 | class nsHtml5HtmlAttributes; |
michael@0 | 68 | class nsHtml5UTF16Buffer; |
michael@0 | 69 | class nsHtml5StateSnapshot; |
michael@0 | 70 | class nsHtml5Portability; |
michael@0 | 71 | |
michael@0 | 72 | |
michael@0 | 73 | class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState |
michael@0 | 74 | { |
michael@0 | 75 | private: |
michael@0 | 76 | static char16_t REPLACEMENT_CHARACTER[]; |
michael@0 | 77 | static staticJArray<const char*,int32_t> QUIRKY_PUBLIC_IDS; |
michael@0 | 78 | int32_t mode; |
michael@0 | 79 | int32_t originalMode; |
michael@0 | 80 | bool framesetOk; |
michael@0 | 81 | protected: |
michael@0 | 82 | nsHtml5Tokenizer* tokenizer; |
michael@0 | 83 | private: |
michael@0 | 84 | bool scriptingEnabled; |
michael@0 | 85 | bool needToDropLF; |
michael@0 | 86 | bool fragment; |
michael@0 | 87 | nsIAtom* contextName; |
michael@0 | 88 | int32_t contextNamespace; |
michael@0 | 89 | nsIContentHandle* contextNode; |
michael@0 | 90 | autoJArray<int32_t,int32_t> templateModeStack; |
michael@0 | 91 | int32_t templateModePtr; |
michael@0 | 92 | autoJArray<nsHtml5StackNode*,int32_t> stack; |
michael@0 | 93 | int32_t currentPtr; |
michael@0 | 94 | autoJArray<nsHtml5StackNode*,int32_t> listOfActiveFormattingElements; |
michael@0 | 95 | int32_t listPtr; |
michael@0 | 96 | nsIContentHandle* formPointer; |
michael@0 | 97 | nsIContentHandle* headPointer; |
michael@0 | 98 | nsIContentHandle* deepTreeSurrogateParent; |
michael@0 | 99 | protected: |
michael@0 | 100 | autoJArray<char16_t,int32_t> charBuffer; |
michael@0 | 101 | int32_t charBufferLen; |
michael@0 | 102 | private: |
michael@0 | 103 | bool quirks; |
michael@0 | 104 | bool isSrcdocDocument; |
michael@0 | 105 | public: |
michael@0 | 106 | void startTokenization(nsHtml5Tokenizer* self); |
michael@0 | 107 | void doctype(nsIAtom* name, nsString* publicIdentifier, nsString* systemIdentifier, bool forceQuirks); |
michael@0 | 108 | void comment(char16_t* buf, int32_t start, int32_t length); |
michael@0 | 109 | void characters(const char16_t* buf, int32_t start, int32_t length); |
michael@0 | 110 | void zeroOriginatingReplacementCharacter(); |
michael@0 | 111 | void eof(); |
michael@0 | 112 | void endTokenization(); |
michael@0 | 113 | void startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, bool selfClosing); |
michael@0 | 114 | private: |
michael@0 | 115 | void startTagTitleInHead(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 116 | void startTagGenericRawText(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 117 | void startTagScriptInHead(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 118 | void startTagTemplateInHead(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 119 | bool isTemplateContents(); |
michael@0 | 120 | bool isTemplateModeStackEmpty(); |
michael@0 | 121 | bool isSpecialParentInForeign(nsHtml5StackNode* stackNode); |
michael@0 | 122 | public: |
michael@0 | 123 | static nsString* extractCharsetFromContent(nsString* attributeValue); |
michael@0 | 124 | private: |
michael@0 | 125 | void checkMetaCharset(nsHtml5HtmlAttributes* attributes); |
michael@0 | 126 | public: |
michael@0 | 127 | void endTag(nsHtml5ElementName* elementName); |
michael@0 | 128 | private: |
michael@0 | 129 | void endTagTemplateInHead(); |
michael@0 | 130 | int32_t findLastInTableScopeOrRootTemplateTbodyTheadTfoot(); |
michael@0 | 131 | int32_t findLast(nsIAtom* name); |
michael@0 | 132 | int32_t findLastInTableScope(nsIAtom* name); |
michael@0 | 133 | int32_t findLastInButtonScope(nsIAtom* name); |
michael@0 | 134 | int32_t findLastInScope(nsIAtom* name); |
michael@0 | 135 | int32_t findLastInListScope(nsIAtom* name); |
michael@0 | 136 | int32_t findLastInScopeHn(); |
michael@0 | 137 | void generateImpliedEndTagsExceptFor(nsIAtom* name); |
michael@0 | 138 | void generateImpliedEndTags(); |
michael@0 | 139 | bool isSecondOnStackBody(); |
michael@0 | 140 | void documentModeInternal(nsHtml5DocumentMode m, nsString* publicIdentifier, nsString* systemIdentifier, bool html4SpecificAdditionalErrorChecks); |
michael@0 | 141 | bool isAlmostStandards(nsString* publicIdentifier, nsString* systemIdentifier); |
michael@0 | 142 | bool isQuirky(nsIAtom* name, nsString* publicIdentifier, nsString* systemIdentifier, bool forceQuirks); |
michael@0 | 143 | void closeTheCell(int32_t eltPos); |
michael@0 | 144 | int32_t findLastInTableScopeTdTh(); |
michael@0 | 145 | void clearStackBackTo(int32_t eltPos); |
michael@0 | 146 | void resetTheInsertionMode(); |
michael@0 | 147 | void implicitlyCloseP(); |
michael@0 | 148 | bool debugOnlyClearLastStackSlot(); |
michael@0 | 149 | bool debugOnlyClearLastListSlot(); |
michael@0 | 150 | void pushTemplateMode(int32_t mode); |
michael@0 | 151 | void push(nsHtml5StackNode* node); |
michael@0 | 152 | void silentPush(nsHtml5StackNode* node); |
michael@0 | 153 | void append(nsHtml5StackNode* node); |
michael@0 | 154 | inline void insertMarker() |
michael@0 | 155 | { |
michael@0 | 156 | append(nullptr); |
michael@0 | 157 | } |
michael@0 | 158 | |
michael@0 | 159 | void clearTheListOfActiveFormattingElementsUpToTheLastMarker(); |
michael@0 | 160 | inline bool isCurrent(nsIAtom* name) |
michael@0 | 161 | { |
michael@0 | 162 | return stack[currentPtr]->ns == kNameSpaceID_XHTML && name == stack[currentPtr]->name; |
michael@0 | 163 | } |
michael@0 | 164 | |
michael@0 | 165 | void removeFromStack(int32_t pos); |
michael@0 | 166 | void removeFromStack(nsHtml5StackNode* node); |
michael@0 | 167 | void removeFromListOfActiveFormattingElements(int32_t pos); |
michael@0 | 168 | bool adoptionAgencyEndTag(nsIAtom* name); |
michael@0 | 169 | void insertIntoStack(nsHtml5StackNode* node, int32_t position); |
michael@0 | 170 | void insertIntoListOfActiveFormattingElements(nsHtml5StackNode* formattingClone, int32_t bookmark); |
michael@0 | 171 | int32_t findInListOfActiveFormattingElements(nsHtml5StackNode* node); |
michael@0 | 172 | int32_t findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(nsIAtom* name); |
michael@0 | 173 | void maybeForgetEarlierDuplicateFormattingElement(nsIAtom* name, nsHtml5HtmlAttributes* attributes); |
michael@0 | 174 | int32_t findLastOrRoot(nsIAtom* name); |
michael@0 | 175 | int32_t findLastOrRoot(int32_t group); |
michael@0 | 176 | bool addAttributesToBody(nsHtml5HtmlAttributes* attributes); |
michael@0 | 177 | void addAttributesToHtml(nsHtml5HtmlAttributes* attributes); |
michael@0 | 178 | void pushHeadPointerOntoStack(); |
michael@0 | 179 | void reconstructTheActiveFormattingElements(); |
michael@0 | 180 | void insertIntoFosterParent(nsIContentHandle* child); |
michael@0 | 181 | bool isInStack(nsHtml5StackNode* node); |
michael@0 | 182 | void popTemplateMode(); |
michael@0 | 183 | void pop(); |
michael@0 | 184 | void silentPop(); |
michael@0 | 185 | void popOnEof(); |
michael@0 | 186 | void appendHtmlElementToDocumentAndPush(nsHtml5HtmlAttributes* attributes); |
michael@0 | 187 | void appendHtmlElementToDocumentAndPush(); |
michael@0 | 188 | void appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes* attributes); |
michael@0 | 189 | void appendToCurrentNodeAndPushBodyElement(nsHtml5HtmlAttributes* attributes); |
michael@0 | 190 | void appendToCurrentNodeAndPushBodyElement(); |
michael@0 | 191 | void appendToCurrentNodeAndPushFormElementMayFoster(nsHtml5HtmlAttributes* attributes); |
michael@0 | 192 | void appendToCurrentNodeAndPushFormattingElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 193 | void appendToCurrentNodeAndPushElement(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 194 | void appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 195 | void appendToCurrentNodeAndPushElementMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 196 | bool annotationXmlEncodingPermitsHtml(nsHtml5HtmlAttributes* attributes); |
michael@0 | 197 | void appendToCurrentNodeAndPushElementMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 198 | void appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); |
michael@0 | 199 | void appendVoidElementToCurrentMayFoster(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); |
michael@0 | 200 | void appendVoidElementToCurrentMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 201 | void appendVoidElementToCurrentMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 202 | void appendVoidElementToCurrentMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); |
michael@0 | 203 | void appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); |
michael@0 | 204 | void appendVoidFormToCurrent(nsHtml5HtmlAttributes* attributes); |
michael@0 | 205 | protected: |
michael@0 | 206 | void accumulateCharacters(const char16_t* buf, int32_t start, int32_t length); |
michael@0 | 207 | void requestSuspension(); |
michael@0 | 208 | nsIContentHandle* createElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes); |
michael@0 | 209 | nsIContentHandle* createElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); |
michael@0 | 210 | nsIContentHandle* createHtmlElementSetAsRoot(nsHtml5HtmlAttributes* attributes); |
michael@0 | 211 | void detachFromParent(nsIContentHandle* element); |
michael@0 | 212 | bool hasChildren(nsIContentHandle* element); |
michael@0 | 213 | void appendElement(nsIContentHandle* child, nsIContentHandle* newParent); |
michael@0 | 214 | void appendChildrenToNewParent(nsIContentHandle* oldParent, nsIContentHandle* newParent); |
michael@0 | 215 | void insertFosterParentedChild(nsIContentHandle* child, nsIContentHandle* table, nsIContentHandle* stackParent); |
michael@0 | 216 | void insertFosterParentedCharacters(char16_t* buf, int32_t start, int32_t length, nsIContentHandle* table, nsIContentHandle* stackParent); |
michael@0 | 217 | void appendCharacters(nsIContentHandle* parent, char16_t* buf, int32_t start, int32_t length); |
michael@0 | 218 | void appendIsindexPrompt(nsIContentHandle* parent); |
michael@0 | 219 | void appendComment(nsIContentHandle* parent, char16_t* buf, int32_t start, int32_t length); |
michael@0 | 220 | void appendCommentToDocument(char16_t* buf, int32_t start, int32_t length); |
michael@0 | 221 | void addAttributesToElement(nsIContentHandle* element, nsHtml5HtmlAttributes* attributes); |
michael@0 | 222 | void markMalformedIfScript(nsIContentHandle* elt); |
michael@0 | 223 | void start(bool fragmentMode); |
michael@0 | 224 | void end(); |
michael@0 | 225 | void appendDoctypeToDocument(nsIAtom* name, nsString* publicIdentifier, nsString* systemIdentifier); |
michael@0 | 226 | void elementPushed(int32_t ns, nsIAtom* name, nsIContentHandle* node); |
michael@0 | 227 | void elementPopped(int32_t ns, nsIAtom* name, nsIContentHandle* node); |
michael@0 | 228 | public: |
michael@0 | 229 | inline bool cdataSectionAllowed() |
michael@0 | 230 | { |
michael@0 | 231 | return isInForeign(); |
michael@0 | 232 | } |
michael@0 | 233 | |
michael@0 | 234 | private: |
michael@0 | 235 | bool isInForeign(); |
michael@0 | 236 | bool isInForeignButNotHtmlOrMathTextIntegrationPoint(); |
michael@0 | 237 | public: |
michael@0 | 238 | void setFragmentContext(nsIAtom* context, int32_t ns, nsIContentHandle* node, bool quirks); |
michael@0 | 239 | protected: |
michael@0 | 240 | nsIContentHandle* currentNode(); |
michael@0 | 241 | public: |
michael@0 | 242 | bool isScriptingEnabled(); |
michael@0 | 243 | void setScriptingEnabled(bool scriptingEnabled); |
michael@0 | 244 | void setIsSrcdocDocument(bool isSrcdocDocument); |
michael@0 | 245 | void flushCharacters(); |
michael@0 | 246 | private: |
michael@0 | 247 | bool charBufferContainsNonWhitespace(); |
michael@0 | 248 | public: |
michael@0 | 249 | nsAHtml5TreeBuilderState* newSnapshot(); |
michael@0 | 250 | bool snapshotMatches(nsAHtml5TreeBuilderState* snapshot); |
michael@0 | 251 | void loadState(nsAHtml5TreeBuilderState* snapshot, nsHtml5AtomTable* interner); |
michael@0 | 252 | private: |
michael@0 | 253 | int32_t findInArray(nsHtml5StackNode* node, jArray<nsHtml5StackNode*,int32_t> arr); |
michael@0 | 254 | public: |
michael@0 | 255 | nsIContentHandle* getFormPointer(); |
michael@0 | 256 | nsIContentHandle* getHeadPointer(); |
michael@0 | 257 | nsIContentHandle* getDeepTreeSurrogateParent(); |
michael@0 | 258 | jArray<nsHtml5StackNode*,int32_t> getListOfActiveFormattingElements(); |
michael@0 | 259 | jArray<nsHtml5StackNode*,int32_t> getStack(); |
michael@0 | 260 | jArray<int32_t,int32_t> getTemplateModeStack(); |
michael@0 | 261 | int32_t getMode(); |
michael@0 | 262 | int32_t getOriginalMode(); |
michael@0 | 263 | bool isFramesetOk(); |
michael@0 | 264 | bool isNeedToDropLF(); |
michael@0 | 265 | bool isQuirks(); |
michael@0 | 266 | int32_t getListOfActiveFormattingElementsLength(); |
michael@0 | 267 | int32_t getStackLength(); |
michael@0 | 268 | int32_t getTemplateModeStackLength(); |
michael@0 | 269 | static void initializeStatics(); |
michael@0 | 270 | static void releaseStatics(); |
michael@0 | 271 | |
michael@0 | 272 | #include "nsHtml5TreeBuilderHSupplement.h" |
michael@0 | 273 | }; |
michael@0 | 274 | |
michael@0 | 275 | #define NS_HTML5TREE_BUILDER_OTHER 0 |
michael@0 | 276 | #define NS_HTML5TREE_BUILDER_A 1 |
michael@0 | 277 | #define NS_HTML5TREE_BUILDER_BASE 2 |
michael@0 | 278 | #define NS_HTML5TREE_BUILDER_BODY 3 |
michael@0 | 279 | #define NS_HTML5TREE_BUILDER_BR 4 |
michael@0 | 280 | #define NS_HTML5TREE_BUILDER_BUTTON 5 |
michael@0 | 281 | #define NS_HTML5TREE_BUILDER_CAPTION 6 |
michael@0 | 282 | #define NS_HTML5TREE_BUILDER_COL 7 |
michael@0 | 283 | #define NS_HTML5TREE_BUILDER_COLGROUP 8 |
michael@0 | 284 | #define NS_HTML5TREE_BUILDER_FORM 9 |
michael@0 | 285 | #define NS_HTML5TREE_BUILDER_FRAME 10 |
michael@0 | 286 | #define NS_HTML5TREE_BUILDER_FRAMESET 11 |
michael@0 | 287 | #define NS_HTML5TREE_BUILDER_IMAGE 12 |
michael@0 | 288 | #define NS_HTML5TREE_BUILDER_INPUT 13 |
michael@0 | 289 | #define NS_HTML5TREE_BUILDER_ISINDEX 14 |
michael@0 | 290 | #define NS_HTML5TREE_BUILDER_LI 15 |
michael@0 | 291 | #define NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND 16 |
michael@0 | 292 | #define NS_HTML5TREE_BUILDER_MATH 17 |
michael@0 | 293 | #define NS_HTML5TREE_BUILDER_META 18 |
michael@0 | 294 | #define NS_HTML5TREE_BUILDER_SVG 19 |
michael@0 | 295 | #define NS_HTML5TREE_BUILDER_HEAD 20 |
michael@0 | 296 | #define NS_HTML5TREE_BUILDER_HR 22 |
michael@0 | 297 | #define NS_HTML5TREE_BUILDER_HTML 23 |
michael@0 | 298 | #define NS_HTML5TREE_BUILDER_NOBR 24 |
michael@0 | 299 | #define NS_HTML5TREE_BUILDER_NOFRAMES 25 |
michael@0 | 300 | #define NS_HTML5TREE_BUILDER_NOSCRIPT 26 |
michael@0 | 301 | #define NS_HTML5TREE_BUILDER_OPTGROUP 27 |
michael@0 | 302 | #define NS_HTML5TREE_BUILDER_OPTION 28 |
michael@0 | 303 | #define NS_HTML5TREE_BUILDER_P 29 |
michael@0 | 304 | #define NS_HTML5TREE_BUILDER_PLAINTEXT 30 |
michael@0 | 305 | #define NS_HTML5TREE_BUILDER_SCRIPT 31 |
michael@0 | 306 | #define NS_HTML5TREE_BUILDER_SELECT 32 |
michael@0 | 307 | #define NS_HTML5TREE_BUILDER_STYLE 33 |
michael@0 | 308 | #define NS_HTML5TREE_BUILDER_TABLE 34 |
michael@0 | 309 | #define NS_HTML5TREE_BUILDER_TEXTAREA 35 |
michael@0 | 310 | #define NS_HTML5TREE_BUILDER_TITLE 36 |
michael@0 | 311 | #define NS_HTML5TREE_BUILDER_TR 37 |
michael@0 | 312 | #define NS_HTML5TREE_BUILDER_XMP 38 |
michael@0 | 313 | #define NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT 39 |
michael@0 | 314 | #define NS_HTML5TREE_BUILDER_TD_OR_TH 40 |
michael@0 | 315 | #define NS_HTML5TREE_BUILDER_DD_OR_DT 41 |
michael@0 | 316 | #define NS_HTML5TREE_BUILDER_H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 42 |
michael@0 | 317 | #define NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET 43 |
michael@0 | 318 | #define NS_HTML5TREE_BUILDER_PRE_OR_LISTING 44 |
michael@0 | 319 | #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 |
michael@0 | 320 | #define NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL 46 |
michael@0 | 321 | #define NS_HTML5TREE_BUILDER_IFRAME 47 |
michael@0 | 322 | #define NS_HTML5TREE_BUILDER_EMBED 48 |
michael@0 | 323 | #define NS_HTML5TREE_BUILDER_AREA_OR_WBR 49 |
michael@0 | 324 | #define NS_HTML5TREE_BUILDER_DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU 50 |
michael@0 | 325 | #define NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY 51 |
michael@0 | 326 | #define NS_HTML5TREE_BUILDER_RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR 52 |
michael@0 | 327 | #define NS_HTML5TREE_BUILDER_RT_OR_RP 53 |
michael@0 | 328 | #define NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK 55 |
michael@0 | 329 | #define NS_HTML5TREE_BUILDER_MGLYPH_OR_MALIGNMARK 56 |
michael@0 | 330 | #define NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT 57 |
michael@0 | 331 | #define NS_HTML5TREE_BUILDER_ANNOTATION_XML 58 |
michael@0 | 332 | #define NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC 59 |
michael@0 | 333 | #define NS_HTML5TREE_BUILDER_NOEMBED 60 |
michael@0 | 334 | #define NS_HTML5TREE_BUILDER_FIELDSET 61 |
michael@0 | 335 | #define NS_HTML5TREE_BUILDER_OUTPUT_OR_LABEL 62 |
michael@0 | 336 | #define NS_HTML5TREE_BUILDER_OBJECT 63 |
michael@0 | 337 | #define NS_HTML5TREE_BUILDER_FONT 64 |
michael@0 | 338 | #define NS_HTML5TREE_BUILDER_KEYGEN 65 |
michael@0 | 339 | #define NS_HTML5TREE_BUILDER_MENUITEM 66 |
michael@0 | 340 | #define NS_HTML5TREE_BUILDER_TEMPLATE 67 |
michael@0 | 341 | #define NS_HTML5TREE_BUILDER_IMG 68 |
michael@0 | 342 | #define NS_HTML5TREE_BUILDER_IN_ROW 0 |
michael@0 | 343 | #define NS_HTML5TREE_BUILDER_IN_TABLE_BODY 1 |
michael@0 | 344 | #define NS_HTML5TREE_BUILDER_IN_TABLE 2 |
michael@0 | 345 | #define NS_HTML5TREE_BUILDER_IN_CAPTION 3 |
michael@0 | 346 | #define NS_HTML5TREE_BUILDER_IN_CELL 4 |
michael@0 | 347 | #define NS_HTML5TREE_BUILDER_FRAMESET_OK 5 |
michael@0 | 348 | #define NS_HTML5TREE_BUILDER_IN_BODY 6 |
michael@0 | 349 | #define NS_HTML5TREE_BUILDER_IN_HEAD 7 |
michael@0 | 350 | #define NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT 8 |
michael@0 | 351 | #define NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP 9 |
michael@0 | 352 | #define NS_HTML5TREE_BUILDER_IN_SELECT_IN_TABLE 10 |
michael@0 | 353 | #define NS_HTML5TREE_BUILDER_IN_SELECT 11 |
michael@0 | 354 | #define NS_HTML5TREE_BUILDER_AFTER_BODY 12 |
michael@0 | 355 | #define NS_HTML5TREE_BUILDER_IN_FRAMESET 13 |
michael@0 | 356 | #define NS_HTML5TREE_BUILDER_AFTER_FRAMESET 14 |
michael@0 | 357 | #define NS_HTML5TREE_BUILDER_INITIAL 15 |
michael@0 | 358 | #define NS_HTML5TREE_BUILDER_BEFORE_HTML 16 |
michael@0 | 359 | #define NS_HTML5TREE_BUILDER_BEFORE_HEAD 17 |
michael@0 | 360 | #define NS_HTML5TREE_BUILDER_AFTER_HEAD 18 |
michael@0 | 361 | #define NS_HTML5TREE_BUILDER_AFTER_AFTER_BODY 19 |
michael@0 | 362 | #define NS_HTML5TREE_BUILDER_AFTER_AFTER_FRAMESET 20 |
michael@0 | 363 | #define NS_HTML5TREE_BUILDER_TEXT 21 |
michael@0 | 364 | #define NS_HTML5TREE_BUILDER_IN_TEMPLATE 22 |
michael@0 | 365 | #define NS_HTML5TREE_BUILDER_CHARSET_INITIAL 0 |
michael@0 | 366 | #define NS_HTML5TREE_BUILDER_CHARSET_C 1 |
michael@0 | 367 | #define NS_HTML5TREE_BUILDER_CHARSET_H 2 |
michael@0 | 368 | #define NS_HTML5TREE_BUILDER_CHARSET_A 3 |
michael@0 | 369 | #define NS_HTML5TREE_BUILDER_CHARSET_R 4 |
michael@0 | 370 | #define NS_HTML5TREE_BUILDER_CHARSET_S 5 |
michael@0 | 371 | #define NS_HTML5TREE_BUILDER_CHARSET_E 6 |
michael@0 | 372 | #define NS_HTML5TREE_BUILDER_CHARSET_T 7 |
michael@0 | 373 | #define NS_HTML5TREE_BUILDER_CHARSET_EQUALS 8 |
michael@0 | 374 | #define NS_HTML5TREE_BUILDER_CHARSET_SINGLE_QUOTED 9 |
michael@0 | 375 | #define NS_HTML5TREE_BUILDER_CHARSET_DOUBLE_QUOTED 10 |
michael@0 | 376 | #define NS_HTML5TREE_BUILDER_CHARSET_UNQUOTED 11 |
michael@0 | 377 | #define NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK INT32_MAX |
michael@0 | 378 | |
michael@0 | 379 | |
michael@0 | 380 | #endif |
michael@0 | 381 |