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

Side by Side Diff: sky/engine/core/css/RuleSet.h

Issue 786953008: Remove shadowPseudoElementRules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | sky/engine/core/css/RuleSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void addRulesFromSheet(StyleSheetContents*); 75 void addRulesFromSheet(StyleSheetContents*);
76 void addStyleRule(StyleRule*); 76 void addStyleRule(StyleRule*);
77 void addRule(StyleRule*, unsigned selectorIndex); 77 void addRule(StyleRule*, unsigned selectorIndex);
78 78
79 const RuleFeatureSet& features() const { return m_features; } 79 const RuleFeatureSet& features() const { return m_features; }
80 80
81 const TerminatedArray<RuleData>* idRules(const AtomicString& key) const { AS SERT(!m_pendingRules); return m_idRules.get(key); } 81 const TerminatedArray<RuleData>* idRules(const AtomicString& key) const { AS SERT(!m_pendingRules); return m_idRules.get(key); }
82 const TerminatedArray<RuleData>* classRules(const AtomicString& key) const { ASSERT(!m_pendingRules); return m_classRules.get(key); } 82 const TerminatedArray<RuleData>* classRules(const AtomicString& key) const { ASSERT(!m_pendingRules); return m_classRules.get(key); }
83 const TerminatedArray<RuleData>* tagRules(const AtomicString& key) const { A SSERT(!m_pendingRules); return m_tagRules.get(key); } 83 const TerminatedArray<RuleData>* tagRules(const AtomicString& key) const { A SSERT(!m_pendingRules); return m_tagRules.get(key); }
84 const TerminatedArray<RuleData>* shadowPseudoElementRules(const AtomicString & key) const { ASSERT(!m_pendingRules); return m_shadowPseudoElementRules.get(ke y); }
85 const Vector<RuleData>* universalRules() const { ASSERT(!m_pendingRules); re turn &m_universalRules; } 84 const Vector<RuleData>* universalRules() const { ASSERT(!m_pendingRules); re turn &m_universalRules; }
86 const Vector<RawPtr<StyleRuleFontFace> >& fontFaceRules() const { return m_f ontFaceRules; } 85 const Vector<RawPtr<StyleRuleFontFace> >& fontFaceRules() const { return m_f ontFaceRules; }
87 const Vector<RawPtr<StyleRuleKeyframes> >& keyframesRules() const { return m _keyframesRules; } 86 const Vector<RawPtr<StyleRuleKeyframes> >& keyframesRules() const { return m _keyframesRules; }
88 const MediaQueryResultList& viewportDependentMediaQueryResults() const { ret urn m_viewportDependentMediaQueryResults; } 87 const MediaQueryResultList& viewportDependentMediaQueryResults() const { ret urn m_viewportDependentMediaQueryResults; }
89 88
90 void compactRulesIfNeeded() 89 void compactRulesIfNeeded()
91 { 90 {
92 if (!m_pendingRules) 91 if (!m_pendingRules)
93 return; 92 return;
94 compactRules(); 93 compactRules();
(...skipping 22 matching lines...) Expand all
117 void compactRules(); 116 void compactRules();
118 static void compactPendingRules(PendingRuleMap&, CompactRuleMap&); 117 static void compactPendingRules(PendingRuleMap&, CompactRuleMap&);
119 118
120 class PendingRuleMaps { 119 class PendingRuleMaps {
121 public: 120 public:
122 static PassOwnPtr<PendingRuleMaps> create() { return adoptPtr(new Pendin gRuleMaps); } 121 static PassOwnPtr<PendingRuleMaps> create() { return adoptPtr(new Pendin gRuleMaps); }
123 122
124 PendingRuleMap idRules; 123 PendingRuleMap idRules;
125 PendingRuleMap classRules; 124 PendingRuleMap classRules;
126 PendingRuleMap tagRules; 125 PendingRuleMap tagRules;
127 PendingRuleMap shadowPseudoElementRules;
128 126
129 private: 127 private:
130 PendingRuleMaps() { } 128 PendingRuleMaps() { }
131 }; 129 };
132 130
133 PendingRuleMaps* ensurePendingRules() 131 PendingRuleMaps* ensurePendingRules()
134 { 132 {
135 if (!m_pendingRules) 133 if (!m_pendingRules)
136 m_pendingRules = PendingRuleMaps::create(); 134 m_pendingRules = PendingRuleMaps::create();
137 return m_pendingRules.get(); 135 return m_pendingRules.get();
138 } 136 }
139 137
140 CompactRuleMap m_idRules; 138 CompactRuleMap m_idRules;
141 CompactRuleMap m_classRules; 139 CompactRuleMap m_classRules;
142 CompactRuleMap m_tagRules; 140 CompactRuleMap m_tagRules;
143 CompactRuleMap m_shadowPseudoElementRules;
144 Vector<RuleData> m_universalRules; 141 Vector<RuleData> m_universalRules;
145 RuleFeatureSet m_features; 142 RuleFeatureSet m_features;
146 Vector<RawPtr<StyleRuleFontFace> > m_fontFaceRules; 143 Vector<RawPtr<StyleRuleFontFace> > m_fontFaceRules;
147 Vector<RawPtr<StyleRuleKeyframes> > m_keyframesRules; 144 Vector<RawPtr<StyleRuleKeyframes> > m_keyframesRules;
148 145
149 MediaQueryResultList m_viewportDependentMediaQueryResults; 146 MediaQueryResultList m_viewportDependentMediaQueryResults;
150 147
151 unsigned m_ruleCount; 148 unsigned m_ruleCount;
152 OwnPtr<PendingRuleMaps> m_pendingRules; 149 OwnPtr<PendingRuleMaps> m_pendingRules;
153 150
154 #ifndef NDEBUG 151 #ifndef NDEBUG
155 Vector<RuleData> m_allRules; 152 Vector<RuleData> m_allRules;
156 #endif 153 #endif
157 }; 154 };
158 155
159 } // namespace blink 156 } // namespace blink
160 157
161 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); 158 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData);
162 159
163 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ 160 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/css/RuleSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698