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. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All rights reserved. | 4 * 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 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #ifndef RuleFeature_h | 23 #ifndef RuleFeature_h |
24 #define RuleFeature_h | 24 #define RuleFeature_h |
25 | 25 |
26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
27 #include "core/css/CSSSelector.h" | 27 #include "core/css/CSSSelector.h" |
| 28 #include "core/css/MediaQueryEvaluator.h" |
28 #include "core/css/invalidation/InvalidationSet.h" | 29 #include "core/css/invalidation/InvalidationSet.h" |
29 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
30 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
31 #include "wtf/HashSet.h" | 32 #include "wtf/HashSet.h" |
32 #include "wtf/text/AtomicStringHash.h" | 33 #include "wtf/text/AtomicStringHash.h" |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
36 struct InvalidationLists; | 37 struct InvalidationLists; |
37 class QualifiedName; | 38 class QualifiedName; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 101 |
101 bool hasSelectorForId(const AtomicString& idValue) const { | 102 bool hasSelectorForId(const AtomicString& idValue) const { |
102 return m_idInvalidationSets.contains(idValue); | 103 return m_idInvalidationSets.contains(idValue); |
103 } | 104 } |
104 | 105 |
105 const HeapVector<RuleFeature>& siblingRules() const { return m_siblingRules; } | 106 const HeapVector<RuleFeature>& siblingRules() const { return m_siblingRules; } |
106 const HeapVector<RuleFeature>& uncommonAttributeRules() const { | 107 const HeapVector<RuleFeature>& uncommonAttributeRules() const { |
107 return m_uncommonAttributeRules; | 108 return m_uncommonAttributeRules; |
108 } | 109 } |
109 | 110 |
| 111 const MediaQueryResultList& viewportDependentMediaQueryResults() const { |
| 112 return m_viewportDependentMediaQueryResults; |
| 113 } |
| 114 const MediaQueryResultList& deviceDependentMediaQueryResults() const { |
| 115 return m_deviceDependentMediaQueryResults; |
| 116 } |
| 117 MediaQueryResultList& viewportDependentMediaQueryResults() { |
| 118 return m_viewportDependentMediaQueryResults; |
| 119 } |
| 120 MediaQueryResultList& deviceDependentMediaQueryResults() { |
| 121 return m_deviceDependentMediaQueryResults; |
| 122 } |
| 123 |
110 // Collect descendant and sibling invalidation sets. | 124 // Collect descendant and sibling invalidation sets. |
111 void collectInvalidationSetsForClass(InvalidationLists&, | 125 void collectInvalidationSetsForClass(InvalidationLists&, |
112 Element&, | 126 Element&, |
113 const AtomicString& className) const; | 127 const AtomicString& className) const; |
114 void collectInvalidationSetsForId(InvalidationLists&, | 128 void collectInvalidationSetsForId(InvalidationLists&, |
115 Element&, | 129 Element&, |
116 const AtomicString& id) const; | 130 const AtomicString& id) const; |
117 void collectInvalidationSetsForAttribute( | 131 void collectInvalidationSetsForAttribute( |
118 InvalidationLists&, | 132 InvalidationLists&, |
119 Element&, | 133 Element&, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 281 |
268 FeatureMetadata m_metadata; | 282 FeatureMetadata m_metadata; |
269 InvalidationSetMap m_classInvalidationSets; | 283 InvalidationSetMap m_classInvalidationSets; |
270 InvalidationSetMap m_attributeInvalidationSets; | 284 InvalidationSetMap m_attributeInvalidationSets; |
271 InvalidationSetMap m_idInvalidationSets; | 285 InvalidationSetMap m_idInvalidationSets; |
272 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; | 286 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; |
273 RefPtr<SiblingInvalidationSet> m_universalSiblingInvalidationSet; | 287 RefPtr<SiblingInvalidationSet> m_universalSiblingInvalidationSet; |
274 RefPtr<DescendantInvalidationSet> m_nthInvalidationSet; | 288 RefPtr<DescendantInvalidationSet> m_nthInvalidationSet; |
275 HeapVector<RuleFeature> m_siblingRules; | 289 HeapVector<RuleFeature> m_siblingRules; |
276 HeapVector<RuleFeature> m_uncommonAttributeRules; | 290 HeapVector<RuleFeature> m_uncommonAttributeRules; |
| 291 MediaQueryResultList m_viewportDependentMediaQueryResults; |
| 292 MediaQueryResultList m_deviceDependentMediaQueryResults; |
277 | 293 |
278 friend class RuleFeatureSetTest; | 294 friend class RuleFeatureSetTest; |
279 }; | 295 }; |
280 | 296 |
281 } // namespace blink | 297 } // namespace blink |
282 | 298 |
283 #endif // RuleFeature_h | 299 #endif // RuleFeature_h |
OLD | NEW |