| Index: Source/core/dom/ContainerNode.cpp
|
| diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
|
| index 8964573589802af05f0155a52ba02ac8b493e9a8..6b309481c8cf553d85f2e3fd637342ea5e202428 100644
|
| --- a/Source/core/dom/ContainerNode.cpp
|
| +++ b/Source/core/dom/ContainerNode.cpp
|
| @@ -1315,6 +1315,28 @@ void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Nod
|
| }
|
| }
|
|
|
| +void ContainerNode::invalidateNodeListCachesInAncestors(const QualifiedName* attrName, Element* attributeOwnerElement)
|
| +{
|
| + if (hasRareData() && (!attrName || isAttributeNode())) {
|
| + if (NodeListsNodeData* lists = rareData()->nodeLists())
|
| + lists->clearChildNodeListCache();
|
| + }
|
| +
|
| + // 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())
|
|
|