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" |
11 #include "wtf/Allocator.h" | 11 #include "wtf/Allocator.h" |
12 #include "wtf/text/AtomicString.h" | 12 #include "wtf/text/AtomicString.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class Document; | 16 class Document; |
| 17 class Element; |
17 class HTMLElement; | 18 class HTMLElement; |
18 class QualifiedName; | 19 class QualifiedName; |
| 20 class CustomElementDefinition; |
19 class CustomElementRegistry; | 21 class CustomElementRegistry; |
20 | 22 |
21 class CORE_EXPORT CustomElement { | 23 class CORE_EXPORT CustomElement { |
22 STATIC_ONLY(CustomElement); | 24 STATIC_ONLY(CustomElement); |
23 public: | 25 public: |
24 // Retrieves the CustomElementsRegistry for Element, if any. This | 26 // Retrieves the CustomElementsRegistry for Element, if any. This |
25 // may be a different object for a given element over its lifetime | 27 // may be a different object for a given element over its lifetime |
26 // as it moves between documents. | 28 // as it moves between documents. |
27 static CustomElementsRegistry* registry(const Element&); | 29 static CustomElementsRegistry* registry(const Element&); |
28 | 30 |
(...skipping 17 matching lines...) Expand all Loading... |
46 && element.namespaceURI() == HTMLNames::xhtmlNamespaceURI; | 48 && element.namespaceURI() == HTMLNames::xhtmlNamespaceURI; |
47 } | 49 } |
48 | 50 |
49 static bool isValidName(const AtomicString& name); | 51 static bool isValidName(const AtomicString& name); |
50 | 52 |
51 static bool shouldCreateCustomElement(Document&, const AtomicString& localNa
me); | 53 static bool shouldCreateCustomElement(Document&, const AtomicString& localNa
me); |
52 static bool shouldCreateCustomElement(Document&, const QualifiedName&); | 54 static bool shouldCreateCustomElement(Document&, const QualifiedName&); |
53 | 55 |
54 static HTMLElement* createCustomElement(Document&, const AtomicString& local
Name, CreateElementFlags); | 56 static HTMLElement* createCustomElement(Document&, const AtomicString& local
Name, CreateElementFlags); |
55 static HTMLElement* createCustomElement(Document&, const QualifiedName&, Cre
ateElementFlags); | 57 static HTMLElement* createCustomElement(Document&, const QualifiedName&, Cre
ateElementFlags); |
| 58 |
| 59 static void enqueueUpgradeReaction(Element*, CustomElementDefinition*); |
56 }; | 60 }; |
57 | 61 |
58 } // namespace blink | 62 } // namespace blink |
59 | 63 |
60 #endif // CustomElement_h | 64 #endif // CustomElement_h |
OLD | NEW |