| Index: Source/core/dom/CustomElementUpgradeCandidateMap.cpp
|
| diff --git a/Source/core/dom/CustomElementUpgradeCandidateMap.cpp b/Source/core/dom/CustomElementUpgradeCandidateMap.cpp
|
| index 7a66312d0f6ce9dc26bb56c30525b30dbf2b66a2..8583eb2046550b9cf3676a2e5cd3ca31b6d28a8c 100644
|
| --- a/Source/core/dom/CustomElementUpgradeCandidateMap.cpp
|
| +++ b/Source/core/dom/CustomElementUpgradeCandidateMap.cpp
|
| @@ -78,6 +78,23 @@ void CustomElementUpgradeCandidateMap::removeCommon(Element* element)
|
| m_upgradeCandidates.remove(candidate);
|
| }
|
|
|
| +void CustomElementUpgradeCandidateMap::elementDidFinishParsingChildren(Element* element)
|
| +{
|
| + // An upgrade candidate finished parsing; reorder so that eventual
|
| + // upgrade order matches finished-parsing order.
|
| + moveToEnd(element);
|
| +}
|
| +
|
| +void CustomElementUpgradeCandidateMap::moveToEnd(Element* element)
|
| +{
|
| + UpgradeCandidateMap::iterator candidate = m_upgradeCandidates.find(element);
|
| + ASSERT(candidate != m_upgradeCandidates.end());
|
| +
|
| + UnresolvedDefinitionMap::iterator elements = m_unresolvedDefinitions.find(candidate->value);
|
| + ASSERT(elements != m_unresolvedDefinitions.end());
|
| + elements->value.appendOrMoveToLast(element);
|
| +}
|
| +
|
| ListHashSet<Element*> CustomElementUpgradeCandidateMap::takeUpgradeCandidatesFor(const CustomElementDescriptor& descriptor)
|
| {
|
| const ListHashSet<Element*>& candidates = m_unresolvedDefinitions.take(descriptor);
|
|
|