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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (value.isImageSetValue()) 60 if (value.isImageSetValue())
61 return setOrPendingFromValue(property, toCSSImageSetValue(value)); 61 return setOrPendingFromValue(property, toCSSImageSetValue(value));
62 62
63 return nullptr; 63 return nullptr;
64 } 64 }
65 65
66 StyleImage* ElementStyleResources::generatedOrPendingFromValue( 66 StyleImage* ElementStyleResources::generatedOrPendingFromValue(
67 CSSPropertyID property, 67 CSSPropertyID property,
68 const CSSImageGeneratorValue& value) { 68 const CSSImageGeneratorValue& value) {
69 if (value.isPending()) { 69 if (value.isPending()) {
70 m_pendingImageProperties.add(property); 70 m_pendingImageProperties.insert(property);
71 return StylePendingImage::create(value); 71 return StylePendingImage::create(value);
72 } 72 }
73 return StyleGeneratedImage::create(value); 73 return StyleGeneratedImage::create(value);
74 } 74 }
75 75
76 StyleImage* ElementStyleResources::setOrPendingFromValue( 76 StyleImage* ElementStyleResources::setOrPendingFromValue(
77 CSSPropertyID property, 77 CSSPropertyID property,
78 const CSSImageSetValue& value) { 78 const CSSImageSetValue& value) {
79 if (value.isCachePending(m_deviceScaleFactor)) { 79 if (value.isCachePending(m_deviceScaleFactor)) {
80 m_pendingImageProperties.add(property); 80 m_pendingImageProperties.insert(property);
81 return StylePendingImage::create(value); 81 return StylePendingImage::create(value);
82 } 82 }
83 return value.cachedImage(m_deviceScaleFactor); 83 return value.cachedImage(m_deviceScaleFactor);
84 } 84 }
85 85
86 StyleImage* ElementStyleResources::cachedOrPendingFromValue( 86 StyleImage* ElementStyleResources::cachedOrPendingFromValue(
87 CSSPropertyID property, 87 CSSPropertyID property,
88 const CSSImageValue& value) { 88 const CSSImageValue& value) {
89 if (value.isCachePending()) { 89 if (value.isCachePending()) {
90 m_pendingImageProperties.add(property); 90 m_pendingImageProperties.insert(property);
91 return StylePendingImage::create(value); 91 return StylePendingImage::create(value);
92 } 92 }
93 value.restoreCachedResourceIfNeeded(*m_document); 93 value.restoreCachedResourceIfNeeded(*m_document);
94 return value.cachedImage(); 94 return value.cachedImage();
95 } 95 }
96 96
97 SVGElementProxy& ElementStyleResources::cachedOrPendingFromValue( 97 SVGElementProxy& ElementStyleResources::cachedOrPendingFromValue(
98 const CSSURIValue& value) { 98 const CSSURIValue& value) {
99 return value.ensureElementProxy(*m_document); 99 return value.ensureElementProxy(*m_document);
100 } 100 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 255 }
256 } 256 }
257 } 257 }
258 258
259 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) { 259 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) {
260 loadPendingImages(computedStyle); 260 loadPendingImages(computedStyle);
261 loadPendingSVGDocuments(computedStyle); 261 loadPendingSVGDocuments(computedStyle);
262 } 262 }
263 263
264 } // namespace blink 264 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698