Merge mozilla-central and tracemonkey. (a=blockers)
[mozilla-central.git] / parser / html / nsHtml5HtmlAttributes.h
blob7ff2f34a7d00c0316371250867855a52a7d90922
1 /*
2 * Copyright (c) 2007 Henri Sivonen
3 * Copyright (c) 2008-2009 Mozilla Foundation
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:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
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.
25 * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
26 * Please edit HtmlAttributes.java instead and regenerate.
29 #ifndef nsHtml5HtmlAttributes_h__
30 #define nsHtml5HtmlAttributes_h__
32 #include "prtypes.h"
33 #include "nsIAtom.h"
34 #include "nsHtml5AtomTable.h"
35 #include "nsString.h"
36 #include "nsINameSpaceManager.h"
37 #include "nsIContent.h"
38 #include "nsIDocument.h"
39 #include "nsTraceRefcnt.h"
40 #include "jArray.h"
41 #include "nsHtml5DocumentMode.h"
42 #include "nsHtml5ArrayCopy.h"
43 #include "nsHtml5NamedCharacters.h"
44 #include "nsHtml5NamedCharactersAccel.h"
45 #include "nsHtml5Atoms.h"
46 #include "nsHtml5ByteReadable.h"
47 #include "nsIUnicodeDecoder.h"
48 #include "nsAHtml5TreeBuilderState.h"
49 #include "nsHtml5Macros.h"
51 class nsHtml5StreamParser;
53 class nsHtml5Tokenizer;
54 class nsHtml5TreeBuilder;
55 class nsHtml5MetaScanner;
56 class nsHtml5AttributeName;
57 class nsHtml5ElementName;
58 class nsHtml5UTF16Buffer;
59 class nsHtml5StateSnapshot;
60 class nsHtml5Portability;
63 class nsHtml5HtmlAttributes
65 public:
66 static nsHtml5HtmlAttributes* EMPTY_ATTRIBUTES;
67 private:
68 PRInt32 mode;
69 PRInt32 length;
70 autoJArray<nsHtml5AttributeName*,PRInt32> names;
71 autoJArray<nsString*,PRInt32> values;
72 public:
73 nsHtml5HtmlAttributes(PRInt32 mode);
74 ~nsHtml5HtmlAttributes();
75 PRInt32 getIndex(nsHtml5AttributeName* name);
76 PRInt32 getLength();
77 nsIAtom* getLocalName(PRInt32 index);
78 nsHtml5AttributeName* getAttributeName(PRInt32 index);
79 PRInt32 getURI(PRInt32 index);
80 nsIAtom* getPrefix(PRInt32 index);
81 nsString* getValue(PRInt32 index);
82 nsString* getValue(nsHtml5AttributeName* name);
83 void addAttribute(nsHtml5AttributeName* name, nsString* value);
84 void clear(PRInt32 m);
85 void releaseValue(PRInt32 i);
86 void clearWithoutReleasingContents();
87 PRBool contains(nsHtml5AttributeName* name);
88 void adjustForMath();
89 void adjustForSvg();
90 nsHtml5HtmlAttributes* cloneAttributes(nsHtml5AtomTable* interner);
91 PRBool equalsAnother(nsHtml5HtmlAttributes* other);
92 static void initializeStatics();
93 static void releaseStatics();
98 #endif