Chromium Code Reviews| Index: Source/core/dom/CustomElementRegistry.cpp |
| diff --git a/Source/core/dom/CustomElementRegistry.cpp b/Source/core/dom/CustomElementRegistry.cpp |
| index e89575d3664af0311c0b8fcfd902b2e9f1f33e95..65b595a6a0e816c2e84a2a3a309a6147b90e98a2 100644 |
| --- a/Source/core/dom/CustomElementRegistry.cpp |
| +++ b/Source/core/dom/CustomElementRegistry.cpp |
| @@ -40,6 +40,7 @@ |
| #include "core/dom/Element.h" |
| #include "core/html/HTMLElement.h" |
| #include "core/svg/SVGElement.h" |
| +#include "wtf/Vector.h" |
| namespace WebCore { |
| @@ -131,25 +132,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. |
| + Vector<Element*> upgradeCandidates = m_candidates.takeUpgradeCandidatesFor(definition.get()); |
|
esprehn
2013/07/04 01:29:01
I think you want a const reference to avoid the co
|
| + for (Vector<Element*>::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); |