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

Unified Diff: Source/WebCore/dom/Node.cpp

Issue 10689138: Merge 120868 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 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/WebCore/dom/DynamicNodeList.h ('k') | Source/WebCore/dom/NodeRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/Node.cpp
===================================================================
--- Source/WebCore/dom/Node.cpp (revision 122244)
+++ Source/WebCore/dom/Node.cpp (working copy)
@@ -967,10 +967,7 @@
&& (attrName != idAttr || !attributeOwnerElement->isFormControlElement()))
return;
- if (document()->hasRareData()) {
- if (NodeListsNodeData* nodeLists = document()->rareData()->nodeLists())
- nodeLists->invalidateCachesForDocument();
- }
+ document()->clearNodeListCaches();
if (!treeScope()->hasNodeListCaches())
return;
@@ -992,13 +989,11 @@
if (hasRareData())
rareData()->clearChildNodeListCache();
- if (document()->hasRareData()) {
- if (NodeListsNodeData* nodeLists = document()->rareData()->nodeLists())
- nodeLists->invalidateCachesForDocument();
- }
+ document()->clearNodeListCaches();
if (!treeScope()->hasNodeListCaches())
return;
+
for (Node* node = this; node; node = node->parentNode()) {
if (!node->hasRareData())
continue;
@@ -2325,13 +2320,6 @@
invalidateCachesThatDependOnAttributes();
}
-void NodeListsNodeData::invalidateCachesForDocument()
-{
- NodeListsNodeData::NodeListSet::iterator end = m_listsInvalidatedAtDocument.end();
- for (NodeListsNodeData::NodeListSet::iterator it = m_listsInvalidatedAtDocument.begin(); it != end; ++it)
- (*it)->invalidateCache();
-}
-
void NodeListsNodeData::invalidateCachesThatDependOnAttributes()
{
ClassNodeListCache::iterator classCacheEnd = m_classNodeListCache.end();
@@ -2349,17 +2337,10 @@
for (MicroDataItemListCache::iterator it = m_microDataItemListCache.begin(); it != itemListCacheEnd; ++it)
it->second->invalidateCache();
#endif
-
- RadioNodeListCache::iterator radioNodeListCacheEnd = m_radioNodeListCache.end();
- for (RadioNodeListCache::iterator it = m_radioNodeListCache.begin(); it != radioNodeListCacheEnd; ++it)
- it->second->invalidateCache();
}
bool NodeListsNodeData::isEmpty() const
{
- if (!m_listsInvalidatedAtDocument.isEmpty())
- return false;
-
if (!m_tagNodeListCache.isEmpty())
return false;
if (!m_tagNodeListCacheNS.isEmpty())
« no previous file with comments | « Source/WebCore/dom/DynamicNodeList.h ('k') | Source/WebCore/dom/NodeRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698