parser/html/nsHtml5StackNode.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

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 *
michael@0 5 * Permission is hereby granted, free of charge, to any person obtaining a
michael@0 6 * copy of this software and associated documentation files (the "Software"),
michael@0 7 * to deal in the Software without restriction, including without limitation
michael@0 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
michael@0 9 * and/or sell copies of the Software, and to permit persons to whom the
michael@0 10 * Software is furnished to do so, subject to the following conditions:
michael@0 11 *
michael@0 12 * The above copyright notice and this permission notice shall be included in
michael@0 13 * all copies or substantial portions of the Software.
michael@0 14 *
michael@0 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
michael@0 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
michael@0 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
michael@0 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
michael@0 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
michael@0 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
michael@0 21 * DEALINGS IN THE SOFTWARE.
michael@0 22 */
michael@0 23
michael@0 24 /*
michael@0 25 * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
michael@0 26 * Please edit StackNode.java instead and regenerate.
michael@0 27 */
michael@0 28
michael@0 29 #ifndef nsHtml5StackNode_h
michael@0 30 #define nsHtml5StackNode_h
michael@0 31
michael@0 32 #include "nsIAtom.h"
michael@0 33 #include "nsHtml5AtomTable.h"
michael@0 34 #include "nsString.h"
michael@0 35 #include "nsNameSpaceManager.h"
michael@0 36 #include "nsIContent.h"
michael@0 37 #include "nsTraceRefcnt.h"
michael@0 38 #include "jArray.h"
michael@0 39 #include "nsHtml5ArrayCopy.h"
michael@0 40 #include "nsAHtml5TreeBuilderState.h"
michael@0 41 #include "nsHtml5Atoms.h"
michael@0 42 #include "nsHtml5ByteReadable.h"
michael@0 43 #include "nsIUnicodeDecoder.h"
michael@0 44 #include "nsHtml5Macros.h"
michael@0 45 #include "nsIContentHandle.h"
michael@0 46
michael@0 47 class nsHtml5StreamParser;
michael@0 48
michael@0 49 class nsHtml5Tokenizer;
michael@0 50 class nsHtml5TreeBuilder;
michael@0 51 class nsHtml5MetaScanner;
michael@0 52 class nsHtml5AttributeName;
michael@0 53 class nsHtml5ElementName;
michael@0 54 class nsHtml5HtmlAttributes;
michael@0 55 class nsHtml5UTF16Buffer;
michael@0 56 class nsHtml5StateSnapshot;
michael@0 57 class nsHtml5Portability;
michael@0 58
michael@0 59
michael@0 60 class nsHtml5StackNode
michael@0 61 {
michael@0 62 public:
michael@0 63 int32_t flags;
michael@0 64 nsIAtom* name;
michael@0 65 nsIAtom* popName;
michael@0 66 int32_t ns;
michael@0 67 nsIContentHandle* node;
michael@0 68 nsHtml5HtmlAttributes* attributes;
michael@0 69 private:
michael@0 70 int32_t refcount;
michael@0 71 public:
michael@0 72 inline int32_t getFlags()
michael@0 73 {
michael@0 74 return flags;
michael@0 75 }
michael@0 76
michael@0 77 int32_t getGroup();
michael@0 78 bool isScoping();
michael@0 79 bool isSpecial();
michael@0 80 bool isFosterParenting();
michael@0 81 bool isHtmlIntegrationPoint();
michael@0 82 nsHtml5StackNode(int32_t flags, int32_t ns, nsIAtom* name, nsIContentHandle* node, nsIAtom* popName, nsHtml5HtmlAttributes* attributes);
michael@0 83 nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node);
michael@0 84 nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node, nsHtml5HtmlAttributes* attributes);
michael@0 85 nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node, nsIAtom* popName);
michael@0 86 nsHtml5StackNode(nsHtml5ElementName* elementName, nsIAtom* popName, nsIContentHandle* node);
michael@0 87 nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node, nsIAtom* popName, bool markAsIntegrationPoint);
michael@0 88 private:
michael@0 89 static int32_t prepareSvgFlags(int32_t flags);
michael@0 90 static int32_t prepareMathFlags(int32_t flags, bool markAsIntegrationPoint);
michael@0 91 public:
michael@0 92 ~nsHtml5StackNode();
michael@0 93 void dropAttributes();
michael@0 94 void retain();
michael@0 95 void release();
michael@0 96 static void initializeStatics();
michael@0 97 static void releaseStatics();
michael@0 98 };
michael@0 99
michael@0 100
michael@0 101
michael@0 102 #endif
michael@0 103

mercurial