| 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 20 matching lines...) Expand all Loading... |
| 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 SelectRuleFeatureSet::SelectRuleFeatureSet() | 40 SelectRuleFeatureSet::SelectRuleFeatureSet() |
| 41 : m_featureFlags(0) | |
| 42 { | 41 { |
| 43 } | 42 } |
| 44 | 43 |
| 45 void SelectRuleFeatureSet::add(const SelectRuleFeatureSet& featureSet) | 44 void SelectRuleFeatureSet::add(const SelectRuleFeatureSet& featureSet) |
| 46 { | 45 { |
| 47 m_cssRuleFeatureSet.add(featureSet.m_cssRuleFeatureSet); | 46 m_cssRuleFeatureSet.add(featureSet.m_cssRuleFeatureSet); |
| 48 m_featureFlags |= featureSet.m_featureFlags; | |
| 49 } | 47 } |
| 50 | 48 |
| 51 void SelectRuleFeatureSet::clear() | 49 void SelectRuleFeatureSet::clear() |
| 52 { | 50 { |
| 53 m_cssRuleFeatureSet.clear(); | 51 m_cssRuleFeatureSet.clear(); |
| 54 m_featureFlags = 0; | |
| 55 } | 52 } |
| 56 | 53 |
| 57 void SelectRuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& select
or) | 54 void SelectRuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& select
or) |
| 58 { | 55 { |
| 59 m_cssRuleFeatureSet.collectFeaturesFromSelector(selector); | 56 m_cssRuleFeatureSet.collectFeaturesFromSelector(selector); |
| 60 } | 57 } |
| 61 | 58 |
| 62 bool SelectRuleFeatureSet::checkSelectorsForClassChange(const SpaceSplitString&
changedClasses) const | 59 bool SelectRuleFeatureSet::checkSelectorsForClassChange(const SpaceSplitString&
changedClasses) const |
| 63 { | 60 { |
| 64 unsigned changedSize = changedClasses.size(); | 61 unsigned changedSize = changedClasses.size(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 99 |
| 103 // Class was removed. | 100 // Class was removed. |
| 104 if (hasSelectorForClass(oldClasses[i])) | 101 if (hasSelectorForClass(oldClasses[i])) |
| 105 return true; | 102 return true; |
| 106 } | 103 } |
| 107 return false; | 104 return false; |
| 108 } | 105 } |
| 109 | 106 |
| 110 } | 107 } |
| 111 | 108 |
| OLD | NEW |