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

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

Issue 1173283002: Move some Element specific code from Node::detach to Element::detach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/css/invalidation/StyleInvalidator.h ('k') | Source/core/dom/Document.h » ('j') | 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 b2f94cd339c9464652f827fcda7ce6ef215aef00..ddc28c70b6e8607355a4e9245bac2d1f5bca3d2d 100644
--- a/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -68,10 +68,12 @@ StyleInvalidator::InvalidationList& StyleInvalidator::ensurePendingInvalidationL
return *addResult.storedValue->value;
}
-void StyleInvalidator::clearInvalidation(Node& node)
+void StyleInvalidator::clearInvalidation(Element& element)
{
- if (node.isElementNode() && node.needsStyleInvalidation())
- m_pendingInvalidationMap.remove(toElement(&node));
+ if (!element.needsStyleInvalidation())
+ return;
+ m_pendingInvalidationMap.remove(&element);
+ element.clearNeedsStyleInvalidation();
}
void StyleInvalidator::clearPendingInvalidations()
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698