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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 MatchResult& matchedResult(); | 125 MatchResult& matchedResult(); |
126 PassRefPtrWillBeRawPtr<StyleRuleList> matchedStyleRuleList(); | 126 PassRefPtrWillBeRawPtr<StyleRuleList> matchedStyleRuleList(); |
127 PassRefPtrWillBeRawPtr<CSSRuleList> matchedCSSRuleList(); | 127 PassRefPtrWillBeRawPtr<CSSRuleList> matchedCSSRuleList(); |
128 | 128 |
129 void collectMatchingRules(const MatchRequest&, RuleRange&, SelectorChecker::
ContextFlags = SelectorChecker::DefaultBehavior, CascadeScope = ignoreCascadeSco
pe, CascadeOrder = ignoreCascadeOrder); | 129 void collectMatchingRules(const MatchRequest&, RuleRange&, SelectorChecker::
ContextFlags = SelectorChecker::DefaultBehavior, CascadeScope = ignoreCascadeSco
pe, CascadeOrder = ignoreCascadeOrder); |
130 void sortAndTransferMatchedRules(); | 130 void sortAndTransferMatchedRules(); |
131 void clearMatchedRules(); | 131 void clearMatchedRules(); |
132 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); | 132 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); |
133 | 133 |
134 unsigned lastMatchedRulesPosition() const { return m_matchedRules ? m_matche
dRules->size() : 0; } | |
135 void sortMatchedRulesFrom(unsigned position); | |
136 void sortAndTransferMatchedRulesWithOnlySortBySpecificity(); | |
137 | |
138 private: | 134 private: |
139 void collectRuleIfMatches(const RuleData&, SelectorChecker::ContextFlags, Ca
scadeScope, CascadeOrder, const MatchRequest&, RuleRange&); | 135 void collectRuleIfMatches(const RuleData&, SelectorChecker::ContextFlags, Ca
scadeScope, CascadeOrder, const MatchRequest&, RuleRange&); |
140 | 136 |
141 template<typename RuleDataListType> | 137 template<typename RuleDataListType> |
142 void collectMatchingRulesForList(const RuleDataListType* rules, SelectorChec
ker::ContextFlags contextFlags, CascadeScope cascadeScope, CascadeOrder cascadeO
rder, const MatchRequest& matchRequest, RuleRange& ruleRange) | 138 void collectMatchingRulesForList(const RuleDataListType* rules, SelectorChec
ker::ContextFlags contextFlags, CascadeScope cascadeScope, CascadeOrder cascadeO
rder, const MatchRequest& matchRequest, RuleRange& ruleRange) |
143 { | 139 { |
144 if (!rules) | 140 if (!rules) |
145 return; | 141 return; |
146 | 142 |
147 for (typename RuleDataListType::const_iterator it = rules->begin(), end
= rules->end(); it != end; ++it) | 143 for (typename RuleDataListType::const_iterator it = rules->begin(), end
= rules->end(); it != end; ++it) |
(...skipping 28 matching lines...) Expand all Loading... |
176 | 172 |
177 // Output. | 173 // Output. |
178 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; | 174 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; |
179 RefPtrWillBeMember<StyleRuleList> m_styleRuleList; | 175 RefPtrWillBeMember<StyleRuleList> m_styleRuleList; |
180 MatchResult m_result; | 176 MatchResult m_result; |
181 }; | 177 }; |
182 | 178 |
183 } // namespace blink | 179 } // namespace blink |
184 | 180 |
185 #endif // ElementRuleCollector_h | 181 #endif // ElementRuleCollector_h |
OLD | NEW |