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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex)
const; | 136 bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex)
const; |
137 void reconstructTheActiveFormattingElements(); | 137 void reconstructTheActiveFormattingElements(); |
138 | 138 |
139 void generateImpliedEndTags(); | 139 void generateImpliedEndTags(); |
140 void generateImpliedEndTagsWithExclusion(const AtomicString& tagName); | 140 void generateImpliedEndTagsWithExclusion(const AtomicString& tagName); |
141 | 141 |
142 bool inQuirksMode(); | 142 bool inQuirksMode(); |
143 | 143 |
144 bool isEmpty() const { return !m_openElements.stackDepth(); } | 144 bool isEmpty() const { return !m_openElements.stackDepth(); } |
| 145 bool oneOpenElement() const { return m_openElements.stackDepth() == 1; } |
145 HTMLElementStack::ElementRecord* currentElementRecord() const { return m_ope
nElements.topRecord(); } | 146 HTMLElementStack::ElementRecord* currentElementRecord() const { return m_ope
nElements.topRecord(); } |
146 Element* currentElement() const { return m_openElements.top(); } | 147 Element* currentElement() const { return m_openElements.top(); } |
147 ContainerNode* currentNode() const { return m_openElements.topNode(); } | 148 ContainerNode* currentNode() const { return m_openElements.topNode(); } |
148 HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem
(); } | 149 HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem
(); } |
149 HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); } | 150 HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); } |
150 Document& ownerDocumentForCurrentNode(); | 151 Document& ownerDocumentForCurrentNode(); |
151 HTMLElementStack* openElements() const { return &m_openElements; } | 152 HTMLElementStack* openElements() const { return &m_openElements; } |
152 HTMLFormattingElementList* activeFormattingElements() const { return &m_acti
veFormattingElements; } | 153 HTMLFormattingElementList* activeFormattingElements() const { return &m_acti
veFormattingElements; } |
153 bool currentIsRootNode() { return m_openElements.topNode() == m_openElements
.rootNode(); } | 154 bool currentIsRootNode() { return m_openElements.topNode() == m_openElements
.rootNode(); } |
154 | 155 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // "whenever a node would be inserted into the current node, it must instead | 225 // "whenever a node would be inserted into the current node, it must instead |
225 // be foster parented." This flag tracks whether we're in that state. | 226 // be foster parented." This flag tracks whether we're in that state. |
226 bool m_redirectAttachToFosterParent; | 227 bool m_redirectAttachToFosterParent; |
227 | 228 |
228 bool m_inQuirksMode; | 229 bool m_inQuirksMode; |
229 }; | 230 }; |
230 | 231 |
231 } // namespace WebCore | 232 } // namespace WebCore |
232 | 233 |
233 #endif | 234 #endif |
OLD | NEW |