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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: Worked on Review Comments done Created 3 years, 9 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 * 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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 void addRulesFromSheet(StyleSheetContents*, 153 void addRulesFromSheet(StyleSheetContents*,
154 const MediaQueryEvaluator&, 154 const MediaQueryEvaluator&,
155 AddRuleFlags = RuleHasNoSpecialState); 155 AddRuleFlags = RuleHasNoSpecialState);
156 void addStyleRule(StyleRule*, AddRuleFlags); 156 void addStyleRule(StyleRule*, AddRuleFlags);
157 void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags); 157 void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags);
158 158
159 const RuleFeatureSet& features() const { return m_features; } 159 const RuleFeatureSet& features() const { return m_features; }
160 160
161 const HeapTerminatedArray<RuleData>* idRules(const AtomicString& key) const { 161 const HeapTerminatedArray<RuleData>* idRules(const AtomicString& key) const {
162 ASSERT(!m_pendingRules); 162 DCHECK(!m_pendingRules);
163 return m_idRules.at(key); 163 return m_idRules.at(key);
164 } 164 }
165 const HeapTerminatedArray<RuleData>* classRules( 165 const HeapTerminatedArray<RuleData>* classRules(
166 const AtomicString& key) const { 166 const AtomicString& key) const {
167 ASSERT(!m_pendingRules); 167 DCHECK(!m_pendingRules);
168 return m_classRules.at(key); 168 return m_classRules.at(key);
169 } 169 }
170 const HeapTerminatedArray<RuleData>* tagRules(const AtomicString& key) const { 170 const HeapTerminatedArray<RuleData>* tagRules(const AtomicString& key) const {
171 ASSERT(!m_pendingRules); 171 DCHECK(!m_pendingRules);
172 return m_tagRules.at(key); 172 return m_tagRules.at(key);
173 } 173 }
174 const HeapTerminatedArray<RuleData>* shadowPseudoElementRules( 174 const HeapTerminatedArray<RuleData>* shadowPseudoElementRules(
175 const AtomicString& key) const { 175 const AtomicString& key) const {
176 ASSERT(!m_pendingRules); 176 DCHECK(!m_pendingRules);
177 return m_shadowPseudoElementRules.at(key); 177 return m_shadowPseudoElementRules.at(key);
178 } 178 }
179 const HeapVector<RuleData>* linkPseudoClassRules() const { 179 const HeapVector<RuleData>* linkPseudoClassRules() const {
180 ASSERT(!m_pendingRules); 180 DCHECK(!m_pendingRules);
181 return &m_linkPseudoClassRules; 181 return &m_linkPseudoClassRules;
182 } 182 }
183 const HeapVector<RuleData>* cuePseudoRules() const { 183 const HeapVector<RuleData>* cuePseudoRules() const {
184 ASSERT(!m_pendingRules); 184 DCHECK(!m_pendingRules);
185 return &m_cuePseudoRules; 185 return &m_cuePseudoRules;
186 } 186 }
187 const HeapVector<RuleData>* focusPseudoClassRules() const { 187 const HeapVector<RuleData>* focusPseudoClassRules() const {
188 ASSERT(!m_pendingRules); 188 DCHECK(!m_pendingRules);
189 return &m_focusPseudoClassRules; 189 return &m_focusPseudoClassRules;
190 } 190 }
191 const HeapVector<RuleData>* placeholderPseudoRules() const { 191 const HeapVector<RuleData>* placeholderPseudoRules() const {
192 DCHECK(!m_pendingRules); 192 DCHECK(!m_pendingRules);
193 return &m_placeholderPseudoRules; 193 return &m_placeholderPseudoRules;
194 } 194 }
195 const HeapVector<RuleData>* universalRules() const { 195 const HeapVector<RuleData>* universalRules() const {
196 ASSERT(!m_pendingRules); 196 DCHECK(!m_pendingRules);
197 return &m_universalRules; 197 return &m_universalRules;
198 } 198 }
199 const HeapVector<RuleData>* shadowHostRules() const { 199 const HeapVector<RuleData>* shadowHostRules() const {
200 ASSERT(!m_pendingRules); 200 DCHECK(!m_pendingRules);
201 return &m_shadowHostRules; 201 return &m_shadowHostRules;
202 } 202 }
203 const HeapVector<Member<StyleRulePage>>& pageRules() const { 203 const HeapVector<Member<StyleRulePage>>& pageRules() const {
204 ASSERT(!m_pendingRules); 204 DCHECK(!m_pendingRules);
205 return m_pageRules; 205 return m_pageRules;
206 } 206 }
207 const HeapVector<Member<StyleRuleFontFace>>& fontFaceRules() const { 207 const HeapVector<Member<StyleRuleFontFace>>& fontFaceRules() const {
208 return m_fontFaceRules; 208 return m_fontFaceRules;
209 } 209 }
210 const HeapVector<Member<StyleRuleKeyframes>>& keyframesRules() const { 210 const HeapVector<Member<StyleRuleKeyframes>>& keyframesRules() const {
211 return m_keyframesRules; 211 return m_keyframesRules;
212 } 212 }
213 const HeapVector<MinimalRuleData>& deepCombinatorOrShadowPseudoRules() const { 213 const HeapVector<MinimalRuleData>& deepCombinatorOrShadowPseudoRules() const {
214 return m_deepCombinatorOrShadowPseudoRules; 214 return m_deepCombinatorOrShadowPseudoRules;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 Member<PendingRuleMaps> m_pendingRules; 313 Member<PendingRuleMaps> m_pendingRules;
314 314
315 #ifndef NDEBUG 315 #ifndef NDEBUG
316 HeapVector<RuleData> m_allRules; 316 HeapVector<RuleData> m_allRules;
317 #endif 317 #endif
318 }; 318 };
319 319
320 } // namespace blink 320 } // namespace blink
321 321
322 #endif // RuleSet_h 322 #endif // RuleSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698