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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp

Issue 2799573003: Migrate WTF::HashCountedSet::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 8 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void CSSImageGeneratorValue::removeClient(const LayoutObject* layoutObject) { 67 void CSSImageGeneratorValue::removeClient(const LayoutObject* layoutObject) {
68 DCHECK(layoutObject); 68 DCHECK(layoutObject);
69 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject); 69 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject);
70 SECURITY_DCHECK(it != m_clients.end()); 70 SECURITY_DCHECK(it != m_clients.end());
71 71
72 IntSize removedImageSize; 72 IntSize removedImageSize;
73 SizeAndCount& sizeCount = it->value; 73 SizeAndCount& sizeCount = it->value;
74 IntSize size = sizeCount.size; 74 IntSize size = sizeCount.size;
75 if (!size.isEmpty()) { 75 if (!size.isEmpty()) {
76 m_sizes.remove(size); 76 m_sizes.erase(size);
77 if (!m_sizes.contains(size)) 77 if (!m_sizes.contains(size))
78 m_images.erase(size); 78 m_images.erase(size);
79 } 79 }
80 80
81 if (!--sizeCount.count) 81 if (!--sizeCount.count)
82 m_clients.erase(layoutObject); 82 m_clients.erase(layoutObject);
83 83
84 if (m_clients.isEmpty()) { 84 if (m_clients.isEmpty()) {
85 DCHECK(m_keepAlive); 85 DCHECK(m_keepAlive);
86 m_keepAlive.clear(); 86 m_keepAlive.clear();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 break; 224 break;
225 case ConicGradientClass: 225 case ConicGradientClass:
226 toCSSConicGradientValue(this)->loadSubimages(document); 226 toCSSConicGradientValue(this)->loadSubimages(document);
227 break; 227 break;
228 default: 228 default:
229 NOTREACHED(); 229 NOTREACHED();
230 } 230 }
231 } 231 }
232 232
233 } // namespace blink 233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698