tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsHtml5StackNode.h (3768B)


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