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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 { | 243 { |
244 return ScriptValue(); | 244 return ScriptValue(); |
245 } | 245 } |
246 | 246 |
247 bool runConstructor(Element* element) override | 247 bool runConstructor(Element* element) override |
248 { | 248 { |
249 if (constructionStack().isEmpty() | 249 if (constructionStack().isEmpty() |
250 || constructionStack().last() != element) | 250 || constructionStack().last() != element) |
251 return false; | 251 return false; |
252 constructionStack().last().clear(); | 252 constructionStack().last().clear(); |
253 element->setCustomElementState(CustomElementState::Custom); | |
254 return true; | 253 return true; |
255 } | 254 } |
256 | 255 |
257 HTMLElement* createElementSync(Document&, const QualifiedName&) override | 256 HTMLElement* createElementSync(Document&, const QualifiedName&) override |
258 { | 257 { |
259 return nullptr; | 258 return nullptr; |
260 } | 259 } |
261 | 260 |
262 HTMLElement* createElementSync(Document&, const QualifiedName&, ExceptionSta
te&) override | 261 HTMLElement* createElementSync(Document&, const QualifiedName&, ExceptionSta
te&) override |
263 { | 262 { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 << "remove() should invoke disconnectedCallback"; | 467 << "remove() should invoke disconnectedCallback"; |
469 | 468 |
470 EXPECT_EQ(1u, definition->m_logs.size()) | 469 EXPECT_EQ(1u, definition->m_logs.size()) |
471 << "remove() should not invoke other callbacks"; | 470 << "remove() should not invoke other callbacks"; |
472 } | 471 } |
473 | 472 |
474 // TODO(dominicc): Add tests which adjust the "is" attribute when type | 473 // TODO(dominicc): Add tests which adjust the "is" attribute when type |
475 // extensions are implemented. | 474 // extensions are implemented. |
476 | 475 |
477 } // namespace blink | 476 } // namespace blink |
OLD | NEW |