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

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

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference 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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 void LayoutSVGResourceContainer::addClient(LayoutObject* client) { 187 void LayoutSVGResourceContainer::addClient(LayoutObject* client) {
188 ASSERT(client); 188 ASSERT(client);
189 m_clients.insert(client); 189 m_clients.insert(client);
190 clearInvalidationMask(); 190 clearInvalidationMask();
191 } 191 }
192 192
193 void LayoutSVGResourceContainer::removeClient(LayoutObject* client) { 193 void LayoutSVGResourceContainer::removeClient(LayoutObject* client) {
194 ASSERT(client); 194 ASSERT(client);
195 removeClientFromCache(client, false); 195 removeClientFromCache(client, false);
196 m_clients.remove(client); 196 m_clients.erase(client);
197 } 197 }
198 198
199 void LayoutSVGResourceContainer::invalidateCacheAndMarkForLayout( 199 void LayoutSVGResourceContainer::invalidateCacheAndMarkForLayout(
200 SubtreeLayoutScope* layoutScope) { 200 SubtreeLayoutScope* layoutScope) {
201 if (selfNeedsLayout()) 201 if (selfNeedsLayout())
202 return; 202 return;
203 203
204 setNeedsLayoutAndFullPaintInvalidation( 204 setNeedsLayoutAndFullPaintInvalidation(
205 LayoutInvalidationReason::SvgResourceInvalidated, MarkContainerChain, 205 LayoutInvalidationReason::SvgResourceInvalidated, MarkContainerChain,
206 layoutScope); 206 layoutScope);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 for (SVGElement* element : *dependencies) { 269 for (SVGElement* element : *dependencies) {
270 if (LayoutObject* layoutObject = element->layoutObject()) { 270 if (LayoutObject* layoutObject = element->layoutObject()) {
271 if (UNLIKELY(!invalidatingDependencies.insert(element).isNewEntry)) { 271 if (UNLIKELY(!invalidatingDependencies.insert(element).isNewEntry)) {
272 // Reference cycle: we are in process of invalidating this dependant. 272 // Reference cycle: we are in process of invalidating this dependant.
273 continue; 273 continue;
274 } 274 }
275 275
276 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation( 276 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(
277 layoutObject, needsLayout); 277 layoutObject, needsLayout);
278 invalidatingDependencies.remove(element); 278 invalidatingDependencies.erase(element);
279 } 279 }
280 } 280 }
281 } 281 }
282 282
283 void LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation( 283 void LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(
284 LayoutObject* object, 284 LayoutObject* object,
285 bool needsLayout) { 285 bool needsLayout) {
286 ASSERT(object); 286 ASSERT(object);
287 ASSERT(object->node()); 287 ASSERT(object->node());
288 288
(...skipping 12 matching lines...) Expand all
301 // This will process the rest of the ancestors. 301 // This will process the rest of the ancestors.
302 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); 302 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
303 break; 303 break;
304 } 304 }
305 305
306 current = current->parent(); 306 current = current->parent();
307 } 307 }
308 } 308 }
309 309
310 } // namespace blink 310 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698