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

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: Feedback+test 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
« no previous file with comments | « Source/core/dom/CustomElementDefinition.h ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/CustomElementRegistry.h
diff --git a/Source/core/dom/CustomElementRegistry.h b/Source/core/dom/CustomElementRegistry.h
index 6a6153656ace9f050bd40d4fd1d4add29493f665..9ae6c860919184d5bc957b06984403d039ef6b66 100644
--- a/Source/core/dom/CustomElementRegistry.h
+++ b/Source/core/dom/CustomElementRegistry.h
@@ -34,16 +34,17 @@
#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>
-#include <wtf/ListHashSet.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
-#include <wtf/text/AtomicString.h>
-#include <wtf/text/AtomicStringHash.h>
+#include "wtf/HashSet.h"
+#include "wtf/ListHashSet.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
+#include "wtf/text/AtomicStringHash.h"
namespace WebCore {
@@ -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()
« no previous file with comments | « Source/core/dom/CustomElementDefinition.h ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698