| Index: third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
|
| index f01b29cc6e4c0b3bc691a0191d425568b51bc567..a45caa6a16baf06e613b0500b10be8466ff46a93 100644
|
| --- a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
|
| @@ -92,8 +92,7 @@ void CSSSelectorWatch::updateSelectorMatches(
|
| const Vector<String>& addedSelectors) {
|
| bool shouldUpdateTimer = false;
|
|
|
| - for (unsigned i = 0; i < removedSelectors.size(); ++i) {
|
| - const String& selector = removedSelectors[i];
|
| + for (const auto& selector : removedSelectors) {
|
| if (!m_matchingCallbackSelectors.remove(selector))
|
| continue;
|
|
|
| @@ -106,8 +105,7 @@ void CSSSelectorWatch::updateSelectorMatches(
|
| m_removedSelectors.add(selector);
|
| }
|
|
|
| - for (unsigned i = 0; i < addedSelectors.size(); ++i) {
|
| - const String& selector = addedSelectors[i];
|
| + for (const auto& selector : addedSelectors) {
|
| HashCountedSet<String>::AddResult result =
|
| m_matchingCallbackSelectors.add(selector);
|
| if (!result.isNewEntry)
|
| @@ -151,9 +149,9 @@ void CSSSelectorWatch::watchCSSSelectors(const Vector<String>& selectors) {
|
| StylePropertySet* callbackPropertySet =
|
| ImmutableStylePropertySet::create(nullptr, 0, UASheetMode);
|
|
|
| - for (unsigned i = 0; i < selectors.size(); ++i) {
|
| + for (const auto& selector : selectors) {
|
| CSSSelectorList selectorList = CSSParser::parseSelector(
|
| - CSSParserContext(UASheetMode, nullptr), nullptr, selectors[i]);
|
| + CSSParserContext(UASheetMode, nullptr), nullptr, selector);
|
| if (!selectorList.isValid())
|
| continue;
|
|
|
|
|