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

Side by Side Diff: third_party/WebKit/Source/core/animation/EffectStack.cpp

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void copyToActiveInterpolationsMap( 44 void copyToActiveInterpolationsMap(
45 const Vector<RefPtr<Interpolation>>& source, 45 const Vector<RefPtr<Interpolation>>& source,
46 EffectStack::PropertyHandleFilter propertyHandleFilter, 46 EffectStack::PropertyHandleFilter propertyHandleFilter,
47 ActiveInterpolationsMap& target) { 47 ActiveInterpolationsMap& target) {
48 for (const auto& interpolation : source) { 48 for (const auto& interpolation : source) {
49 PropertyHandle property = interpolation->getProperty(); 49 PropertyHandle property = interpolation->getProperty();
50 if (propertyHandleFilter && !propertyHandleFilter(property)) 50 if (propertyHandleFilter && !propertyHandleFilter(property))
51 continue; 51 continue;
52 ActiveInterpolationsMap::AddResult entry = 52 ActiveInterpolationsMap::AddResult entry =
53 target.add(property, ActiveInterpolations(1)); 53 target.insert(property, ActiveInterpolations(1));
54 ActiveInterpolations& activeInterpolations = entry.storedValue->value; 54 ActiveInterpolations& activeInterpolations = entry.storedValue->value;
55 if (!entry.isNewEntry && 55 if (!entry.isNewEntry &&
56 (RuntimeEnabledFeatures::stackedCSSPropertyAnimationsEnabled() || 56 (RuntimeEnabledFeatures::stackedCSSPropertyAnimationsEnabled() ||
57 !property.isCSSProperty() || property.isPresentationAttribute()) && 57 !property.isCSSProperty() || property.isPresentationAttribute()) &&
58 interpolation->isInvalidatableInterpolation() && 58 interpolation->isInvalidatableInterpolation() &&
59 toInvalidatableInterpolation(*interpolation) 59 toInvalidatableInterpolation(*interpolation)
60 .dependsOnUnderlyingValue()) { 60 .dependsOnUnderlyingValue()) {
61 activeInterpolations.push_back(interpolation.get()); 61 activeInterpolations.push_back(interpolation.get());
62 } else { 62 } else {
63 activeInterpolations.at(0) = interpolation.get(); 63 activeInterpolations.at(0) = interpolation.get();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if (!CompositorAnimations::getAnimatedBoundingBox( 182 if (!CompositorAnimations::getAnimatedBoundingBox(
183 expandingBox, *effect->model(), startRange, endRange)) 183 expandingBox, *effect->model(), startRange, endRange))
184 return false; 184 return false;
185 box.expandTo(expandingBox); 185 box.expandTo(expandingBox);
186 } 186 }
187 } 187 }
188 return true; 188 return true;
189 } 189 }
190 190
191 } // namespace blink 191 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698