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

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

Issue 18258003: Pow __proto__, sock :unresolved, and clunk the created callback at once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use a vector for upgrade candidates. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/CustomElementUpgradeCandidateMap.h
diff --git a/Source/core/dom/CustomElementUpgradeCandidateMap.h b/Source/core/dom/CustomElementUpgradeCandidateMap.h
index 84d3d9186c13e27ccb19e3dca35b6d30ee5dd1c9..851bce27eed224fcf8f5a7e81e2b11b15e4d80a7 100644
--- a/Source/core/dom/CustomElementUpgradeCandidateMap.h
+++ b/Source/core/dom/CustomElementUpgradeCandidateMap.h
@@ -36,6 +36,7 @@
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
#include "wtf/Noncopyable.h"
+#include "wtf/Vector.h"
#include "wtf/text/AtomicString.h"
#include "wtf/text/AtomicStringHash.h"
@@ -46,21 +47,19 @@ class CustomElementUpgradeCandidateMap {
public:
CustomElementUpgradeCandidateMap() { }
- typedef HashSet<Element*> ElementSet;
-
void add(CustomElementDefinition::CustomElementKind, const AtomicString& type, Element*);
- bool contains(Element*) const;
void remove(Element*);
- ElementSet takeUpgradeCandidatesFor(CustomElementDefinition*);
+ Vector<Element*> takeUpgradeCandidatesFor(CustomElementDefinition*);
private:
typedef std::pair<CustomElementDefinition::CustomElementKind, AtomicString> RequiredDefinition;
- typedef HashMap<Element*, RequiredDefinition> UnresolvedElementMap;
+ typedef HashMap<Element*, RequiredDefinition> UpgradeCandidateMap;
+ typedef HashSet<Element*> ElementSet;
typedef HashMap<AtomicString, ElementSet> UnresolvedDefinitionMap;
bool matches(CustomElementDefinition*, Element*);
- UnresolvedElementMap m_unresolvedElements;
+ UpgradeCandidateMap m_upgradeCandidates;
UnresolvedDefinitionMap m_unresolvedDefinitions;
};

Powered by Google App Engine
This is Rietveld 408576698