Index: Source/core/css/ElementRuleCollector.h |
diff --git a/Source/core/css/ElementRuleCollector.h b/Source/core/css/ElementRuleCollector.h |
index 676c66a63772c2fddb94bc28673a186b3a0e5684..3fbc161d91576c57694001d1d6bc17cb9ee028dd 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. |
-class StyleRuleList final : public RefCountedWillBeGarbageCollected<StyleRuleList> { |
+#if ENABLE(OILPAN) |
+using StyleRuleList = HeapVector<Member<StyleRule>>; |
+#else |
+class StyleRuleList final : public RefCounted<StyleRuleList> { |
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 |