| 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/css/CSSSelectorList.h" | 35 #include "core/css/CSSSelectorList.h" |
| 36 | 36 |
| 37 #include "wtf/BitVector.h" | 37 #include "wtf/BitVector.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 void SelectRuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList
& list) | 41 void SelectRuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList
& list) |
| 42 { | 42 { |
| 43 for (const CSSSelector* selector = list.first(); selector; selector = CSSSel
ectorList::next(*selector)) { | 43 for (const CSSSelector* selector = list.first(); selector; selector = CSSSel
ectorList::next(*selector)) { |
| 44 for (const CSSSelector* component = selector; component; component = com
ponent->tagHistory()) { | 44 for (const CSSSelector* component = selector; component; component = com
ponent->tagHistory()) { |
| 45 if (invalidationSetForSelector(*component)) | 45 if (invalidationSetForSelector(*component, InvalidateDescendants)) |
| 46 continue; | 46 continue; |
| 47 | 47 |
| 48 if (component->selectorList()) | 48 if (component->selectorList()) |
| 49 collectFeaturesFromSelectorList(*component->selectorList()); | 49 collectFeaturesFromSelectorList(*component->selectorList()); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool SelectRuleFeatureSet::checkSelectorsForClassChange(const SpaceSplitString&
changedClasses) const | 54 bool SelectRuleFeatureSet::checkSelectorsForClassChange(const SpaceSplitString&
changedClasses) const |
| 55 { | 55 { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Class was removed. | 95 // Class was removed. |
| 96 if (hasSelectorForClass(oldClasses[i])) | 96 if (hasSelectorForClass(oldClasses[i])) |
| 97 return true; | 97 return true; |
| 98 } | 98 } |
| 99 return false; | 99 return false; |
| 100 } | 100 } |
| 101 | 101 |
| 102 } | 102 } |
| 103 | 103 |
| OLD | NEW |