OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 private: | 61 private: |
62 void setSelectRuleFeature(AffectedSelectorType feature) { m_featureFlags |=
feature; } | 62 void setSelectRuleFeature(AffectedSelectorType feature) { m_featureFlags |=
feature; } |
63 | 63 |
64 RuleFeatureSet m_cssRuleFeatureSet; | 64 RuleFeatureSet m_cssRuleFeatureSet; |
65 int m_featureFlags; | 65 int m_featureFlags; |
66 }; | 66 }; |
67 | 67 |
68 inline bool SelectRuleFeatureSet::hasSelectorForId(const AtomicString& idValue)
const | 68 inline bool SelectRuleFeatureSet::hasSelectorForId(const AtomicString& idValue)
const |
69 { | 69 { |
70 ASSERT(!idValue.isEmpty()); | 70 ASSERT(!idValue.isEmpty()); |
71 return m_cssRuleFeatureSet.idsInRules.contains(idValue); | 71 return m_cssRuleFeatureSet.hasSelectorForId(idValue); |
72 } | 72 } |
73 | 73 |
74 inline bool SelectRuleFeatureSet::hasSelectorForClass(const AtomicString& classV
alue) const | 74 inline bool SelectRuleFeatureSet::hasSelectorForClass(const AtomicString& classV
alue) const |
75 { | 75 { |
76 ASSERT(!classValue.isEmpty()); | 76 ASSERT(!classValue.isEmpty()); |
77 return m_cssRuleFeatureSet.classesInRules.contains(classValue); | 77 return m_cssRuleFeatureSet.hasSelectorForClass(classValue); |
78 } | 78 } |
79 | 79 |
80 inline bool SelectRuleFeatureSet::hasSelectorForAttribute(const AtomicString& at
tributeName) const | 80 inline bool SelectRuleFeatureSet::hasSelectorForAttribute(const AtomicString& at
tributeName) const |
81 { | 81 { |
82 ASSERT(!attributeName.isEmpty()); | 82 ASSERT(!attributeName.isEmpty()); |
83 return m_cssRuleFeatureSet.attrsInRules.contains(attributeName); | 83 return m_cssRuleFeatureSet.hasSelectorForAttribute(attributeName); |
84 } | 84 } |
85 | 85 |
86 } | 86 } |
87 | 87 |
88 #endif | 88 #endif |
OLD | NEW |