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 24 matching lines...) Expand all Loading... |
35 #include "core/dom/Element.h" | 35 #include "core/dom/Element.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class SelectRuleFeatureSet { | 39 class SelectRuleFeatureSet { |
40 public: | 40 public: |
41 SelectRuleFeatureSet(); | 41 SelectRuleFeatureSet(); |
42 | 42 |
43 void add(const SelectRuleFeatureSet&); | 43 void add(const SelectRuleFeatureSet&); |
44 void clear(); | 44 void clear(); |
45 void collectFeaturesFromSelector(const CSSSelector*); | 45 void collectFeaturesFromSelector(const CSSSelector&); |
46 | 46 |
47 bool hasSelectorForId(const AtomicString&) const; | 47 bool hasSelectorForId(const AtomicString&) const; |
48 bool hasSelectorForClass(const AtomicString&) const; | 48 bool hasSelectorForClass(const AtomicString&) const; |
49 bool hasSelectorForAttribute(const AtomicString&) const; | 49 bool hasSelectorForAttribute(const AtomicString&) const; |
50 | 50 |
51 bool hasSelectorForChecked() const { return hasSelectorFor(AffectedSelectorC
hecked); } | 51 bool hasSelectorForChecked() const { return hasSelectorFor(AffectedSelectorC
hecked); } |
52 bool hasSelectorForEnabled() const { return hasSelectorFor(AffectedSelectorE
nabled); } | 52 bool hasSelectorForEnabled() const { return hasSelectorFor(AffectedSelectorE
nabled); } |
53 bool hasSelectorForDisabled() const { return hasSelectorFor(AffectedSelector
Disabled); } | 53 bool hasSelectorForDisabled() const { return hasSelectorFor(AffectedSelector
Disabled); } |
54 bool hasSelectorForIndeterminate() const { return hasSelectorFor(AffectedSel
ectorIndeterminate); } | 54 bool hasSelectorForIndeterminate() const { return hasSelectorFor(AffectedSel
ectorIndeterminate); } |
55 bool hasSelectorForLink() const { return hasSelectorFor(AffectedSelectorLink
); } | 55 bool hasSelectorForLink() const { return hasSelectorFor(AffectedSelectorLink
); } |
(...skipping 23 matching lines...) Expand all Loading... |
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.hasSelectorForAttribute(attributeName); | 83 return m_cssRuleFeatureSet.hasSelectorForAttribute(attributeName); |
84 } | 84 } |
85 | 85 |
86 } | 86 } |
87 | 87 |
88 #endif | 88 #endif |
OLD | NEW |