1 /*
2  * Copyright (c) 2007 Henri Sivonen
3  * Copyright (c) 2008-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 HtmlAttributes.java instead and regenerate.
27  */
28 
29 #ifndef nsHtml5HtmlAttributes_h
30 #define nsHtml5HtmlAttributes_h
31 
32 #include "nsIAtom.h"
33 #include "nsHtml5AtomTable.h"
34 #include "nsString.h"
35 #include "nsNameSpaceManager.h"
36 #include "nsIContent.h"
37 #include "nsTraceRefcnt.h"
38 #include "jArray.h"
39 #include "nsHtml5ArrayCopy.h"
40 #include "nsAHtml5TreeBuilderState.h"
41 #include "nsHtml5Atoms.h"
42 #include "nsHtml5ByteReadable.h"
43 #include "nsIUnicodeDecoder.h"
44 #include "nsHtml5Macros.h"
45 #include "nsIContentHandle.h"
46 
47 class nsHtml5StreamParser;
48 
49 class nsHtml5Tokenizer;
50 class nsHtml5TreeBuilder;
51 class nsHtml5MetaScanner;
52 class nsHtml5AttributeName;
53 class nsHtml5ElementName;
54 class nsHtml5UTF16Buffer;
55 class nsHtml5StateSnapshot;
56 class nsHtml5Portability;
57 
58 
59 class nsHtml5HtmlAttributes
60 {
61   public:
62     static nsHtml5HtmlAttributes* EMPTY_ATTRIBUTES;
63   private:
64     int32_t mode;
65     int32_t length;
66     autoJArray<nsHtml5AttributeName*,int32_t> names;
67     autoJArray<nsString*,int32_t> values;
68     autoJArray<int32_t,int32_t> lines;
69   public:
70     explicit nsHtml5HtmlAttributes(int32_t mode);
71     ~nsHtml5HtmlAttributes();
72     int32_t getIndex(nsHtml5AttributeName* name);
73     nsString* getValue(nsHtml5AttributeName* name);
74     int32_t getLength();
75     nsIAtom* getLocalNameNoBoundsCheck(int32_t index);
76     int32_t getURINoBoundsCheck(int32_t index);
77     nsIAtom* getPrefixNoBoundsCheck(int32_t index);
78     nsString* getValueNoBoundsCheck(int32_t index);
79     nsHtml5AttributeName* getAttributeNameNoBoundsCheck(int32_t index);
80     int32_t getLineNoBoundsCheck(int32_t index);
81     void addAttribute(nsHtml5AttributeName* name, nsString* value, int32_t line);
82     void clear(int32_t m);
83     void releaseValue(int32_t i);
84     void clearWithoutReleasingContents();
85     bool contains(nsHtml5AttributeName* name);
86     void adjustForMath();
87     void adjustForSvg();
88     nsHtml5HtmlAttributes* cloneAttributes(nsHtml5AtomTable* interner);
89     bool equalsAnother(nsHtml5HtmlAttributes* other);
90     static void initializeStatics();
91     static void releaseStatics();
92 };
93 
94 
95 
96 #endif
97 
98