| 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 #ifndef CustomElement_h | 5 #ifndef CustomElement_h |
| 6 #define CustomElement_h | 6 #define CustomElement_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/HTMLNames.h" | 9 #include "core/HTMLNames.h" |
| 10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // elements are implemented. | 47 // elements are implemented. |
| 48 return isValidName(element.localName()) | 48 return isValidName(element.localName()) |
| 49 && element.namespaceURI() == HTMLNames::xhtmlNamespaceURI; | 49 && element.namespaceURI() == HTMLNames::xhtmlNamespaceURI; |
| 50 } | 50 } |
| 51 | 51 |
| 52 static bool isValidName(const AtomicString& name); | 52 static bool isValidName(const AtomicString& name); |
| 53 | 53 |
| 54 static bool shouldCreateCustomElement(Document&, const AtomicString& localNa
me); | 54 static bool shouldCreateCustomElement(Document&, const AtomicString& localNa
me); |
| 55 static bool shouldCreateCustomElement(Document&, const QualifiedName&); | 55 static bool shouldCreateCustomElement(Document&, const QualifiedName&); |
| 56 | 56 |
| 57 static HTMLElement* createCustomElement(Document&, const AtomicString& local
Name, CreateElementFlags); | 57 static HTMLElement* createCustomElementSync(Document&, const AtomicString& l
ocalName, ExceptionState&); |
| 58 static HTMLElement* createCustomElement(Document&, const QualifiedName&, Cre
ateElementFlags); | 58 static HTMLElement* createCustomElementSync(Document&, const QualifiedName&,
ExceptionState&); |
| 59 static HTMLElement* createCustomElementSync(Document&, const QualifiedName&)
; |
| 60 static HTMLElement* createCustomElementAsync(Document&, const QualifiedName&
); |
| 59 | 61 |
| 60 static void enqueueUpgradeReaction(Element*, CustomElementDefinition*); | 62 static void enqueueUpgradeReaction(Element*, CustomElementDefinition*); |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 static HTMLElement* createCustomElementAsync(Document&, CustomElementDefinit
ion&, const QualifiedName&); | 65 static HTMLElement* createUndefinedElement(Document&, const QualifiedName&); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace blink | 68 } // namespace blink |
| 67 | 69 |
| 68 #endif // CustomElement_h | 70 #endif // CustomElement_h |
| OLD | NEW |