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

Unified Diff: Source/core/dom/Element.cpp

Issue 342283005: Make collection caching code more consistent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 6 years, 5 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/dom/Element.h ('k') | Source/core/dom/NodeListsNodeData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 5702c3af1d76f1b6db00285099fcbb6171e5c191..11fbccd74a3891a4971d9f1d6f1619055fc09aa7 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2918,34 +2918,11 @@ void Element::updateExtraNamedItemRegistration(const AtomicString& oldId, const
toHTMLDocument(document()).addExtraNamedItem(newId);
}
-PassRefPtrWillBeRawPtr<HTMLCollection> Element::ensureCachedHTMLCollection(CollectionType type)
-{
- if (HTMLCollection* collection = cachedHTMLCollection(type))
- return collection;
-
- if (type == TableRows) {
- ASSERT(isHTMLTableElement(this));
- return ensureRareData().ensureNodeLists().addCache<HTMLTableRowsCollection>(*this, type);
- } else if (type == SelectOptions) {
- ASSERT(isHTMLSelectElement(this));
- return ensureRareData().ensureNodeLists().addCache<HTMLOptionsCollection>(*this, type);
- } else if (type == FormControls) {
- ASSERT(isHTMLFormElement(this) || isHTMLFieldSetElement(this));
- return ensureRareData().ensureNodeLists().addCache<HTMLFormControlsCollection>(*this, type);
- }
- return ensureRareData().ensureNodeLists().addCache<HTMLCollection>(*this, type);
-}
-
void Element::scheduleSVGFilterLayerUpdateHack()
{
document().scheduleSVGFilterLayerUpdateHack(*this);
}
-HTMLCollection* Element::cachedHTMLCollection(CollectionType type)
-{
- return hasRareData() && rareData()->nodeLists() ? rareData()->nodeLists()->cached<HTMLCollection>(type) : 0;
-}
-
IntSize Element::savedLayerScrollOffset() const
{
return hasRareData() ? elementRareData()->savedLayerScrollOffset() : IntSize();
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/NodeListsNodeData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698