| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void collectMatchingRulesForRegion(const MatchRequest&, RuleRange&, CascadeS
cope = ignoreCascadeScope, CascadeOrder = ignoreCascadeOrder); | 98 void collectMatchingRulesForRegion(const MatchRequest&, RuleRange&, CascadeS
cope = ignoreCascadeScope, CascadeOrder = ignoreCascadeOrder); |
| 99 void sortAndTransferMatchedRules(); | 99 void sortAndTransferMatchedRules(); |
| 100 void clearMatchedRules(); | 100 void clearMatchedRules(); |
| 101 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); | 101 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); |
| 102 | 102 |
| 103 unsigned lastMatchedRulesPosition() const { return m_matchedRules ? m_matche
dRules->size() : 0; } | 103 unsigned lastMatchedRulesPosition() const { return m_matchedRules ? m_matche
dRules->size() : 0; } |
| 104 void sortMatchedRulesFrom(unsigned position); | 104 void sortMatchedRulesFrom(unsigned position); |
| 105 void sortAndTransferMatchedRulesWithOnlySortBySpecificity(); | 105 void sortAndTransferMatchedRulesWithOnlySortBySpecificity(); |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 Document* document() { return m_context.document(); } | 108 Document& document() { return m_context.document(); } |
| 109 | 109 |
| 110 void collectRuleIfMatches(const RuleData&, CascadeScope, CascadeOrder, const
MatchRequest&, RuleRange&); | 110 void collectRuleIfMatches(const RuleData&, CascadeScope, CascadeOrder, const
MatchRequest&, RuleRange&); |
| 111 void collectMatchingRulesForList(const Vector<RuleData>*, CascadeScope, Casc
adeOrder, const MatchRequest&, RuleRange&); | 111 void collectMatchingRulesForList(const Vector<RuleData>*, CascadeScope, Casc
adeOrder, const MatchRequest&, RuleRange&); |
| 112 void collectMatchingRulesForList(const RuleData*, CascadeScope, CascadeOrder
, const MatchRequest&, RuleRange&); | 112 void collectMatchingRulesForList(const RuleData*, CascadeScope, CascadeOrder
, const MatchRequest&, RuleRange&); |
| 113 bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&); | 113 bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&); |
| 114 | 114 |
| 115 void sortMatchedRules(); | 115 void sortMatchedRules(); |
| 116 void addMatchedRule(const RuleData*, CascadeScope, CascadeOrder); | 116 void addMatchedRule(const RuleData*, CascadeScope, CascadeOrder); |
| 117 | 117 |
| 118 StaticCSSRuleList* ensureRuleList(); | 118 StaticCSSRuleList* ensureRuleList(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 133 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; | 133 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; |
| 134 | 134 |
| 135 // Output. | 135 // Output. |
| 136 RefPtr<StaticCSSRuleList> m_ruleList; | 136 RefPtr<StaticCSSRuleList> m_ruleList; |
| 137 MatchResult m_result; | 137 MatchResult m_result; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace WebCore | 140 } // namespace WebCore |
| 141 | 141 |
| 142 #endif // ElementRuleCollector_h | 142 #endif // ElementRuleCollector_h |
| OLD | NEW |