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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool hasDocumentSecurityOrigin; | 46 bool hasDocumentSecurityOrigin; |
47 }; | 47 }; |
48 | 48 |
49 class RuleFeatureSet { | 49 class RuleFeatureSet { |
50 public: | 50 public: |
51 RuleFeatureSet() { } | 51 RuleFeatureSet() { } |
52 | 52 |
53 void add(const RuleFeatureSet&); | 53 void add(const RuleFeatureSet&); |
54 void clear(); | 54 void clear(); |
55 | 55 |
56 void collectFeaturesFromSelector(const CSSSelector*); | 56 void collectFeaturesFromSelector(const CSSSelector&); |
57 void collectFeaturesFromRuleData(const RuleData&); | 57 void collectFeaturesFromRuleData(const RuleData&); |
58 | 58 |
59 bool usesSiblingRules() const { return !siblingRules.isEmpty(); } | 59 bool usesSiblingRules() const { return !siblingRules.isEmpty(); } |
60 bool usesFirstLineRules() const { return m_metadata.usesFirstLineRules; } | 60 bool usesFirstLineRules() const { return m_metadata.usesFirstLineRules; } |
61 | 61 |
62 unsigned maxDirectAdjacentSelectors() const { return m_metadata.maxDirectAdj
acentSelectors; } | 62 unsigned maxDirectAdjacentSelectors() const { return m_metadata.maxDirectAdj
acentSelectors; } |
63 void setMaxDirectAdjacentSelectors(unsigned value) { m_metadata.maxDirectAd
jacentSelectors = std::max(value, m_metadata.maxDirectAdjacentSelectors); } | 63 void setMaxDirectAdjacentSelectors(unsigned value) { m_metadata.maxDirectAd
jacentSelectors = std::max(value, m_metadata.maxDirectAdjacentSelectors); } |
64 | 64 |
65 inline bool hasSelectorForAttribute(const AtomicString& attributeName) const | 65 inline bool hasSelectorForAttribute(const AtomicString& attributeName) const |
66 { | 66 { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void clear(); | 103 void clear(); |
104 | 104 |
105 bool usesFirstLineRules; | 105 bool usesFirstLineRules; |
106 bool foundSiblingSelector; | 106 bool foundSiblingSelector; |
107 unsigned maxDirectAdjacentSelectors; | 107 unsigned maxDirectAdjacentSelectors; |
108 HashSet<AtomicString> idsInRules; | 108 HashSet<AtomicString> idsInRules; |
109 HashSet<AtomicString> classesInRules; | 109 HashSet<AtomicString> classesInRules; |
110 HashSet<AtomicString> attrsInRules; | 110 HashSet<AtomicString> attrsInRules; |
111 }; | 111 }; |
112 | 112 |
113 void collectFeaturesFromSelector(const CSSSelector*, FeatureMetadata&); | 113 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&); |
114 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&); | 114 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&); |
115 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); | 115 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); |
116 bool updateClassInvalidationSets(const CSSSelector*); | 116 bool updateClassInvalidationSets(const CSSSelector&); |
117 | 117 |
118 InvalidationSetMap m_classInvalidationSets; | 118 InvalidationSetMap m_classInvalidationSets; |
119 FeatureMetadata m_metadata; | 119 FeatureMetadata m_metadata; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace WebCore | 122 } // namespace WebCore |
123 | 123 |
124 #endif // RuleFeature_h | 124 #endif // RuleFeature_h |
OLD | NEW |