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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 57 |
58 bool usesSiblingRules() const { return !siblingRules.isEmpty(); } | 58 bool usesSiblingRules() const { return !siblingRules.isEmpty(); } |
59 bool usesFirstLineRules() const { return m_usesFirstLineRules; } | 59 bool usesFirstLineRules() const { return m_usesFirstLineRules; } |
60 bool usesBeforeAfterRules() const { return m_usesBeforeAfterRules; } | 60 bool usesBeforeAfterRules() const { return m_usesBeforeAfterRules; } |
61 | 61 |
62 inline bool hasSelectorForAttribute(const AtomicString &attributeName) const | 62 inline bool hasSelectorForAttribute(const AtomicString& attributeName) const |
63 { | 63 { |
64 ASSERT(!attributeName.isEmpty()); | 64 ASSERT(!attributeName.isEmpty()); |
65 return attrsInRules.contains(attributeName.impl()); | 65 return attrsInRules.contains(attributeName); |
66 } | 66 } |
67 | 67 |
68 inline bool hasSelectorForClass(const AtomicString& classValue) const | 68 inline bool hasSelectorForClass(const AtomicString& classValue) const |
69 { | 69 { |
70 ASSERT(!classValue.isEmpty()); | 70 ASSERT(!classValue.isEmpty()); |
71 return classesInRules.contains(classValue.impl()); | 71 return classesInRules.contains(classValue); |
72 } | 72 } |
73 | 73 |
74 inline bool hasSelectorForId(const AtomicString& idValue) const | 74 inline bool hasSelectorForId(const AtomicString& idValue) const |
75 { | 75 { |
76 ASSERT(!idValue.isEmpty()); | 76 ASSERT(!idValue.isEmpty()); |
77 return idsInRules.contains(idValue.impl()); | 77 return idsInRules.contains(idValue); |
78 } | 78 } |
79 | 79 |
80 HashSet<AtomicString> idsInRules; | 80 HashSet<AtomicString> idsInRules; |
81 HashSet<AtomicString> classesInRules; | 81 HashSet<AtomicString> classesInRules; |
82 HashSet<AtomicString> attrsInRules; | 82 HashSet<AtomicString> attrsInRules; |
83 Vector<RuleFeature> siblingRules; | 83 Vector<RuleFeature> siblingRules; |
84 Vector<RuleFeature> uncommonAttributeRules; | 84 Vector<RuleFeature> uncommonAttributeRules; |
85 private: | 85 private: |
86 bool m_usesFirstLineRules; | 86 bool m_usesFirstLineRules; |
87 bool m_usesBeforeAfterRules; | 87 bool m_usesBeforeAfterRules; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace WebCore | 90 } // namespace WebCore |
91 | 91 |
92 #endif // RuleFeature_h | 92 #endif // RuleFeature_h |
OLD | NEW |