| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 class ElementRuleCollector { | 93 class ElementRuleCollector { |
| 94 STACK_ALLOCATED(); | 94 STACK_ALLOCATED(); |
| 95 WTF_MAKE_NONCOPYABLE(ElementRuleCollector); | 95 WTF_MAKE_NONCOPYABLE(ElementRuleCollector); |
| 96 public: | 96 public: |
| 97 ElementRuleCollector(const ElementResolveContext&, RenderStyle* = 0); | 97 ElementRuleCollector(const ElementResolveContext&, RenderStyle* = 0); |
| 98 ~ElementRuleCollector(); | 98 ~ElementRuleCollector(); |
| 99 | 99 |
| 100 void setMode(SelectorChecker::Mode mode) { m_mode = mode; } | 100 void setMode(SelectorChecker::Mode mode) { m_mode = mode; } |
| 101 | 101 |
| 102 void setMatchingUARules(bool matchingUARules) { m_matchingUARules = matching
UARules; } | 102 void setMatchingUARules(bool matchingUARules) { m_matchingUARules = matching
UARules; } |
| 103 bool hasAnyMatchingRules(RuleSet*); | |
| 104 | 103 |
| 105 MatchResult& matchedResult(); | 104 MatchResult& matchedResult(); |
| 106 | 105 |
| 107 void collectMatchingRules(const MatchRequest&, RuleRange&, SelectorChecker::
ContextFlags = SelectorChecker::DefaultBehavior, CascadeScope = ignoreCascadeSco
pe, CascadeOrder = ignoreCascadeOrder); | 106 void collectMatchingRules(const MatchRequest&, RuleRange&, SelectorChecker::
ContextFlags = SelectorChecker::DefaultBehavior, CascadeScope = ignoreCascadeSco
pe, CascadeOrder = ignoreCascadeOrder); |
| 108 void sortAndTransferMatchedRules(); | 107 void sortAndTransferMatchedRules(); |
| 109 void clearMatchedRules(); | 108 void clearMatchedRules(); |
| 110 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); | 109 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); |
| 111 | 110 |
| 112 private: | 111 private: |
| 113 void collectRuleIfMatches(const RuleData&, SelectorChecker::ContextFlags, Ca
scadeScope, CascadeOrder, const MatchRequest&, RuleRange&); | 112 void collectRuleIfMatches(const RuleData&, SelectorChecker::ContextFlags, Ca
scadeScope, CascadeOrder, const MatchRequest&, RuleRange&); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 136 | 135 |
| 137 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; | 136 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; |
| 138 | 137 |
| 139 // Output. | 138 // Output. |
| 140 MatchResult m_result; | 139 MatchResult m_result; |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 } // namespace blink | 142 } // namespace blink |
| 144 | 143 |
| 145 #endif // SKY_ENGINE_CORE_CSS_ELEMENTRULECOLLECTOR_H_ | 144 #endif // SKY_ENGINE_CORE_CSS_ELEMENTRULECOLLECTOR_H_ |
| OLD | NEW |