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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSRuleList.h

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2006, 2012 Apple Computer, Inc. 4 * Copyright (C) 2002, 2006, 2012 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual CSSStyleSheet* styleSheet() const = 0; 50 virtual CSSStyleSheet* styleSheet() const = 0;
51 51
52 DEFINE_INLINE_VIRTUAL_TRACE() { } 52 DEFINE_INLINE_VIRTUAL_TRACE() { }
53 53
54 protected: 54 protected:
55 CSSRuleList() { } 55 CSSRuleList() { }
56 }; 56 };
57 57
58 class StaticCSSRuleList final : public CSSRuleList { 58 class StaticCSSRuleList final : public CSSRuleList {
59 public: 59 public:
60 static RawPtr<StaticCSSRuleList> create() 60 static StaticCSSRuleList* create()
61 { 61 {
62 return new StaticCSSRuleList(); 62 return new StaticCSSRuleList();
63 } 63 }
64 64
65 #if !ENABLE(OILPAN) 65 #if !ENABLE(OILPAN)
66 void ref() override { ++m_refCount; } 66 void ref() override { ++m_refCount; }
67 void deref() override; 67 void deref() override;
68 #endif 68 #endif
69 69
70 HeapVector<Member<CSSRule>>& rules() { return m_rules; } 70 HeapVector<Member<CSSRule>>& rules() { return m_rules; }
(...skipping 11 matching lines...) Expand all
82 82
83 HeapVector<Member<CSSRule>> m_rules; 83 HeapVector<Member<CSSRule>> m_rules;
84 #if !ENABLE(OILPAN) 84 #if !ENABLE(OILPAN)
85 unsigned m_refCount; 85 unsigned m_refCount;
86 #endif 86 #endif
87 }; 87 };
88 88
89 template <class Rule> 89 template <class Rule>
90 class LiveCSSRuleList final : public CSSRuleList { 90 class LiveCSSRuleList final : public CSSRuleList {
91 public: 91 public:
92 static RawPtr<LiveCSSRuleList> create(Rule* rule) 92 static LiveCSSRuleList* create(Rule* rule)
93 { 93 {
94 return new LiveCSSRuleList(rule); 94 return new LiveCSSRuleList(rule);
95 } 95 }
96 96
97 #if !ENABLE(OILPAN) 97 #if !ENABLE(OILPAN)
98 void ref() override { m_rule->ref(); } 98 void ref() override { m_rule->ref(); }
99 void deref() override { m_rule->deref(); } 99 void deref() override { m_rule->deref(); }
100 #endif 100 #endif
101 101
102 DEFINE_INLINE_VIRTUAL_TRACE() 102 DEFINE_INLINE_VIRTUAL_TRACE()
103 { 103 {
104 visitor->trace(m_rule); 104 visitor->trace(m_rule);
105 CSSRuleList::trace(visitor); 105 CSSRuleList::trace(visitor);
106 } 106 }
107 107
108 private: 108 private:
109 LiveCSSRuleList(Rule* rule) : m_rule(rule) { } 109 LiveCSSRuleList(Rule* rule) : m_rule(rule) { }
110 110
111 unsigned length() const override { return m_rule->length(); } 111 unsigned length() const override { return m_rule->length(); }
112 CSSRule* item(unsigned index) const override { return m_rule->item(index); } 112 CSSRule* item(unsigned index) const override { return m_rule->item(index); }
113 CSSStyleSheet* styleSheet() const override { return m_rule->parentStyleSheet (); } 113 CSSStyleSheet* styleSheet() const override { return m_rule->parentStyleSheet (); }
114 114
115 Member<Rule> m_rule; 115 Member<Rule> m_rule;
116 }; 116 };
117 117
118 } // namespace blink 118 } // namespace blink
119 119
120 #endif // CSSRuleList_h 120 #endif // CSSRuleList_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSReflectValue.h ('k') | third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698