Index: Source/core/css/ElementRuleCollector.h |
diff --git a/Source/core/css/ElementRuleCollector.h b/Source/core/css/ElementRuleCollector.h |
index 5c169b6eb907a4c1834a2013e6f483f9e6f22125..eddc516114744e622acb89e30fb94dd696d9d423 100644 |
--- a/Source/core/css/ElementRuleCollector.h |
+++ b/Source/core/css/ElementRuleCollector.h |
@@ -47,9 +47,9 @@ const CascadeScope ignoreCascadeScope = 0; |
const CascadeOrder ignoreCascadeOrder = 0; |
class MatchedRule { |
- WTF_MAKE_FAST_ALLOCATED; |
+ ALLOW_ONLY_INLINE_ALLOCATION(); |
public: |
- explicit MatchedRule(const RuleData* ruleData, unsigned specificity, CascadeScope cascadeScope, CascadeOrder cascadeOrder, unsigned styleSheetIndex, const CSSStyleSheet* parentStyleSheet) |
+ MatchedRule(const RuleData* ruleData, unsigned specificity, CascadeScope cascadeScope, CascadeOrder cascadeOrder, unsigned styleSheetIndex, const CSSStyleSheet* parentStyleSheet) |
: m_ruleData(ruleData) |
, m_specificity(specificity) |
, m_cascadeScope(cascadeScope) |
@@ -66,15 +66,34 @@ public: |
uint64_t position() const { return m_position; } |
unsigned specificity() const { return ruleData()->specificity() + m_specificity; } |
const CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } |
+ void trace(Visitor* visitor) |
+ { |
+ visitor->trace(m_ruleData); |
+ visitor->trace(m_parentStyleSheet); |
+ } |
private: |
- const RuleData* m_ruleData; |
+ RawPtrWillBeMember<const RuleData> m_ruleData; |
Mads Ager (chromium)
2014/03/17 13:57:24
This change should have been caught by the COMPILE
|
unsigned m_specificity; |
CascadeScope m_cascadeScope; |
uint64_t m_position; |
- const CSSStyleSheet* m_parentStyleSheet; |
+ RawPtrWillBeMember<const CSSStyleSheet> m_parentStyleSheet; |
}; |
+} // namespace WebCore |
+ |
+ |
+namespace WTF { |
+ |
+template <> struct VectorTraits<WebCore::MatchedRule> : VectorTraitsBase<WebCore::MatchedRule> { |
+ static const bool canInitializeWithMemset = true; |
+ static const bool canMoveWithMemcpy = true; |
+}; |
+ |
+} // namespace WTF |
+ |
+namespace WebCore { |
+ |
// FIXME: oilpan: when transition types are gone this class can be replaced with HeapVector. |
class StyleRuleList : public RefCounted<StyleRuleList> { |
public: |
@@ -150,7 +169,7 @@ private: |
bool m_sameOriginOnly; |
bool m_matchingUARules; |
- OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; |
+ OwnPtrWillBeMember<WillBeHeapVector<MatchedRule, 32> > m_matchedRules; |
// Output. |
RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; |