Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 activeStyleSheets.appendVector(collection->activeAuthorStyleSheets()); 381 activeStyleSheets.appendVector(collection->activeAuthorStyleSheets());
382 } 382 }
383 383
384 // FIXME: Inspector needs a vector which has all active stylesheets. 384 // FIXME: Inspector needs a vector which has all active stylesheets.
385 // However, creating such a large vector might cause performance regression. 385 // However, creating such a large vector might cause performance regression.
386 // Need to implement some smarter solution. 386 // Need to implement some smarter solution.
387 return activeStyleSheets; 387 return activeStyleSheets;
388 } 388 }
389 389
390 void StyleEngine::shadowRootRemovedFromDocument(ShadowRoot* shadowRoot) { 390 void StyleEngine::shadowRootRemovedFromDocument(ShadowRoot* shadowRoot) {
391 m_styleSheetCollectionMap.remove(shadowRoot); 391 m_styleSheetCollectionMap.erase(shadowRoot);
392 m_activeTreeScopes.remove(shadowRoot); 392 m_activeTreeScopes.remove(shadowRoot);
393 m_dirtyTreeScopes.remove(shadowRoot); 393 m_dirtyTreeScopes.remove(shadowRoot);
394 resetAuthorStyle(*shadowRoot); 394 resetAuthorStyle(*shadowRoot);
395 } 395 }
396 396
397 void StyleEngine::addTreeBoundaryCrossingScope(const TreeScope& treeScope) { 397 void StyleEngine::addTreeBoundaryCrossingScope(const TreeScope& treeScope) {
398 m_treeBoundaryCrossingScopes.add(&treeScope.rootNode()); 398 m_treeBoundaryCrossingScopes.add(&treeScope.rootNode());
399 } 399 }
400 400
401 void StyleEngine::resetAuthorStyle(TreeScope& treeScope) { 401 void StyleEngine::resetAuthorStyle(TreeScope& treeScope) {
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 } 1146 }
1147 1147
1148 DEFINE_TRACE_WRAPPERS(StyleEngine) { 1148 DEFINE_TRACE_WRAPPERS(StyleEngine) {
1149 for (auto sheet : m_injectedAuthorStyleSheets) { 1149 for (auto sheet : m_injectedAuthorStyleSheets) {
1150 visitor->traceWrappers(sheet); 1150 visitor->traceWrappers(sheet);
1151 } 1151 }
1152 visitor->traceWrappers(m_documentStyleSheetCollection); 1152 visitor->traceWrappers(m_documentStyleSheetCollection);
1153 } 1153 }
1154 1154
1155 } // namespace blink 1155 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/SpaceSplitString.cpp ('k') | third_party/WebKit/Source/core/dom/WeakIdentifierMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698