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

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

Issue 14846002: Implement the Custom Elements :unresolved pseudoclass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adds a test and fixes style sharing. 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/css/StyleResolver.cpp ('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 86869d94433fd287360eab00667df061bb7403c6..6a6153656ace9f050bd40d4fd1d4add29493f665 100644
--- a/Source/core/dom/CustomElementRegistry.h
+++ b/Source/core/dom/CustomElementRegistry.h
@@ -79,6 +79,7 @@ public:
PassRefPtr<CustomElementConstructor> registerElement(WebCore::ScriptState*, const AtomicString& name, const Dictionary& options, ExceptionCode&);
+ bool isUnresolved(Element*) const;
PassRefPtr<CustomElementDefinition> findFor(Element*) const;
PassRefPtr<CustomElementDefinition> findAndCheckNamespace(const AtomicString& type, const AtomicString& namespaceURI) const;
@@ -87,6 +88,7 @@ public:
Document* document() const;
void didGiveTypeExtension(Element*);
+ void customElementWasDestroyed(Element*);
static bool isCustomTagName(const AtomicString& name) { return isValidName(name); }
@@ -97,6 +99,7 @@ private:
typedef HashMap<AtomicString, RefPtr<CustomElementDefinition> > DefinitionMap;
typedef HashSet<AtomicString> NameSet;
typedef ListHashSet<CustomElementRegistry*> InstanceSet;
+ typedef HashSet<Element*> ElementSet;
static bool isValidName(const AtomicString&);
@@ -106,9 +109,11 @@ private:
void deliverLifecycleCallbacks();
void didCreateCustomTagElement(Element*);
+ void didCreateUnresolvedElement(Element*);
DefinitionMap m_definitions;
Vector<CustomElementInvocation> m_invocations;
+ ElementSet m_unresolvedElements;
dglazkov 2013/05/02 16:36:28 So this is the candidates map?
};
inline void CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded()
« no previous file with comments | « Source/core/css/StyleResolver.cpp ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698