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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffectModel.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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 RefPtr<TimingFunction> zeroOffsetEasing = m_defaultKeyframeEasing; 188 RefPtr<TimingFunction> zeroOffsetEasing = m_defaultKeyframeEasing;
189 for (const auto& keyframe : normalizedKeyframes(getFrames())) { 189 for (const auto& keyframe : normalizedKeyframes(getFrames())) {
190 if (keyframe->offset() == 0) 190 if (keyframe->offset() == 0)
191 zeroOffsetEasing = &keyframe->easing(); 191 zeroOffsetEasing = &keyframe->easing();
192 192
193 for (const PropertyHandle& property : keyframe->properties()) { 193 for (const PropertyHandle& property : keyframe->properties()) {
194 KeyframeGroupMap::iterator groupIter = m_keyframeGroups->find(property); 194 KeyframeGroupMap::iterator groupIter = m_keyframeGroups->find(property);
195 PropertySpecificKeyframeGroup* group; 195 PropertySpecificKeyframeGroup* group;
196 if (groupIter == m_keyframeGroups->end()) { 196 if (groupIter == m_keyframeGroups->end()) {
197 group = m_keyframeGroups 197 group = m_keyframeGroups
198 ->add(property, 198 ->insert(property,
199 WTF::wrapUnique(new PropertySpecificKeyframeGroup)) 199 WTF::wrapUnique(new PropertySpecificKeyframeGroup))
200 .storedValue->value.get(); 200 .storedValue->value.get();
201 } else { 201 } else {
202 group = groupIter->value.get(); 202 group = groupIter->value.get();
203 } 203 }
204 204
205 group->appendKeyframe(keyframe->createPropertySpecificKeyframe(property)); 205 group->appendKeyframe(keyframe->createPropertySpecificKeyframe(property));
206 } 206 }
207 } 207 }
208 208
209 // Add synthetic keyframes. 209 // Add synthetic keyframes.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 if (m_keyframes.back()->offset() != 1.0) { 318 if (m_keyframes.back()->offset() != 1.0) {
319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); 319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr));
320 addedSyntheticKeyframe = true; 320 addedSyntheticKeyframe = true;
321 } 321 }
322 322
323 return addedSyntheticKeyframe; 323 return addedSyntheticKeyframe;
324 } 324 }
325 325
326 } // namespace blink 326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698