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/CustomElementsRegistry.h" | 5 #include "core/dom/custom/CustomElementsRegistry.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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 bool runConstructor(Element* element) override | 241 bool runConstructor(Element* element) override |
242 { | 242 { |
243 if (constructionStack().isEmpty() | 243 if (constructionStack().isEmpty() |
244 || constructionStack().last() != element) | 244 || constructionStack().last() != element) |
245 return false; | 245 return false; |
246 constructionStack().last().clear(); | 246 constructionStack().last().clear(); |
247 element->setCustomElementState(CustomElementState::Custom); | 247 element->setCustomElementState(CustomElementState::Custom); |
248 return true; | 248 return true; |
249 } | 249 } |
| 250 |
| 251 HTMLElement* createElementSync(Document&, const QualifiedName&) override |
| 252 { |
| 253 return nullptr; |
| 254 } |
| 255 |
| 256 HTMLElement* createElementSync(Document&, const QualifiedName&, ExceptionSta
te&) override |
| 257 { |
| 258 return nullptr; |
| 259 } |
250 }; | 260 }; |
251 | 261 |
252 // Classes which use trace macros cannot be local because of the | 262 // Classes which use trace macros cannot be local because of the |
253 // traceImpl template. | 263 // traceImpl template. |
254 class LogUpgradeDefinition : public TestCustomElementDefinition { | 264 class LogUpgradeDefinition : public TestCustomElementDefinition { |
255 WTF_MAKE_NONCOPYABLE(LogUpgradeDefinition); | 265 WTF_MAKE_NONCOPYABLE(LogUpgradeDefinition); |
256 public: | 266 public: |
257 LogUpgradeDefinition(const CustomElementDescriptor& descriptor) | 267 LogUpgradeDefinition(const CustomElementDescriptor& descriptor) |
258 : TestCustomElementDefinition(descriptor) | 268 : TestCustomElementDefinition(descriptor) |
259 { | 269 { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 << "remove() should invoke disconnectedCallback"; | 459 << "remove() should invoke disconnectedCallback"; |
450 | 460 |
451 EXPECT_EQ(1u, definition->m_logs.size()) | 461 EXPECT_EQ(1u, definition->m_logs.size()) |
452 << "remove() should not invoke other callbacks"; | 462 << "remove() should not invoke other callbacks"; |
453 } | 463 } |
454 | 464 |
455 // TODO(dominicc): Add tests which adjust the "is" attribute when type | 465 // TODO(dominicc): Add tests which adjust the "is" attribute when type |
456 // extensions are implemented. | 466 // extensions are implemented. |
457 | 467 |
458 } // namespace blink | 468 } // namespace blink |
OLD | NEW |