Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: Source/core/html/HTMLFormControlsCollection.cpp

Issue 159503003: Do not cause unnecessary node lists invalidation on id/name attribute change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlsCollection.cpp
diff --git a/Source/core/html/HTMLFormControlsCollection.cpp b/Source/core/html/HTMLFormControlsCollection.cpp
index 491efe00db162b2348b33ed65a1c7eecad975f24..6b2a2902e1454c6a8f2248db2b00d052da270c67 100644
--- a/Source/core/html/HTMLFormControlsCollection.cpp
+++ b/Source/core/html/HTMLFormControlsCollection.cpp
@@ -104,9 +104,9 @@ Element* HTMLFormControlsCollection::virtualItemAfter(Element* previous) const
return 0;
}
-void HTMLFormControlsCollection::invalidateCache() const
+void HTMLFormControlsCollection::invalidateCache(Document* oldDocument) const
{
- HTMLCollection::invalidateCache();
+ HTMLCollection::invalidateCache(oldDocument);
m_cachedElement = 0;
m_cachedElementOffsetInArray = 0;
}
@@ -150,9 +150,9 @@ Element* HTMLFormControlsCollection::namedItem(const AtomicString& name) const
return firstNamedItem(formControlElements(), imagesElements, nameAttr, name);
}
-void HTMLFormControlsCollection::updateNameCache() const
+void HTMLFormControlsCollection::updateIdNameCache() const
{
- if (hasNameCache())
+ if (hasValidIdNameCache())
return;
HashSet<StringImpl*> foundInputElements;
@@ -189,7 +189,7 @@ void HTMLFormControlsCollection::updateNameCache() const
}
}
- setHasNameCache();
+ setHasValidIdNameCache();
}
void HTMLFormControlsCollection::namedGetter(const AtomicString& name, bool& radioNodeListEnabled, RefPtr<RadioNodeList>& radioNodeList, bool& elementEnabled, RefPtr<Element>& element)
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698