| 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/CustomElementRegistry.h" | 5 #include "core/dom/custom/CustomElementRegistry.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptValue.h" | 8 #include "bindings/core/v8/ScriptValue.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 bool runConstructor(Element* element) override { | 179 bool runConstructor(Element* element) override { |
| 180 if (constructionStack().isEmpty() || constructionStack().last() != element) | 180 if (constructionStack().isEmpty() || constructionStack().last() != element) |
| 181 return false; | 181 return false; |
| 182 constructionStack().last().clear(); | 182 constructionStack().last().clear(); |
| 183 return true; | 183 return true; |
| 184 } | 184 } |
| 185 | 185 |
| 186 HTMLElement* createElementSync(Document&, const QualifiedName&) override { | 186 HTMLElement* createElementSync(Document&, const QualifiedName&) override { |
| 187 return nullptr; | 187 return nullptr; |
| 188 } | 188 } |
| 189 | |
| 190 HTMLElement* createElementSync(Document&, | |
| 191 const QualifiedName&, | |
| 192 ExceptionState&) override { | |
| 193 return nullptr; | |
| 194 } | |
| 195 }; | 189 }; |
| 196 | 190 |
| 197 // Classes which use trace macros cannot be local because of the | 191 // Classes which use trace macros cannot be local because of the |
| 198 // traceImpl template. | 192 // traceImpl template. |
| 199 class LogUpgradeDefinition : public TestCustomElementDefinition { | 193 class LogUpgradeDefinition : public TestCustomElementDefinition { |
| 200 WTF_MAKE_NONCOPYABLE(LogUpgradeDefinition); | 194 WTF_MAKE_NONCOPYABLE(LogUpgradeDefinition); |
| 201 | 195 |
| 202 public: | 196 public: |
| 203 LogUpgradeDefinition(const CustomElementDescriptor& descriptor) | 197 LogUpgradeDefinition(const CustomElementDescriptor& descriptor) |
| 204 : TestCustomElementDefinition( | 198 : TestCustomElementDefinition( |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 << "adoptedCallback should have been passed the new owner document"; | 442 << "adoptedCallback should have been passed the new owner document"; |
| 449 | 443 |
| 450 EXPECT_EQ(2u, definition->m_logs.size()) | 444 EXPECT_EQ(2u, definition->m_logs.size()) |
| 451 << "adoptNode() should not invoke other callbacks"; | 445 << "adoptNode() should not invoke other callbacks"; |
| 452 } | 446 } |
| 453 | 447 |
| 454 // TODO(dominicc): Add tests which adjust the "is" attribute when type | 448 // TODO(dominicc): Add tests which adjust the "is" attribute when type |
| 455 // extensions are implemented. | 449 // extensions are implemented. |
| 456 | 450 |
| 457 } // namespace blink | 451 } // namespace blink |
| OLD | NEW |