| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void addRule(StyleRule*, unsigned selectorIndex); | 76 void addRule(StyleRule*, unsigned selectorIndex); |
| 77 | 77 |
| 78 const RuleFeatureSet& features() const { return m_features; } | 78 const RuleFeatureSet& features() const { return m_features; } |
| 79 | 79 |
| 80 const TerminatedArray<RuleData>* idRules(const AtomicString& key) const { AS
SERT(!m_pendingRules); return m_idRules.get(key); } | 80 const TerminatedArray<RuleData>* idRules(const AtomicString& key) const { AS
SERT(!m_pendingRules); return m_idRules.get(key); } |
| 81 const TerminatedArray<RuleData>* classRules(const AtomicString& key) const {
ASSERT(!m_pendingRules); return m_classRules.get(key); } | 81 const TerminatedArray<RuleData>* classRules(const AtomicString& key) const {
ASSERT(!m_pendingRules); return m_classRules.get(key); } |
| 82 const TerminatedArray<RuleData>* tagRules(const AtomicString& key) const { A
SSERT(!m_pendingRules); return m_tagRules.get(key); } | 82 const TerminatedArray<RuleData>* tagRules(const AtomicString& key) const { A
SSERT(!m_pendingRules); return m_tagRules.get(key); } |
| 83 const Vector<RuleData>* universalRules() const { ASSERT(!m_pendingRules); re
turn &m_universalRules; } | 83 const Vector<RuleData>* universalRules() const { ASSERT(!m_pendingRules); re
turn &m_universalRules; } |
| 84 const Vector<RuleData>* hostRules() const { ASSERT(!m_pendingRules); return
&m_hostRules; } | 84 const Vector<RuleData>* hostRules() const { ASSERT(!m_pendingRules); return
&m_hostRules; } |
| 85 const Vector<RawPtr<StyleRuleFontFace> >& fontFaceRules() const { return m_f
ontFaceRules; } | 85 const Vector<RawPtr<StyleRuleFontFace> >& fontFaceRules() const { return m_f
ontFaceRules; } |
| 86 const Vector<RawPtr<StyleRuleKeyframes> >& keyframesRules() const { return m
_keyframesRules; } | |
| 87 | 86 |
| 88 void compactRulesIfNeeded() | 87 void compactRulesIfNeeded() |
| 89 { | 88 { |
| 90 if (!m_pendingRules) | 89 if (!m_pendingRules) |
| 91 return; | 90 return; |
| 92 compactRules(); | 91 compactRules(); |
| 93 } | 92 } |
| 94 | 93 |
| 95 #ifndef NDEBUG | 94 #ifndef NDEBUG |
| 96 void show(); | 95 void show(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 m_pendingRules = PendingRuleMaps::create(); | 132 m_pendingRules = PendingRuleMaps::create(); |
| 134 return m_pendingRules.get(); | 133 return m_pendingRules.get(); |
| 135 } | 134 } |
| 136 | 135 |
| 137 CompactRuleMap m_idRules; | 136 CompactRuleMap m_idRules; |
| 138 CompactRuleMap m_classRules; | 137 CompactRuleMap m_classRules; |
| 139 CompactRuleMap m_tagRules; | 138 CompactRuleMap m_tagRules; |
| 140 Vector<RuleData> m_universalRules; | 139 Vector<RuleData> m_universalRules; |
| 141 Vector<RuleData> m_hostRules; | 140 Vector<RuleData> m_hostRules; |
| 142 Vector<RawPtr<StyleRuleFontFace> > m_fontFaceRules; | 141 Vector<RawPtr<StyleRuleFontFace> > m_fontFaceRules; |
| 143 Vector<RawPtr<StyleRuleKeyframes> > m_keyframesRules; | |
| 144 | 142 |
| 145 RuleFeatureSet m_features; | 143 RuleFeatureSet m_features; |
| 146 | 144 |
| 147 unsigned m_ruleCount; | 145 unsigned m_ruleCount; |
| 148 OwnPtr<PendingRuleMaps> m_pendingRules; | 146 OwnPtr<PendingRuleMaps> m_pendingRules; |
| 149 | 147 |
| 150 #ifndef NDEBUG | 148 #ifndef NDEBUG |
| 151 Vector<RuleData> m_allRules; | 149 Vector<RuleData> m_allRules; |
| 152 #endif | 150 #endif |
| 153 }; | 151 }; |
| 154 | 152 |
| 155 } // namespace blink | 153 } // namespace blink |
| 156 | 154 |
| 157 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); | 155 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); |
| 158 | 156 |
| 159 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ | 157 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ |
| OLD | NEW |