| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Vector<RuleData>* universalRules() const { ASSERT(!m_pendingRules); re
turn &m_universalRules; } | 84 const Vector<RuleData>* universalRules() const { ASSERT(!m_pendingRules); re
turn &m_universalRules; } |
| 85 const Vector<RuleData>* hostRules() const { ASSERT(!m_pendingRules); return
&m_hostRules; } |
| 85 const Vector<RawPtr<StyleRuleFontFace> >& fontFaceRules() const { return m_f
ontFaceRules; } | 86 const Vector<RawPtr<StyleRuleFontFace> >& fontFaceRules() const { return m_f
ontFaceRules; } |
| 86 const Vector<RawPtr<StyleRuleKeyframes> >& keyframesRules() const { return m
_keyframesRules; } | 87 const Vector<RawPtr<StyleRuleKeyframes> >& keyframesRules() const { return m
_keyframesRules; } |
| 87 const MediaQueryResultList& viewportDependentMediaQueryResults() const { ret
urn m_viewportDependentMediaQueryResults; } | 88 const MediaQueryResultList& viewportDependentMediaQueryResults() const { ret
urn m_viewportDependentMediaQueryResults; } |
| 88 | 89 |
| 89 void compactRulesIfNeeded() | 90 void compactRulesIfNeeded() |
| 90 { | 91 { |
| 91 if (!m_pendingRules) | 92 if (!m_pendingRules) |
| 92 return; | 93 return; |
| 93 compactRules(); | 94 compactRules(); |
| 94 } | 95 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 { | 133 { |
| 133 if (!m_pendingRules) | 134 if (!m_pendingRules) |
| 134 m_pendingRules = PendingRuleMaps::create(); | 135 m_pendingRules = PendingRuleMaps::create(); |
| 135 return m_pendingRules.get(); | 136 return m_pendingRules.get(); |
| 136 } | 137 } |
| 137 | 138 |
| 138 CompactRuleMap m_idRules; | 139 CompactRuleMap m_idRules; |
| 139 CompactRuleMap m_classRules; | 140 CompactRuleMap m_classRules; |
| 140 CompactRuleMap m_tagRules; | 141 CompactRuleMap m_tagRules; |
| 141 Vector<RuleData> m_universalRules; | 142 Vector<RuleData> m_universalRules; |
| 142 RuleFeatureSet m_features; | 143 Vector<RuleData> m_hostRules; |
| 143 Vector<RawPtr<StyleRuleFontFace> > m_fontFaceRules; | 144 Vector<RawPtr<StyleRuleFontFace> > m_fontFaceRules; |
| 144 Vector<RawPtr<StyleRuleKeyframes> > m_keyframesRules; | 145 Vector<RawPtr<StyleRuleKeyframes> > m_keyframesRules; |
| 145 | 146 |
| 147 RuleFeatureSet m_features; |
| 148 |
| 146 MediaQueryResultList m_viewportDependentMediaQueryResults; | 149 MediaQueryResultList m_viewportDependentMediaQueryResults; |
| 147 | 150 |
| 148 unsigned m_ruleCount; | 151 unsigned m_ruleCount; |
| 149 OwnPtr<PendingRuleMaps> m_pendingRules; | 152 OwnPtr<PendingRuleMaps> m_pendingRules; |
| 150 | 153 |
| 151 #ifndef NDEBUG | 154 #ifndef NDEBUG |
| 152 Vector<RuleData> m_allRules; | 155 Vector<RuleData> m_allRules; |
| 153 #endif | 156 #endif |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 } // namespace blink | 159 } // namespace blink |
| 157 | 160 |
| 158 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); | 161 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); |
| 159 | 162 |
| 160 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ | 163 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ |
| OLD | NEW |