| 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 13 matching lines...) Expand all Loading... |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef HTMLConstructionSite_h | 27 #ifndef HTMLConstructionSite_h |
| 28 #define HTMLConstructionSite_h | 28 #define HTMLConstructionSite_h |
| 29 | 29 |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/dom/ParserContentPolicy.h" | 31 #include "core/dom/ParserContentPolicy.h" |
| 32 #include "core/html/parser/HTMLElementStack.h" | 32 #include "core/html/parser/HTMLElementStack.h" |
| 33 #include "core/html/parser/HTMLFormattingElementList.h" | 33 #include "core/html/parser/HTMLFormattingElementList.h" |
| 34 #include "core/origin_trials/OriginTrials.h" |
| 34 #include "wtf/Noncopyable.h" | 35 #include "wtf/Noncopyable.h" |
| 35 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
| 36 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
| 37 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 38 #include "wtf/text/StringBuilder.h" | 39 #include "wtf/text/StringBuilder.h" |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 | 42 |
| 42 struct HTMLConstructionSiteTask { | 43 struct HTMLConstructionSiteTask { |
| 43 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 44 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 void fosterParent(PassRefPtrWillBeRawPtr<Node>); | 175 void fosterParent(PassRefPtrWillBeRawPtr<Node>); |
| 175 | 176 |
| 176 bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex)
const; | 177 bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex)
const; |
| 177 void reconstructTheActiveFormattingElements(); | 178 void reconstructTheActiveFormattingElements(); |
| 178 | 179 |
| 179 void generateImpliedEndTags(); | 180 void generateImpliedEndTags(); |
| 180 void generateImpliedEndTagsWithExclusion(const AtomicString& tagName); | 181 void generateImpliedEndTagsWithExclusion(const AtomicString& tagName); |
| 181 | 182 |
| 182 bool inQuirksMode(); | 183 bool inQuirksMode(); |
| 183 | 184 |
| 185 void finalizeExperiments() { OriginTrials::from(&ownerDocumentForCurrentNode
())->finalizeTokens(); } |
| 184 bool isEmpty() const { return !m_openElements.stackDepth(); } | 186 bool isEmpty() const { return !m_openElements.stackDepth(); } |
| 185 HTMLElementStack::ElementRecord* currentElementRecord() const { return m_ope
nElements.topRecord(); } | 187 HTMLElementStack::ElementRecord* currentElementRecord() const { return m_ope
nElements.topRecord(); } |
| 186 Element* currentElement() const { return m_openElements.top(); } | 188 Element* currentElement() const { return m_openElements.top(); } |
| 187 ContainerNode* currentNode() const { return m_openElements.topNode(); } | 189 ContainerNode* currentNode() const { return m_openElements.topNode(); } |
| 188 HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem
(); } | 190 HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem
(); } |
| 189 HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); } | 191 HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); } |
| 190 Document& ownerDocumentForCurrentNode(); | 192 Document& ownerDocumentForCurrentNode(); |
| 191 HTMLElementStack* openElements() const { return &m_openElements; } | 193 HTMLElementStack* openElements() const { return &m_openElements; } |
| 192 HTMLFormattingElementList* activeFormattingElements() const { return &m_acti
veFormattingElements; } | 194 HTMLFormattingElementList* activeFormattingElements() const { return &m_acti
veFormattingElements; } |
| 193 bool currentIsRootNode() { return m_openElements.topNode() == m_openElements
.rootNode(); } | 195 bool currentIsRootNode() { return m_openElements.topNode() == m_openElements
.rootNode(); } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // "whenever a node would be inserted into the current node, it must instead | 318 // "whenever a node would be inserted into the current node, it must instead |
| 317 // be foster parented." This flag tracks whether we're in that state. | 319 // be foster parented." This flag tracks whether we're in that state. |
| 318 bool m_redirectAttachToFosterParent; | 320 bool m_redirectAttachToFosterParent; |
| 319 | 321 |
| 320 bool m_inQuirksMode; | 322 bool m_inQuirksMode; |
| 321 }; | 323 }; |
| 322 | 324 |
| 323 } // namespace blink | 325 } // namespace blink |
| 324 | 326 |
| 325 #endif | 327 #endif |
| OLD | NEW |