Chromium Code Reviews| Index: Source/core/css/RuleFeature.cpp |
| diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp |
| index 250988215f7eec346be477df3f55375af0de70d8..19aa43bde6b4ff5cba28427b9d038a2ff5b1dca9 100644 |
| --- a/Source/core/css/RuleFeature.cpp |
| +++ b/Source/core/css/RuleFeature.cpp |
| @@ -37,7 +37,6 @@ |
| #include "core/css/invalidation/DescendantInvalidationSet.h" |
| #include "core/dom/Element.h" |
| #include "core/dom/Node.h" |
| -#include "platform/RuntimeEnabledFeatures.h" |
| #include "wtf/BitVector.h" |
| namespace blink { |
| @@ -306,10 +305,10 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector& selector, |
| invalidationSet->addId(features.id); |
| if (!features.tagName.isEmpty()) |
| invalidationSet->addTagName(features.tagName); |
| - for (Vector<AtomicString>::const_iterator it = features.classes.begin(); it != features.classes.end(); ++it) |
| - invalidationSet->addClass(*it); |
| - for (Vector<AtomicString>::const_iterator it = features.attributes.begin(); it != features.attributes.end(); ++it) |
| - invalidationSet->addAttribute(*it); |
| + for (const auto& it : features.classes) |
|
Timothy Loh
2014/10/08 07:15:00
Should probably update variable names here (e.g. s
rune
2014/10/08 07:35:33
Done.
|
| + invalidationSet->addClass(it); |
| + for (const auto& it : features.attributes) |
| + invalidationSet->addAttribute(it); |
| if (features.customPseudoElement) |
| invalidationSet->setCustomPseudoInvalid(); |
| } |
| @@ -449,14 +448,14 @@ void RuleFeatureSet::FeatureMetadata::clear() |
| void RuleFeatureSet::add(const RuleFeatureSet& other) |
| { |
| - for (InvalidationSetMap::const_iterator it = other.m_classInvalidationSets.begin(); it != other.m_classInvalidationSets.end(); ++it) |
| - ensureClassInvalidationSet(it->key).combine(*it->value); |
| - for (InvalidationSetMap::const_iterator it = other.m_attributeInvalidationSets.begin(); it != other.m_attributeInvalidationSets.end(); ++it) |
| - ensureAttributeInvalidationSet(it->key).combine(*it->value); |
| - for (InvalidationSetMap::const_iterator it = other.m_idInvalidationSets.begin(); it != other.m_idInvalidationSets.end(); ++it) |
| - ensureIdInvalidationSet(it->key).combine(*it->value); |
| - for (PseudoTypeInvalidationSetMap::const_iterator it = other.m_pseudoInvalidationSets.begin(); it != other.m_pseudoInvalidationSets.end(); ++it) |
| - ensurePseudoInvalidationSet(static_cast<CSSSelector::PseudoType>(it->key)).combine(*it->value); |
| + for (const auto& it : other.m_classInvalidationSets) |
| + ensureClassInvalidationSet(it.key).combine(*it.value); |
| + for (const auto& it : other.m_attributeInvalidationSets) |
| + ensureAttributeInvalidationSet(it.key).combine(*it.value); |
| + for (const auto& it : other.m_idInvalidationSets) |
| + ensureIdInvalidationSet(it.key).combine(*it.value); |
| + for (const auto& it : other.m_pseudoInvalidationSets) |
| + ensurePseudoInvalidationSet(static_cast<CSSSelector::PseudoType>(it.key)).combine(*it.value); |
| m_metadata.add(other.m_metadata); |