| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 // FIXME: Oilpan: RuleData is in the oilpan heap and this pointer | 70 // FIXME: Oilpan: RuleData is in the oilpan heap and this pointer |
| 71 // really should be traced. However, RuleData objects are | 71 // really should be traced. However, RuleData objects are |
| 72 // allocated inside larger TerminatedArray objects and we cannot | 72 // allocated inside larger TerminatedArray objects and we cannot |
| 73 // trace a raw rule data pointer at this point. | 73 // trace a raw rule data pointer at this point. |
| 74 const RuleData* m_ruleData; | 74 const RuleData* m_ruleData; |
| 75 unsigned m_specificity; | 75 unsigned m_specificity; |
| 76 uint64_t m_position; | 76 uint64_t m_position; |
| 77 RawPtrWillBeMember<const CSSStyleSheet> m_parentStyleSheet; | 77 Member<const CSSStyleSheet> m_parentStyleSheet; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| 81 | 81 |
| 82 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MatchedRule); | 82 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MatchedRule); |
| 83 | 83 |
| 84 namespace blink { | 84 namespace blink { |
| 85 | 85 |
| 86 #if ENABLE(OILPAN) | 86 #if ENABLE(OILPAN) |
| 87 using StyleRuleList = HeapVector<Member<StyleRule>>; | 87 using StyleRuleList = HeapVector<Member<StyleRule>>; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 110 ~ElementRuleCollector(); | 110 ~ElementRuleCollector(); |
| 111 | 111 |
| 112 void setMode(SelectorChecker::Mode mode) { m_mode = mode; } | 112 void setMode(SelectorChecker::Mode mode) { m_mode = mode; } |
| 113 void setPseudoStyleRequest(const PseudoStyleRequest& request) { m_pseudoStyl
eRequest = request; } | 113 void setPseudoStyleRequest(const PseudoStyleRequest& request) { m_pseudoStyl
eRequest = request; } |
| 114 void setSameOriginOnly(bool f) { m_sameOriginOnly = f; } | 114 void setSameOriginOnly(bool f) { m_sameOriginOnly = f; } |
| 115 | 115 |
| 116 void setMatchingUARules(bool matchingUARules) { m_matchingUARules = matching
UARules; } | 116 void setMatchingUARules(bool matchingUARules) { m_matchingUARules = matching
UARules; } |
| 117 bool hasAnyMatchingRules(RuleSet*); | 117 bool hasAnyMatchingRules(RuleSet*); |
| 118 | 118 |
| 119 const MatchResult& matchedResult() const; | 119 const MatchResult& matchedResult() const; |
| 120 PassRefPtrWillBeRawPtr<StyleRuleList> matchedStyleRuleList(); | 120 RawPtr<StyleRuleList> matchedStyleRuleList(); |
| 121 PassRefPtrWillBeRawPtr<CSSRuleList> matchedCSSRuleList(); | 121 RawPtr<CSSRuleList> matchedCSSRuleList(); |
| 122 | 122 |
| 123 void collectMatchingRules(const MatchRequest&, CascadeOrder = ignoreCascadeO
rder, bool matchingTreeBoundaryRules = false); | 123 void collectMatchingRules(const MatchRequest&, CascadeOrder = ignoreCascadeO
rder, bool matchingTreeBoundaryRules = false); |
| 124 void collectMatchingShadowHostRules(const MatchRequest&, CascadeOrder = igno
reCascadeOrder); | 124 void collectMatchingShadowHostRules(const MatchRequest&, CascadeOrder = igno
reCascadeOrder); |
| 125 void sortAndTransferMatchedRules(); | 125 void sortAndTransferMatchedRules(); |
| 126 void clearMatchedRules(); | 126 void clearMatchedRules(); |
| 127 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); | 127 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t
rue); |
| 128 void finishAddingUARules() { m_result.finishAddingUARules(); } | 128 void finishAddingUARules() { m_result.finishAddingUARules(); } |
| 129 void finishAddingAuthorRulesForTreeScope() { m_result.finishAddingAuthorRule
sForTreeScope(); } | 129 void finishAddingAuthorRulesForTreeScope() { m_result.finishAddingAuthorRule
sForTreeScope(); } |
| 130 void setIncludeEmptyRules(bool include) { m_includeEmptyRules = include; } | 130 void setIncludeEmptyRules(bool include) { m_includeEmptyRules = include; } |
| 131 bool includeEmptyRules() const { return m_includeEmptyRules; } | 131 bool includeEmptyRules() const { return m_includeEmptyRules; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 150 const SelectorFilter& m_selectorFilter; | 150 const SelectorFilter& m_selectorFilter; |
| 151 RefPtr<ComputedStyle> m_style; // FIXME: This can be mutated during matching
! | 151 RefPtr<ComputedStyle> m_style; // FIXME: This can be mutated during matching
! |
| 152 | 152 |
| 153 PseudoStyleRequest m_pseudoStyleRequest; | 153 PseudoStyleRequest m_pseudoStyleRequest; |
| 154 SelectorChecker::Mode m_mode; | 154 SelectorChecker::Mode m_mode; |
| 155 bool m_canUseFastReject; | 155 bool m_canUseFastReject; |
| 156 bool m_sameOriginOnly; | 156 bool m_sameOriginOnly; |
| 157 bool m_matchingUARules; | 157 bool m_matchingUARules; |
| 158 bool m_includeEmptyRules; | 158 bool m_includeEmptyRules; |
| 159 | 159 |
| 160 WillBeHeapVector<MatchedRule, 32> m_matchedRules; | 160 HeapVector<MatchedRule, 32> m_matchedRules; |
| 161 | 161 |
| 162 // Output. | 162 // Output. |
| 163 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; | 163 Member<StaticCSSRuleList> m_cssRuleList; |
| 164 RefPtrWillBeMember<StyleRuleList> m_styleRuleList; | 164 Member<StyleRuleList> m_styleRuleList; |
| 165 MatchResult m_result; | 165 MatchResult m_result; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| 169 | 169 |
| 170 #endif // ElementRuleCollector_h | 170 #endif // ElementRuleCollector_h |
| OLD | NEW |