| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef SKY_ENGINE_CORE_CSS_RULESET_H_ | 22 #ifndef SKY_ENGINE_CORE_CSS_RULESET_H_ |
| 23 #define SKY_ENGINE_CORE_CSS_RULESET_H_ | 23 #define SKY_ENGINE_CORE_CSS_RULESET_H_ |
| 24 | 24 |
| 25 #include "sky/engine/core/css/RuleFeature.h" | 25 #include "sky/engine/core/css/RuleFeature.h" |
| 26 #include "sky/engine/core/css/StyleRule.h" | 26 #include "sky/engine/core/css/StyleRule.h" |
| 27 #include "sky/engine/core/css/StyleRuleKeyframes.h" | |
| 28 #include "sky/engine/platform/heap/Handle.h" | 27 #include "sky/engine/platform/heap/Handle.h" |
| 29 #include "sky/engine/wtf/Forward.h" | 28 #include "sky/engine/wtf/Forward.h" |
| 30 #include "sky/engine/wtf/HashMap.h" | 29 #include "sky/engine/wtf/HashMap.h" |
| 31 #include "sky/engine/wtf/LinkedStack.h" | 30 #include "sky/engine/wtf/LinkedStack.h" |
| 32 #include "sky/engine/wtf/TerminatedArray.h" | 31 #include "sky/engine/wtf/TerminatedArray.h" |
| 33 | 32 |
| 34 namespace blink { | 33 namespace blink { |
| 35 | 34 |
| 36 class CSSSelector; | 35 class CSSSelector; |
| 37 class StyleSheetContents; | 36 class StyleSheetContents; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 typedef HashMap<AtomicString, OwnPtr<LinkedStack<RuleData> > > PendingRuleMa
p; | 98 typedef HashMap<AtomicString, OwnPtr<LinkedStack<RuleData> > > PendingRuleMa
p; |
| 100 typedef HashMap<AtomicString, OwnPtr<TerminatedArray<RuleData> > > CompactRu
leMap; | 99 typedef HashMap<AtomicString, OwnPtr<TerminatedArray<RuleData> > > CompactRu
leMap; |
| 101 | 100 |
| 102 RuleSet() | 101 RuleSet() |
| 103 : m_ruleCount(0) | 102 : m_ruleCount(0) |
| 104 { | 103 { |
| 105 } | 104 } |
| 106 | 105 |
| 107 void addToRuleSet(const AtomicString& key, PendingRuleMap&, const RuleData&)
; | 106 void addToRuleSet(const AtomicString& key, PendingRuleMap&, const RuleData&)
; |
| 108 void addFontFaceRule(StyleRuleFontFace*); | 107 void addFontFaceRule(StyleRuleFontFace*); |
| 109 void addKeyframesRule(StyleRuleKeyframes*); | |
| 110 | 108 |
| 111 void addChildRules(const Vector<RefPtr<StyleRuleBase> >&); | 109 void addChildRules(const Vector<RefPtr<StyleRuleBase> >&); |
| 112 bool findBestRuleSetAndAdd(const CSSSelector&, RuleData&); | 110 bool findBestRuleSetAndAdd(const CSSSelector&, RuleData&); |
| 113 | 111 |
| 114 void compactRules(); | 112 void compactRules(); |
| 115 static void compactPendingRules(PendingRuleMap&, CompactRuleMap&); | 113 static void compactPendingRules(PendingRuleMap&, CompactRuleMap&); |
| 116 | 114 |
| 117 class PendingRuleMaps { | 115 class PendingRuleMaps { |
| 118 public: | 116 public: |
| 119 static PassOwnPtr<PendingRuleMaps> create() { return adoptPtr(new Pendin
gRuleMaps); } | 117 static PassOwnPtr<PendingRuleMaps> create() { return adoptPtr(new Pendin
gRuleMaps); } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 148 #ifndef NDEBUG | 146 #ifndef NDEBUG |
| 149 Vector<RuleData> m_allRules; | 147 Vector<RuleData> m_allRules; |
| 150 #endif | 148 #endif |
| 151 }; | 149 }; |
| 152 | 150 |
| 153 } // namespace blink | 151 } // namespace blink |
| 154 | 152 |
| 155 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); | 153 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); |
| 156 | 154 |
| 157 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ | 155 #endif // SKY_ENGINE_CORE_CSS_RULESET_H_ |
| OLD | NEW |