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 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 bool isEmpty() const { return begin() == end(); } | 80 bool isEmpty() const { return begin() == end(); } |
81 | 81 |
82 private: | 82 private: |
83 MatchedPropertiesVector::const_iterator m_begin; | 83 MatchedPropertiesVector::const_iterator m_begin; |
84 MatchedPropertiesVector::const_iterator m_end; | 84 MatchedPropertiesVector::const_iterator m_end; |
85 }; | 85 }; |
86 | 86 |
87 class CORE_EXPORT MatchResult { | 87 class CORE_EXPORT MatchResult { |
88 STACK_ALLOCATED(); | 88 STACK_ALLOCATED(); |
89 public: | 89 public: |
| 90 MatchResult(); |
| 91 |
90 void addMatchedProperties(const StylePropertySet* properties, unsigned linkM
atchType = CSSSelector::MatchAll, PropertyWhitelistType = PropertyWhitelistNone)
; | 92 void addMatchedProperties(const StylePropertySet* properties, unsigned linkM
atchType = CSSSelector::MatchAll, PropertyWhitelistType = PropertyWhitelistNone)
; |
91 bool hasMatchedProperties() const { return m_matchedProperties.size(); } | 93 bool hasMatchedProperties() const { return m_matchedProperties.size(); } |
92 | 94 |
93 void finishAddingUARules(); | 95 void finishAddingUARules(); |
94 void finishAddingAuthorRulesForTreeScope(); | 96 void finishAddingAuthorRulesForTreeScope(); |
95 | 97 |
96 void setIsCacheable(bool cacheable) { m_isCacheable = cacheable; } | 98 void setIsCacheable(bool cacheable) { m_isCacheable = cacheable; } |
97 bool isCacheable() const { return m_isCacheable; } | 99 bool isCacheable() const { return m_isCacheable; } |
98 | 100 |
99 MatchedPropertiesRange allRules() const { return MatchedPropertiesRange(m_ma
tchedProperties.begin(), m_matchedProperties.end()); } | 101 MatchedPropertiesRange allRules() const { return MatchedPropertiesRange(m_ma
tchedProperties.begin(), m_matchedProperties.end()); } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 162 } |
161 | 163 |
162 inline bool operator!=(const MatchedProperties& a, const MatchedProperties& b) | 164 inline bool operator!=(const MatchedProperties& a, const MatchedProperties& b) |
163 { | 165 { |
164 return !(a == b); | 166 return !(a == b); |
165 } | 167 } |
166 | 168 |
167 } // namespace blink | 169 } // namespace blink |
168 | 170 |
169 #endif // MatchResult_h | 171 #endif // MatchResult_h |
OLD | NEW |