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

Unified Diff: Source/WebCore/dom/Document.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/Document.h ('k') | Source/WebCore/dom/DynamicNodeList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/Document.cpp
===================================================================
--- Source/WebCore/dom/Document.cpp (revision 122244)
+++ Source/WebCore/dom/Document.cpp (working copy)
@@ -3864,16 +3864,21 @@
void Document::registerDynamicSubtreeNodeList(DynamicSubtreeNodeList* list)
{
- ensureRareData()->ensureNodeLists(this)->m_listsInvalidatedAtDocument.add(list);
+ m_listsInvalidatedAtDocument.add(list);
}
void Document::unregisterDynamicSubtreeNodeList(DynamicSubtreeNodeList* list)
{
- ASSERT(hasRareData());
- ASSERT(rareData()->nodeLists());
- rareData()->nodeLists()->m_listsInvalidatedAtDocument.remove(list);
+ m_listsInvalidatedAtDocument.remove(list);
}
+void Document::clearNodeListCaches()
+{
+ HashSet<DynamicSubtreeNodeList*>::iterator end = m_listsInvalidatedAtDocument.end();
+ for (HashSet<DynamicSubtreeNodeList*>::iterator it = m_listsInvalidatedAtDocument.begin(); it != end; ++it)
+ (*it)->invalidateCache();
+}
+
void Document::attachNodeIterator(NodeIterator* ni)
{
m_nodeIterators.add(ni);
« no previous file with comments | « Source/WebCore/dom/Document.h ('k') | Source/WebCore/dom/DynamicNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698