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

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

Issue 18258003: Pow __proto__, sock :unresolved, and clunk the created callback at once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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.cpp
diff --git a/Source/core/dom/CustomElementRegistry.cpp b/Source/core/dom/CustomElementRegistry.cpp
index e89575d3664af0311c0b8fcfd902b2e9f1f33e95..b662d62942c72d3ccebd9ccba01b039e662227c3 100644
--- a/Source/core/dom/CustomElementRegistry.cpp
+++ b/Source/core/dom/CustomElementRegistry.cpp
@@ -131,25 +131,19 @@ void CustomElementRegistry::registerElement(CustomElementConstructorBuilder* con
m_definitions.add(definition->type(), definition);
- // Upgrade elements that were waiting for this definition.
- CustomElementUpgradeCandidateMap::ElementSet upgradeCandidates = m_candidates.takeUpgradeCandidatesFor(definition.get());
- if (!constructorBuilder->didRegisterDefinition(definition.get(), upgradeCandidates)) {
+ if (!constructorBuilder->didRegisterDefinition(definition.get())) {
ec = NOT_SUPPORTED_ERR;
return;
}
- for (CustomElementUpgradeCandidateMap::ElementSet::iterator it = upgradeCandidates.begin(); it != upgradeCandidates.end(); ++it) {
- (*it)->setNeedsStyleRecalc(); // :unresolved has changed
+ // Upgrade elements that were waiting for this definition.
+ CustomElementUpgradeCandidateMap::ElementSet upgradeCandidates = m_candidates.takeUpgradeCandidatesFor(definition.get());
esprehn 2013/07/04 00:54:58 Why does this use an HashSet? takeUpgradeCandidate
+ for (CustomElementUpgradeCandidateMap::ElementSet::iterator it = upgradeCandidates.begin(); it != upgradeCandidates.end(); ++it) {
CustomElementCallbackDispatcher::instance().enqueueCreatedCallback(lifecycleCallbacks.get(), *it);
}
}
-bool CustomElementRegistry::isUnresolved(Element* element) const
-{
- return m_candidates.contains(element);
-}
-
PassRefPtr<CustomElementDefinition> CustomElementRegistry::findFor(Element* element) const
{
ASSERT(element->document()->registry() == this);

Powered by Google App Engine
This is Rietveld 408576698