Index: Source/core/css/ElementRuleCollector.h |
diff --git a/Source/core/css/ElementRuleCollector.h b/Source/core/css/ElementRuleCollector.h |
index c3199498ee862bf907f53535f575f19c9f9be320..5e04aa450098575620cd6a3c205e3390055cfa1d 100644 |
--- a/Source/core/css/ElementRuleCollector.h |
+++ b/Source/core/css/ElementRuleCollector.h |
@@ -83,20 +83,20 @@ WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MatchedRule); |
namespace blink { |
-// FIXME: oilpan: when transition types are gone this class can be replaced with HeapVector. |
+#if ENABLE(OILPAN) |
+using StyleRuleList = HeapVector<Member<StyleRule>>; |
+#else |
class StyleRuleList final : public RefCountedWillBeGarbageCollected<StyleRuleList> { |
haraken
2015/03/10 16:16:06
RefCountedWillBeGarbageCollected => RefCounted
sof
2015/03/11 10:53:32
Thanks, missed that one - fixed.
|
public: |
- static PassRefPtrWillBeRawPtr<StyleRuleList> create() { return adoptRefWillBeNoop(new StyleRuleList()); } |
+ static PassRefPtr<StyleRuleList> create() { return adoptRef(new StyleRuleList()); } |
- DEFINE_INLINE_TRACE() |
- { |
-#if ENABLE(OILPAN) |
- visitor->trace(m_list); |
-#endif |
- } |
+ void append(StyleRule* rule) { m_list.append(rule); } |
+ StyleRule* at(size_t index) const { return m_list[index]; } |
+ size_t size() const { return m_list.size(); } |
- WillBeHeapVector<RawPtrWillBeMember<StyleRule> > m_list; |
+ Vector<StyleRule*> m_list; |
}; |
+#endif |
// ElementRuleCollector is designed to be used as a stack object. |
// Create one, ask what rules the ElementResolveContext matches |