| Index: third_party/WebKit/Source/core/html/HTMLCollection.h
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.h b/third_party/WebKit/Source/core/html/HTMLCollection.h
|
| index 35f4b5496821add31de8cb9673c5afe795c22c86..8ea1e44467c4370966fdf2d03adde76be38448eb 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCollection.h
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCollection.h
|
| @@ -117,7 +117,9 @@ protected:
|
| void setNamedItemCache(PassOwnPtrWillBeRawPtr<NamedItemCache> cache) const
|
| {
|
| ASSERT(!m_namedItemCache);
|
| - document().registerNodeListWithIdNameCache(this);
|
| + // Do not repeat registration for the same invalidation type.
|
| + if (invalidationType() != InvalidateOnIdNameAttrChange)
|
| + document().registerNodeListWithIdNameCache(this);
|
| m_namedItemCache = std::move(cache);
|
| }
|
|
|
| @@ -144,7 +146,9 @@ private:
|
| void unregisterIdNameCacheFromDocument(Document& document) const
|
| {
|
| ASSERT(hasValidIdNameCache());
|
| - document.unregisterNodeListWithIdNameCache(this);
|
| + // Do not repeat unregistration for the same invalidation type.
|
| + if (invalidationType() != InvalidateOnIdNameAttrChange)
|
| + document.unregisterNodeListWithIdNameCache(this);
|
| }
|
|
|
| const unsigned m_overridesItemAfter : 1;
|
|
|