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

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

Issue 2796163002: Migrate WTF::HashCountedSet::add() to ::insert() (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 29 matching lines...) Expand all
40 40
41 void CSSImageGeneratorValue::addClient(const LayoutObject* layoutObject, 41 void CSSImageGeneratorValue::addClient(const LayoutObject* layoutObject,
42 const IntSize& size) { 42 const IntSize& size) {
43 DCHECK(layoutObject); 43 DCHECK(layoutObject);
44 if (m_clients.isEmpty()) { 44 if (m_clients.isEmpty()) {
45 DCHECK(!m_keepAlive); 45 DCHECK(!m_keepAlive);
46 m_keepAlive = this; 46 m_keepAlive = this;
47 } 47 }
48 48
49 if (!size.isEmpty()) 49 if (!size.isEmpty())
50 m_sizes.add(size); 50 m_sizes.insert(size);
51 51
52 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject); 52 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject);
53 if (it == m_clients.end()) { 53 if (it == m_clients.end()) {
54 m_clients.insert(layoutObject, SizeAndCount(size, 1)); 54 m_clients.insert(layoutObject, SizeAndCount(size, 1));
55 } else { 55 } else {
56 SizeAndCount& sizeCount = it->value; 56 SizeAndCount& sizeCount = it->value;
57 ++sizeCount.count; 57 ++sizeCount.count;
58 } 58 }
59 } 59 }
60 60
(...skipping 163 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