/src/mozilla-central/parser/html/nsHtml5StateSnapshot.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2009-2010 Mozilla Foundation |
3 | | * |
4 | | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | | * copy of this software and associated documentation files (the "Software"), |
6 | | * to deal in the Software without restriction, including without limitation |
7 | | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
8 | | * and/or sell copies of the Software, and to permit persons to whom the |
9 | | * Software is furnished to do so, subject to the following conditions: |
10 | | * |
11 | | * The above copyright notice and this permission notice shall be included in |
12 | | * all copies or substantial portions of the Software. |
13 | | * |
14 | | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
15 | | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
16 | | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
17 | | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
18 | | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
19 | | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | | * DEALINGS IN THE SOFTWARE. |
21 | | */ |
22 | | |
23 | | /* |
24 | | * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. |
25 | | * Please edit StateSnapshot.java instead and regenerate. |
26 | | */ |
27 | | |
28 | | #define nsHtml5StateSnapshot_cpp__ |
29 | | |
30 | | #include "nsAtom.h" |
31 | | #include "nsHtml5AtomTable.h" |
32 | | #include "nsHtml5String.h" |
33 | | #include "nsNameSpaceManager.h" |
34 | | #include "nsIContent.h" |
35 | | #include "nsTraceRefcnt.h" |
36 | | #include "jArray.h" |
37 | | #include "nsHtml5ArrayCopy.h" |
38 | | #include "nsAHtml5TreeBuilderState.h" |
39 | | #include "nsGkAtoms.h" |
40 | | #include "nsHtml5ByteReadable.h" |
41 | | #include "nsHtml5Macros.h" |
42 | | #include "nsIContentHandle.h" |
43 | | #include "nsHtml5Portability.h" |
44 | | #include "nsHtml5ContentCreatorFunction.h" |
45 | | |
46 | | #include "nsHtml5AttributeName.h" |
47 | | #include "nsHtml5ElementName.h" |
48 | | #include "nsHtml5Tokenizer.h" |
49 | | #include "nsHtml5TreeBuilder.h" |
50 | | #include "nsHtml5MetaScanner.h" |
51 | | #include "nsHtml5StackNode.h" |
52 | | #include "nsHtml5UTF16Buffer.h" |
53 | | #include "nsHtml5Portability.h" |
54 | | |
55 | | #include "nsHtml5StateSnapshot.h" |
56 | | |
57 | | nsHtml5StateSnapshot::nsHtml5StateSnapshot( |
58 | | jArray<nsHtml5StackNode*, int32_t> stack, |
59 | | jArray<nsHtml5StackNode*, int32_t> listOfActiveFormattingElements, |
60 | | jArray<int32_t, int32_t> templateModeStack, |
61 | | nsIContentHandle* formPointer, |
62 | | nsIContentHandle* headPointer, |
63 | | nsIContentHandle* deepTreeSurrogateParent, |
64 | | int32_t mode, |
65 | | int32_t originalMode, |
66 | | bool framesetOk, |
67 | | bool needToDropLF, |
68 | | bool quirks) |
69 | | : stack(stack) |
70 | | , listOfActiveFormattingElements(listOfActiveFormattingElements) |
71 | | , templateModeStack(templateModeStack) |
72 | | , formPointer(formPointer) |
73 | | , headPointer(headPointer) |
74 | | , deepTreeSurrogateParent(deepTreeSurrogateParent) |
75 | | , mode(mode) |
76 | | , originalMode(originalMode) |
77 | | , framesetOk(framesetOk) |
78 | | , needToDropLF(needToDropLF) |
79 | | , quirks(quirks) |
80 | 0 | { |
81 | 0 | MOZ_COUNT_CTOR(nsHtml5StateSnapshot); |
82 | 0 | } |
83 | | |
84 | | jArray<nsHtml5StackNode*, int32_t> |
85 | | nsHtml5StateSnapshot::getStack() |
86 | 0 | { |
87 | 0 | return stack; |
88 | 0 | } |
89 | | |
90 | | jArray<int32_t, int32_t> |
91 | | nsHtml5StateSnapshot::getTemplateModeStack() |
92 | 0 | { |
93 | 0 | return templateModeStack; |
94 | 0 | } |
95 | | |
96 | | jArray<nsHtml5StackNode*, int32_t> |
97 | | nsHtml5StateSnapshot::getListOfActiveFormattingElements() |
98 | 0 | { |
99 | 0 | return listOfActiveFormattingElements; |
100 | 0 | } |
101 | | |
102 | | nsIContentHandle* |
103 | | nsHtml5StateSnapshot::getFormPointer() |
104 | 0 | { |
105 | 0 | return formPointer; |
106 | 0 | } |
107 | | |
108 | | nsIContentHandle* |
109 | | nsHtml5StateSnapshot::getHeadPointer() |
110 | 0 | { |
111 | 0 | return headPointer; |
112 | 0 | } |
113 | | |
114 | | nsIContentHandle* |
115 | | nsHtml5StateSnapshot::getDeepTreeSurrogateParent() |
116 | 0 | { |
117 | 0 | return deepTreeSurrogateParent; |
118 | 0 | } |
119 | | |
120 | | int32_t |
121 | | nsHtml5StateSnapshot::getMode() |
122 | 0 | { |
123 | 0 | return mode; |
124 | 0 | } |
125 | | |
126 | | int32_t |
127 | | nsHtml5StateSnapshot::getOriginalMode() |
128 | 0 | { |
129 | 0 | return originalMode; |
130 | 0 | } |
131 | | |
132 | | bool |
133 | | nsHtml5StateSnapshot::isFramesetOk() |
134 | 0 | { |
135 | 0 | return framesetOk; |
136 | 0 | } |
137 | | |
138 | | bool |
139 | | nsHtml5StateSnapshot::isNeedToDropLF() |
140 | 0 | { |
141 | 0 | return needToDropLF; |
142 | 0 | } |
143 | | |
144 | | bool |
145 | | nsHtml5StateSnapshot::isQuirks() |
146 | 0 | { |
147 | 0 | return quirks; |
148 | 0 | } |
149 | | |
150 | | int32_t |
151 | | nsHtml5StateSnapshot::getListOfActiveFormattingElementsLength() |
152 | 0 | { |
153 | 0 | return listOfActiveFormattingElements.length; |
154 | 0 | } |
155 | | |
156 | | int32_t |
157 | | nsHtml5StateSnapshot::getStackLength() |
158 | 0 | { |
159 | 0 | return stack.length; |
160 | 0 | } |
161 | | |
162 | | int32_t |
163 | | nsHtml5StateSnapshot::getTemplateModeStackLength() |
164 | 0 | { |
165 | 0 | return templateModeStack.length; |
166 | 0 | } |
167 | | |
168 | | nsHtml5StateSnapshot::~nsHtml5StateSnapshot() |
169 | 0 | { |
170 | 0 | MOZ_COUNT_DTOR(nsHtml5StateSnapshot); |
171 | 0 | for (int32_t i = 0; i < stack.length; i++) { |
172 | 0 | stack[i]->release(nullptr); |
173 | 0 | } |
174 | 0 | for (int32_t i = 0; i < listOfActiveFormattingElements.length; i++) { |
175 | 0 | if (listOfActiveFormattingElements[i]) { |
176 | 0 | listOfActiveFormattingElements[i]->release(nullptr); |
177 | 0 | } |
178 | 0 | } |
179 | 0 | } |
180 | | |
181 | | void |
182 | | nsHtml5StateSnapshot::initializeStatics() |
183 | 0 | { |
184 | 0 | } |
185 | | |
186 | | void |
187 | | nsHtml5StateSnapshot::releaseStatics() |
188 | 0 | { |
189 | 0 | } |