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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 class HTMLFormElement; | 106 class HTMLFormElement; |
107 | 107 |
108 class HTMLConstructionSite final { | 108 class HTMLConstructionSite final { |
109 WTF_MAKE_NONCOPYABLE(HTMLConstructionSite); | 109 WTF_MAKE_NONCOPYABLE(HTMLConstructionSite); |
110 DISALLOW_NEW(); | 110 DISALLOW_NEW(); |
111 public: | 111 public: |
112 HTMLConstructionSite(Document&, ParserContentPolicy); | 112 HTMLConstructionSite(Document&, ParserContentPolicy); |
113 ~HTMLConstructionSite(); | 113 ~HTMLConstructionSite(); |
114 DECLARE_TRACE(); | 114 DECLARE_TRACE(); |
115 | 115 |
116 void initFragmentParsing(DocumentFragment*); | 116 void initFragmentParsing(DocumentFragment*, Element* contextElement); |
117 | 117 |
118 void detach(); | 118 void detach(); |
119 | 119 |
120 // executeQueuedTasks empties the queue but does not flush pending text. | 120 // executeQueuedTasks empties the queue but does not flush pending text. |
121 // NOTE: Possible reentrancy via JavaScript execution. | 121 // NOTE: Possible reentrancy via JavaScript execution. |
122 void executeQueuedTasks(); | 122 void executeQueuedTasks(); |
123 | 123 |
124 // flushPendingText turns pending text into queued Text insertions, but does
not execute them. | 124 // flushPendingText turns pending text into queued Text insertions, but does
not execute them. |
125 void flushPendingText(FlushMode); | 125 void flushPendingText(FlushMode); |
126 | 126 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem
(); } | 189 HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem
(); } |
190 HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); } | 190 HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); } |
191 Document& ownerDocumentForCurrentNode(); | 191 Document& ownerDocumentForCurrentNode(); |
192 HTMLElementStack* openElements() const { return &m_openElements; } | 192 HTMLElementStack* openElements() const { return &m_openElements; } |
193 HTMLFormattingElementList* activeFormattingElements() const { return &m_acti
veFormattingElements; } | 193 HTMLFormattingElementList* activeFormattingElements() const { return &m_acti
veFormattingElements; } |
194 bool currentIsRootNode() { return m_openElements.topNode() == m_openElements
.rootNode(); } | 194 bool currentIsRootNode() { return m_openElements.topNode() == m_openElements
.rootNode(); } |
195 | 195 |
196 Element* head() const { return m_head->element(); } | 196 Element* head() const { return m_head->element(); } |
197 HTMLStackItem* headStackItem() const { return m_head.get(); } | 197 HTMLStackItem* headStackItem() const { return m_head.get(); } |
198 | 198 |
199 void setForm(HTMLFormElement*); | 199 bool isFormElementPointerNonNull() const { return m_form; } |
200 HTMLFormElement* form() const { return m_form.get(); } | |
201 HTMLFormElement* takeForm(); | 200 HTMLFormElement* takeForm(); |
202 | 201 |
203 ParserContentPolicy getParserContentPolicy() { return m_parserContentPolicy;
} | 202 ParserContentPolicy getParserContentPolicy() { return m_parserContentPolicy;
} |
204 | 203 |
205 class RedirectToFosterParentGuard { | 204 class RedirectToFosterParentGuard { |
206 STACK_ALLOCATED(); | 205 STACK_ALLOCATED(); |
207 WTF_MAKE_NONCOPYABLE(RedirectToFosterParentGuard); | 206 WTF_MAKE_NONCOPYABLE(RedirectToFosterParentGuard); |
208 public: | 207 public: |
209 RedirectToFosterParentGuard(HTMLConstructionSite& tree) | 208 RedirectToFosterParentGuard(HTMLConstructionSite& tree) |
210 : m_tree(tree) | 209 : m_tree(tree) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // "whenever a node would be inserted into the current node, it must instead | 316 // "whenever a node would be inserted into the current node, it must instead |
318 // be foster parented." This flag tracks whether we're in that state. | 317 // be foster parented." This flag tracks whether we're in that state. |
319 bool m_redirectAttachToFosterParent; | 318 bool m_redirectAttachToFosterParent; |
320 | 319 |
321 bool m_inQuirksMode; | 320 bool m_inQuirksMode; |
322 }; | 321 }; |
323 | 322 |
324 } // namespace blink | 323 } // namespace blink |
325 | 324 |
326 #endif | 325 #endif |
OLD | NEW |