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

Side by Side Diff: Source/core/inspector/InspectorAnimationAgent.cpp

Issue 1318543009: Oilpan: Partially ship Oilpan for core/animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorAnimationAgent.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "core/inspector/InspectorAnimationAgent.h" 7 #include "core/inspector/InspectorAnimationAgent.h"
8 8
9 #include "core/animation/Animation.h" 9 #include "core/animation/Animation.h"
10 #include "core/animation/AnimationEffect.h" 10 #include "core/animation/AnimationEffect.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Refer to CSSAnimations::calculateTransitionUpdateForProperty() for th e structure of transitions. 215 // Refer to CSSAnimations::calculateTransitionUpdateForProperty() for th e structure of transitions.
216 const KeyframeVector& frames = oldModel->getFrames(); 216 const KeyframeVector& frames = oldModel->getFrames();
217 ASSERT(frames.size() == 3); 217 ASSERT(frames.size() == 3);
218 KeyframeVector newFrames; 218 KeyframeVector newFrames;
219 for (int i = 0; i < 3; i++) 219 for (int i = 0; i < 3; i++)
220 newFrames.append(toAnimatableValueKeyframe(frames[i]->clone().get()) ); 220 newFrames.append(toAnimatableValueKeyframe(frames[i]->clone().get()) );
221 // Update delay, represented by the distance between the first two keyfr ames. 221 // Update delay, represented by the distance between the first two keyfr ames.
222 newFrames[1]->setOffset(delay / (delay + duration)); 222 newFrames[1]->setOffset(delay / (delay + duration));
223 model->setFrames(newFrames); 223 model->setFrames(newFrames);
224 224
225 RefPtrWillBeRawPtr<AnimationEffectTiming> timing = animation->effect()-> timing(); 225 AnimationEffectTiming* timing = animation->effect()->timing();
226 UnrestrictedDoubleOrString unrestrictedDuration; 226 UnrestrictedDoubleOrString unrestrictedDuration;
227 unrestrictedDuration.setUnrestrictedDouble(duration + delay); 227 unrestrictedDuration.setUnrestrictedDouble(duration + delay);
228 timing->setDuration(unrestrictedDuration); 228 timing->setDuration(unrestrictedDuration);
229 } else if (type == AnimationType::WebAnimation) { 229 } else if (type == AnimationType::WebAnimation) {
230 RefPtrWillBeRawPtr<AnimationEffectTiming> timing = animation->effect()-> timing(); 230 AnimationEffectTiming* timing = animation->effect()->timing();
231 UnrestrictedDoubleOrString unrestrictedDuration; 231 UnrestrictedDoubleOrString unrestrictedDuration;
232 unrestrictedDuration.setUnrestrictedDouble(duration); 232 unrestrictedDuration.setUnrestrictedDouble(duration);
233 timing->setDuration(unrestrictedDuration); 233 timing->setDuration(unrestrictedDuration);
234 timing->setDelay(delay); 234 timing->setDelay(delay);
235 } 235 }
236 } 236 }
237 237
238 void InspectorAnimationAgent::didCreateAnimation(Animation* animation) 238 void InspectorAnimationAgent::didCreateAnimation(Animation* animation)
239 { 239 {
240 const String& animationId = String::number(animation->sequenceNumber()); 240 const String& animationId = String::number(animation->sequenceNumber());
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 #if ENABLE(OILPAN) 295 #if ENABLE(OILPAN)
296 visitor->trace(m_pageAgent); 296 visitor->trace(m_pageAgent);
297 visitor->trace(m_domAgent); 297 visitor->trace(m_domAgent);
298 visitor->trace(m_idToAnimation); 298 visitor->trace(m_idToAnimation);
299 visitor->trace(m_idToAnimationType); 299 visitor->trace(m_idToAnimationType);
300 #endif 300 #endif
301 InspectorBaseAgent::trace(visitor); 301 InspectorBaseAgent::trace(visitor);
302 } 302 }
303 303
304 } 304 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorAnimationAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698