Index: Source/core/dom/StyleEngine.cpp |
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp |
index 031c0a6fffc89a0590ca5b85933e95f1a38d7b7d..db446de6529a36e4dad5cc71f46dd0116aeb4fe5 100644 |
--- a/Source/core/dom/StyleEngine.cpp |
+++ b/Source/core/dom/StyleEngine.cpp |
@@ -346,8 +346,8 @@ bool StyleEngine::shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdate |
void StyleEngine::clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes) |
{ |
- for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.end(); ++it) { |
- TreeScope& treeScope = **it; |
+ for (auto& scope : treeScopes) { |
Julien - ping for review
2015/01/02 09:42:02
auto == TreeScope*
I think it's OK to do a pointe
zhaoze.zhou
2015/01/05 15:17:57
Done.
|
+ TreeScope& treeScope = *scope; |
ASSERT(treeScope != m_document); |
ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeStyleSheetCollection*>(styleSheetCollectionFor(treeScope)); |
ASSERT(collection); |
@@ -386,8 +386,7 @@ void StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode) |
TreeScopeSet treeScopes = updateMode == FullStyleUpdate ? m_activeTreeScopes : m_dirtyTreeScopes; |
HashSet<TreeScope*> treeScopesRemoved; |
- for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.end(); ++it) { |
- TreeScope* treeScope = *it; |
+ for (auto* treeScope : treeScopes) { |
Julien - ping for review
2015/01/02 09:42:02
Similar comment.
zhaoze.zhou
2015/01/05 15:17:57
Done.
|
ASSERT(treeScope != m_document); |
ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeStyleSheetCollection*>(styleSheetCollectionFor(*treeScope)); |
ASSERT(collection); |