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

Unified Diff: Source/core/dom/CustomElementRegistry.h

Issue 14626005: Upgrade elements that are created before a custom element definition is registered (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar^2 better Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/CustomElementRegistry.h
diff --git a/Source/core/dom/CustomElementRegistry.h b/Source/core/dom/CustomElementRegistry.h
index 6a6153656ace9f050bd40d4fd1d4add29493f665..6d887187d16f0e14dcf5ea4d0c131fdeae8a005e 100644
--- a/Source/core/dom/CustomElementRegistry.h
+++ b/Source/core/dom/CustomElementRegistry.h
@@ -34,6 +34,7 @@
#include "bindings/v8/ScriptState.h"
#include "core/dom/ContextDestructionObserver.h"
#include "core/dom/CustomElementConstructor.h"
+#include "core/dom/CustomElementUpgradeCandidateMap.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/QualifiedName.h"
#include <wtf/HashSet.h>
@@ -87,7 +88,7 @@ public:
Document* document() const;
- void didGiveTypeExtension(Element*);
+ void didGiveTypeExtension(Element*, const AtomicString&);
void customElementWasDestroyed(Element*);
static bool isCustomTagName(const AtomicString& name) { return isValidName(name); }
@@ -97,9 +98,7 @@ public:
private:
typedef HashMap<AtomicString, RefPtr<CustomElementDefinition> > DefinitionMap;
- typedef HashSet<AtomicString> NameSet;
typedef ListHashSet<CustomElementRegistry*> InstanceSet;
- typedef HashSet<Element*> ElementSet;
static bool isValidName(const AtomicString&);
@@ -109,11 +108,12 @@ private:
void deliverLifecycleCallbacks();
void didCreateCustomTagElement(Element*);
- void didCreateUnresolvedElement(Element*);
+ void didCreateUnresolvedElement(CustomElementDefinition::CustomElementKind, const AtomicString& type, Element*);
DefinitionMap m_definitions;
+ CustomElementUpgradeCandidateMap m_candidates;
+
Vector<CustomElementInvocation> m_invocations;
- ElementSet m_unresolvedElements;
};
inline void CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded()

Powered by Google App Engine
This is Rietveld 408576698