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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/dom/shadow/SelectRuleFeatureSet.h" | 32 #include "core/dom/shadow/SelectRuleFeatureSet.h" |
33 | 33 |
34 #include "core/css/CSSSelector.h" | 34 #include "core/css/CSSSelector.h" |
35 | 35 |
36 #include "wtf/BitVector.h" | 36 #include "wtf/BitVector.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 void SelectRuleFeatureSet::add(const SelectRuleFeatureSet& featureSet) | |
41 { | |
42 m_cssRuleFeatureSet.add(featureSet.m_cssRuleFeatureSet); | |
43 } | |
44 | |
45 void SelectRuleFeatureSet::clear() | |
46 { | |
47 m_cssRuleFeatureSet.clear(); | |
48 } | |
49 | |
50 void SelectRuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& select
or) | |
51 { | |
52 m_cssRuleFeatureSet.collectFeaturesFromSelector(selector); | |
53 } | |
54 | |
55 bool SelectRuleFeatureSet::checkSelectorsForClassChange(const SpaceSplitString&
changedClasses) const | 40 bool SelectRuleFeatureSet::checkSelectorsForClassChange(const SpaceSplitString&
changedClasses) const |
56 { | 41 { |
57 unsigned changedSize = changedClasses.size(); | 42 unsigned changedSize = changedClasses.size(); |
58 for (unsigned i = 0; i < changedSize; ++i) { | 43 for (unsigned i = 0; i < changedSize; ++i) { |
59 if (hasSelectorForClass(changedClasses[i])) | 44 if (hasSelectorForClass(changedClasses[i])) |
60 return true; | 45 return true; |
61 } | 46 } |
62 return false; | 47 return false; |
63 } | 48 } |
64 | 49 |
(...skipping 30 matching lines...) Expand all Loading... |
95 | 80 |
96 // Class was removed. | 81 // Class was removed. |
97 if (hasSelectorForClass(oldClasses[i])) | 82 if (hasSelectorForClass(oldClasses[i])) |
98 return true; | 83 return true; |
99 } | 84 } |
100 return false; | 85 return false; |
101 } | 86 } |
102 | 87 |
103 } | 88 } |
104 | 89 |
OLD | NEW |