OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 struct SameSizeAsRuleData { | 112 struct SameSizeAsRuleData { |
113 DISALLOW_ALLOCATION(); | 113 DISALLOW_ALLOCATION(); |
114 void* a; | 114 void* a; |
115 unsigned b; | 115 unsigned b; |
116 unsigned c; | 116 unsigned c; |
117 unsigned d[4]; | 117 unsigned d[4]; |
118 }; | 118 }; |
119 | 119 |
120 static_assert(sizeof(RuleData) == sizeof(SameSizeAsRuleData), "RuleData should s
tay small"); | 120 static_assert(sizeof(RuleData) == sizeof(SameSizeAsRuleData), "RuleData should s
tay small"); |
121 | 121 |
122 class CORE_EXPORT RuleSet : public NoBaseWillBeGarbageCollectedFinalized<RuleSet
> { | 122 class CORE_EXPORT RuleSet final : public NoBaseWillBeGarbageCollectedFinalized<R
uleSet> { |
123 WTF_MAKE_NONCOPYABLE(RuleSet); | 123 WTF_MAKE_NONCOPYABLE(RuleSet); |
124 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(RuleSet); | 124 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(RuleSet); |
125 public: | 125 public: |
126 static PassOwnPtrWillBeRawPtr<RuleSet> create() { return adoptPtrWillBeNoop(
new RuleSet); } | 126 static PassOwnPtrWillBeRawPtr<RuleSet> create() |
| 127 { |
| 128 return adoptPtrWillBeNoop(new RuleSet); |
| 129 } |
| 130 ~RuleSet(); |
| 131 #if ENABLE(OILPAN) |
| 132 void dispose(); |
| 133 #endif |
127 | 134 |
128 void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, AddR
uleFlags = RuleHasNoSpecialState); | 135 void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, AddR
uleFlags = RuleHasNoSpecialState); |
129 void addStyleRule(StyleRule*, AddRuleFlags); | 136 void addStyleRule(StyleRule*, AddRuleFlags); |
130 void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags); | 137 void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags); |
131 | 138 |
132 const RuleFeatureSet& features() const { return m_features; } | 139 const RuleFeatureSet& features() const { return m_features; } |
133 | 140 |
134 const WillBeHeapTerminatedArray<RuleData>* idRules(const AtomicString& key)
const { ASSERT(!m_pendingRules); return m_idRules.get(key); } | 141 const WillBeHeapTerminatedArray<RuleData>* idRules(const AtomicString& key)
const { ASSERT(!m_pendingRules); return m_idRules.get(key); } |
135 const WillBeHeapTerminatedArray<RuleData>* classRules(const AtomicString& ke
y) const { ASSERT(!m_pendingRules); return m_classRules.get(key); } | 142 const WillBeHeapTerminatedArray<RuleData>* classRules(const AtomicString& ke
y) const { ASSERT(!m_pendingRules); return m_classRules.get(key); } |
136 const WillBeHeapTerminatedArray<RuleData>* tagRules(const AtomicString& key)
const { ASSERT(!m_pendingRules); return m_tagRules.get(key); } | 143 const WillBeHeapTerminatedArray<RuleData>* tagRules(const AtomicString& key)
const { ASSERT(!m_pendingRules); return m_tagRules.get(key); } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 WillBeHeapVector<RuleData> m_allRules; | 239 WillBeHeapVector<RuleData> m_allRules; |
233 #endif | 240 #endif |
234 }; | 241 }; |
235 | 242 |
236 } // namespace blink | 243 } // namespace blink |
237 | 244 |
238 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); | 245 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); |
239 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MinimalRuleData); | 246 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MinimalRuleData); |
240 | 247 |
241 #endif // RuleSet_h | 248 #endif // RuleSet_h |
OLD | NEW |