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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 23049008: Replace style sharing cousin list search with LRU (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updating to ToT Created 7 years, 3 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/resolver/StyleResolver.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 0341b1eedf196c5b80a67577b2bcaad7176b61c9..0dd3b83fdbfa71bb26faac6cc44fa308e64b8b09 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -243,6 +243,18 @@ void StyleResolver::collectFeatures()
m_uncommonAttributeRuleSet = makeRuleSet(m_features.uncommonAttributeRules);
}
+void StyleResolver::addToStyleSharingList(Element* element)
+{
+ if (m_styleSharingList.size() >= styleSharingListSize)
+ m_styleSharingList.remove(--m_styleSharingList.end());
+ m_styleSharingList.prepend(element);
+}
+
+void StyleResolver::clearStyleSharingList()
+{
+ m_styleSharingList.clear();
+}
+
void StyleResolver::pushParentElement(Element* parent)
{
ASSERT(parent);
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698