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

Unified Diff: Source/core/css/invalidation/StyleInvalidator.cpp

Issue 217423012: Avoid the hash table StyleInvalidator::clearInvalidation in Node::detach when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/invalidation/StyleInvalidator.cpp
diff --git a/Source/core/css/invalidation/StyleInvalidator.cpp b/Source/core/css/invalidation/StyleInvalidator.cpp
index cd53db244ef75f468a674bab7496a822d8228e87..d62df05eb8dc6f4fbdf27930a6d4c9d19f047957 100644
--- a/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -41,10 +41,10 @@ StyleInvalidator::InvalidationList& StyleInvalidator::ensurePendingInvalidationL
void StyleInvalidator::clearInvalidation(Node& node)
{
+ if (node.isElementNode() && node.needsStyleInvalidation())
+ m_pendingInvalidationMap.remove(toElement(&node));
node.clearChildNeedsStyleInvalidation();
node.clearNeedsStyleInvalidation();
- if (node.isElementNode())
- m_pendingInvalidationMap.remove(toElement(&node));
}
void StyleInvalidator::clearPendingInvalidations()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698