Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElement.h

Issue 2132343002: Make Custom Elements V1 work in HTML imports documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: imports-create tests checks the order of constructors Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 class CustomElementRegistry; 22 class CustomElementRegistry;
23 23
24 class CORE_EXPORT CustomElement { 24 class CORE_EXPORT CustomElement {
25 STATIC_ONLY(CustomElement); 25 STATIC_ONLY(CustomElement);
26 public: 26 public:
27 // Retrieves the CustomElementsRegistry for Element, if any. This 27 // Retrieves the CustomElementsRegistry for Element, if any. This
28 // may be a different object for a given element over its lifetime 28 // may be a different object for a given element over its lifetime
29 // as it moves between documents. 29 // as it moves between documents.
30 static CustomElementsRegistry* registry(const Element&); 30 static CustomElementsRegistry* registry(const Element&);
31 static CustomElementsRegistry* registry(const Document&); 31 static CustomElementsRegistry* registry(const Document&);
32 static FrameHost* contextFrameHost(const Element&);
32 33
33 static CustomElementDefinition* definitionForElement(const Element&); 34 static CustomElementDefinition* definitionForElement(const Element&);
34 35
35 static bool isValidName(const AtomicString& name); 36 static bool isValidName(const AtomicString& name);
36 37
37 static bool shouldCreateCustomElement(Document&, const AtomicString& localNa me); 38 static bool shouldCreateCustomElement(Document&, const AtomicString& localNa me);
38 static bool shouldCreateCustomElement(Document&, const QualifiedName&); 39 static bool shouldCreateCustomElement(Document&, const QualifiedName&);
39 40
40 static HTMLElement* createCustomElementSync(Document&, const AtomicString& l ocalName, ExceptionState&); 41 static HTMLElement* createCustomElementSync(Document&, const AtomicString& l ocalName, ExceptionState&);
41 static HTMLElement* createCustomElementSync(Document&, const QualifiedName&, ExceptionState&); 42 static HTMLElement* createCustomElementSync(Document&, const QualifiedName&, ExceptionState&);
42 static HTMLElement* createCustomElementSync(Document&, const QualifiedName&) ; 43 static HTMLElement* createCustomElementSync(Document&, const QualifiedName&) ;
43 static HTMLElement* createCustomElementAsync(Document&, const QualifiedName& ); 44 static HTMLElement* createCustomElementAsync(Document&, const QualifiedName& );
44 45
45 static void enqueue(Element*, CustomElementReaction*); 46 static void enqueue(Element*, CustomElementReaction*);
46 static void enqueueConnectedCallback(Element*); 47 static void enqueueConnectedCallback(Element*);
47 static void enqueueDisconnectedCallback(Element*); 48 static void enqueueDisconnectedCallback(Element*);
48 static void enqueueAttributeChangedCallback(Element*, const QualifiedName&, 49 static void enqueueAttributeChangedCallback(Element*, const QualifiedName&,
49 const AtomicString& oldValue, const AtomicString& newValue); 50 const AtomicString& oldValue, const AtomicString& newValue);
50 51
51 static void tryToUpgrade(Element*); 52 static void tryToUpgrade(Element*);
52 53
53 private: 54 private:
54 static HTMLElement* createUndefinedElement(Document&, const QualifiedName&); 55 static HTMLElement* createUndefinedElement(Document&, const QualifiedName&);
55 }; 56 };
56 57
57 } // namespace blink 58 } // namespace blink
58 59
59 #endif // CustomElement_h 60 #endif // CustomElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698