OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 // Default processing for the different insertion modes. | 163 // Default processing for the different insertion modes. |
164 void defaultForInitial(); | 164 void defaultForInitial(); |
165 void defaultForBeforeHTML(); | 165 void defaultForBeforeHTML(); |
166 void defaultForBeforeHead(); | 166 void defaultForBeforeHead(); |
167 void defaultForInHead(); | 167 void defaultForInHead(); |
168 void defaultForInHeadNoscript(); | 168 void defaultForInHeadNoscript(); |
169 void defaultForAfterHead(); | 169 void defaultForAfterHead(); |
170 void defaultForInTableText(); | 170 void defaultForInTableText(); |
171 | 171 |
172 inline PassRefPtr<HTMLStackItem> adjustedCurrentStackItem() const; | 172 inline HTMLStackItem* adjustedCurrentStackItem() const; |
173 inline bool shouldProcessTokenInForeignContent(AtomicHTMLToken*); | 173 inline bool shouldProcessTokenInForeignContent(AtomicHTMLToken*); |
174 void processTokenInForeignContent(AtomicHTMLToken*); | 174 void processTokenInForeignContent(AtomicHTMLToken*); |
175 | 175 |
176 Vector<Attribute> attributesForIsindexInput(AtomicHTMLToken*); | 176 Vector<Attribute> attributesForIsindexInput(AtomicHTMLToken*); |
177 | 177 |
178 void callTheAdoptionAgency(AtomicHTMLToken*); | 178 void callTheAdoptionAgency(AtomicHTMLToken*); |
179 | 179 |
180 void closeTheCell(); | 180 void closeTheCell(); |
181 | 181 |
182 template <bool shouldClose(const HTMLStackItem*)> | 182 template <bool shouldClose(const HTMLStackItem*)> |
(...skipping 11 matching lines...) Expand all Loading... |
194 bool processEndOfFileForInTemplateContents(AtomicHTMLToken*); | 194 bool processEndOfFileForInTemplateContents(AtomicHTMLToken*); |
195 | 195 |
196 class FragmentParsingContext { | 196 class FragmentParsingContext { |
197 WTF_MAKE_NONCOPYABLE(FragmentParsingContext); | 197 WTF_MAKE_NONCOPYABLE(FragmentParsingContext); |
198 public: | 198 public: |
199 FragmentParsingContext(); | 199 FragmentParsingContext(); |
200 FragmentParsingContext(DocumentFragment*, Element* contextElement); | 200 FragmentParsingContext(DocumentFragment*, Element* contextElement); |
201 ~FragmentParsingContext(); | 201 ~FragmentParsingContext(); |
202 | 202 |
203 DocumentFragment* fragment() const { return m_fragment; } | 203 DocumentFragment* fragment() const { return m_fragment; } |
204 Element* contextElement() const { ASSERT(m_fragment); return m_contextEl
ement; } | 204 Element* contextElement() const { ASSERT(m_fragment); return m_contextEl
ementStackItem->element(); } |
| 205 HTMLStackItem* contextElementStackItem() const { ASSERT(m_fragment); ret
urn m_contextElementStackItem.get(); } |
205 | 206 |
206 private: | 207 private: |
207 DocumentFragment* m_fragment; | 208 DocumentFragment* m_fragment; |
208 Element* m_contextElement; | 209 RefPtr<HTMLStackItem> m_contextElementStackItem; |
209 }; | 210 }; |
210 | 211 |
211 bool m_framesetOk; | 212 bool m_framesetOk; |
212 #ifndef NDEBUG | 213 #ifndef NDEBUG |
213 bool m_isAttached; | 214 bool m_isAttached; |
214 #endif | 215 #endif |
215 FragmentParsingContext m_fragmentContext; | 216 FragmentParsingContext m_fragmentContext; |
216 HTMLConstructionSite m_tree; | 217 HTMLConstructionSite m_tree; |
217 | 218 |
218 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode | 219 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode |
(...skipping 15 matching lines...) Expand all Loading... |
234 | 235 |
235 RefPtr<Element> m_scriptToProcess; // <script> tag which needs processing be
fore resuming the parser. | 236 RefPtr<Element> m_scriptToProcess; // <script> tag which needs processing be
fore resuming the parser. |
236 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. | 237 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. |
237 | 238 |
238 HTMLParserOptions m_options; | 239 HTMLParserOptions m_options; |
239 }; | 240 }; |
240 | 241 |
241 } | 242 } |
242 | 243 |
243 #endif | 244 #endif |
OLD | NEW |