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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp

Issue 2759703002: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: rebase, fix one platform-specific reference Created 3 years, 9 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/svg/SVGTreeScopeResources.h" 5 #include "core/svg/SVGTreeScopeResources.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/dom/TreeScope.h" 8 #include "core/dom/TreeScope.h"
9 #include "core/layout/svg/LayoutSVGResourceContainer.h" 9 #include "core/layout/svg/LayoutSVGResourceContainer.h"
10 #include "core/layout/svg/SVGResourcesCache.h" 10 #include "core/layout/svg/SVGResourcesCache.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 void SVGTreeScopeResources::unregisterResource(ResourceMap::iterator it) { 103 void SVGTreeScopeResources::unregisterResource(ResourceMap::iterator it) {
104 LayoutSVGResourceContainer* resource = it->value; 104 LayoutSVGResourceContainer* resource = it->value;
105 DCHECK(resource); 105 DCHECK(resource);
106 DCHECK(resource->isRegistered()); 106 DCHECK(resource->isRegistered());
107 107
108 resource->detachAllClients(it->key); 108 resource->detachAllClients(it->key);
109 109
110 resource->setRegistered(false); 110 resource->setRegistered(false);
111 m_resources.remove(it); 111 m_resources.erase(it);
112 } 112 }
113 113
114 LayoutSVGResourceContainer* SVGTreeScopeResources::resourceById( 114 LayoutSVGResourceContainer* SVGTreeScopeResources::resourceById(
115 const AtomicString& id) const { 115 const AtomicString& id) const {
116 if (id.isEmpty()) 116 if (id.isEmpty())
117 return nullptr; 117 return nullptr;
118 return m_resources.at(id); 118 return m_resources.at(id);
119 } 119 }
120 120
121 void SVGTreeScopeResources::addPendingResource(const AtomicString& id, 121 void SVGTreeScopeResources::addPendingResource(const AtomicString& id,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 clearHasPendingResourcesIfPossible(*clientElement); 224 clearHasPendingResourcesIfPossible(*clientElement);
225 } 225 }
226 } 226 }
227 227
228 DEFINE_TRACE(SVGTreeScopeResources) { 228 DEFINE_TRACE(SVGTreeScopeResources) {
229 visitor->trace(m_pendingResources); 229 visitor->trace(m_pendingResources);
230 visitor->trace(m_treeScope); 230 visitor->trace(m_treeScope);
231 } 231 }
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698