| Index: Source/core/dom/ContainerNode.cpp
|
| diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
|
| index 8964573589802af05f0155a52ba02ac8b493e9a8..85218b1f258be695a248586d87737a9a4c3a4c8e 100644
|
| --- a/Source/core/dom/ContainerNode.cpp
|
| +++ b/Source/core/dom/ContainerNode.cpp
|
| @@ -1315,6 +1315,30 @@ void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Nod
|
| }
|
| }
|
|
|
| +void ContainerNode::invalidateNodeListCachesInAncestors(const QualifiedName* attrName, Element* attributeOwnerElement)
|
| +{
|
| + if (hasRareData() && (!attrName || isAttributeNode())) {
|
| + if (NodeListsNodeData* lists = rareData()->nodeLists()) {
|
| + if (ChildNodeList* childNodeList = lists->childNodeList(*this))
|
| + childNodeList->invalidateCache();
|
| + }
|
| + }
|
| +
|
| + // Modifications to attributes that are not associated with an Element can't invalidate NodeList caches.
|
| + if (attrName && !attributeOwnerElement)
|
| + return;
|
| +
|
| + if (!document().shouldInvalidateNodeListCaches(attrName))
|
| + return;
|
| +
|
| + document().invalidateNodeListCaches(attrName);
|
| +
|
| + for (ContainerNode* node = this; node; node = node->parentNode()) {
|
| + if (NodeListsNodeData* lists = node->nodeLists())
|
| + lists->invalidateCaches(attrName);
|
| + }
|
| +}
|
| +
|
| PassRefPtrWillBeRawPtr<TagCollection> ContainerNode::getElementsByTagName(const AtomicString& localName)
|
| {
|
| if (localName.isNull())
|
|
|