| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/custom/CustomElementDefinition.h" | 5 #include "core/dom/custom/CustomElementDefinition.h" |
| 6 | 6 |
| 7 #include "core/dom/Attr.h" | 7 #include "core/dom/Attr.h" |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "core/dom/custom/CustomElement.h" | 9 #include "core/dom/custom/CustomElement.h" |
| 10 #include "core/dom/custom/CustomElementAdoptedCallbackReaction.h" | 10 #include "core/dom/custom/CustomElementAdoptedCallbackReaction.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // definition. | 119 // definition. |
| 120 enqueueUpgradeReaction(element); | 120 enqueueUpgradeReaction(element); |
| 121 return element; | 121 return element; |
| 122 } | 122 } |
| 123 | 123 |
| 124 CustomElementDefinition::ConstructionStackScope::ConstructionStackScope( | 124 CustomElementDefinition::ConstructionStackScope::ConstructionStackScope( |
| 125 CustomElementDefinition* definition, | 125 CustomElementDefinition* definition, |
| 126 Element* element) | 126 Element* element) |
| 127 : m_constructionStack(definition->m_constructionStack), m_element(element) { | 127 : m_constructionStack(definition->m_constructionStack), m_element(element) { |
| 128 // Push the construction stack. | 128 // Push the construction stack. |
| 129 m_constructionStack.append(element); | 129 m_constructionStack.push_back(element); |
| 130 m_depth = m_constructionStack.size(); | 130 m_depth = m_constructionStack.size(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 CustomElementDefinition::ConstructionStackScope::~ConstructionStackScope() { | 133 CustomElementDefinition::ConstructionStackScope::~ConstructionStackScope() { |
| 134 // Pop the construction stack. | 134 // Pop the construction stack. |
| 135 DCHECK(!m_constructionStack.back() || | 135 DCHECK(!m_constructionStack.back() || |
| 136 m_constructionStack.back() == m_element); | 136 m_constructionStack.back() == m_element); |
| 137 DCHECK_EQ(m_constructionStack.size(), m_depth); // It's a *stack*. | 137 DCHECK_EQ(m_constructionStack.size(), m_depth); // It's a *stack*. |
| 138 m_constructionStack.pop_back(); | 138 m_constructionStack.pop_back(); |
| 139 } | 139 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 element->synchronizeAttribute(name); | 212 element->synchronizeAttribute(name); |
| 213 for (const auto& attribute : element->attributesWithoutUpdate()) { | 213 for (const auto& attribute : element->attributesWithoutUpdate()) { |
| 214 if (hasAttributeChangedCallback(attribute.name())) { | 214 if (hasAttributeChangedCallback(attribute.name())) { |
| 215 enqueueAttributeChangedCallback(element, attribute.name(), nullAtom, | 215 enqueueAttributeChangedCallback(element, attribute.name(), nullAtom, |
| 216 attribute.value()); | 216 attribute.value()); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |