Index: Source/core/css/resolver/StyleResolver.h |
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h |
index 7e96b72cefc67bdd2180dbb9bfda6779638babb4..ddc57b56b76d79ed04ebe55a374bb9bae8113bf5 100644 |
--- a/Source/core/css/resolver/StyleResolver.h |
+++ b/Source/core/css/resolver/StyleResolver.h |
@@ -36,6 +36,7 @@ |
#include "core/css/resolver/StyleBuilder.h" |
#include "core/css/resolver/StyleResolverState.h" |
#include "core/css/resolver/StyleResourceLoader.h" |
+#include "wtf/Deque.h" |
#include "wtf/HashMap.h" |
#include "wtf/HashSet.h" |
#include "wtf/RefPtr.h" |
@@ -85,6 +86,9 @@ enum RuleMatchingBehavior { |
MatchOnlyUserAgentRules, |
}; |
+const unsigned styleSharingListSize = 40; |
+typedef WTF::Deque<RefPtr<Element>, styleSharingListSize> StyleSharingList; |
+ |
#undef STYLE_STATS |
#ifdef STYLE_STATS |
@@ -271,6 +275,11 @@ public: |
const RuleFeatureSet& ruleFeatureSet() const { return m_features; } |
+ StyleSharingList& styleSharingList() { return m_styleSharingList; } |
+ |
+ void addToStyleSharingList(Element*); |
+ void clearStyleSharingList(); |
+ |
#ifdef STYLE_STATS |
ALWAYS_INLINE static StyleSharingStats& styleSharingStats() { return m_styleSharingStats; } |
#endif |
@@ -354,6 +363,8 @@ private: |
StyleResourceLoader m_styleResourceLoader; |
+ StyleSharingList m_styleSharingList; |
+ |
#ifdef STYLE_STATS |
static StyleSharingStats m_styleSharingStats; |
#endif |