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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 23451019: Use AnimationData::initialAnimationTimingFunction() in CSSAnimations::timingFromAnimationData() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « no previous file | 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 /* 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if (animationData->isDurationSet()) { 72 if (animationData->isDurationSet()) {
73 timing.iterationDuration = animationData->duration(); 73 timing.iterationDuration = animationData->duration();
74 timing.hasIterationDuration = true; 74 timing.hasIterationDuration = true;
75 } 75 }
76 if (animationData->isIterationCountSet()) { 76 if (animationData->isIterationCountSet()) {
77 if (animationData->iterationCount() == CSSAnimationData::IterationCountI nfinite) 77 if (animationData->iterationCount() == CSSAnimationData::IterationCountI nfinite)
78 timing.iterationCount = std::numeric_limits<double>::infinity(); 78 timing.iterationCount = std::numeric_limits<double>::infinity();
79 else 79 else
80 timing.iterationCount = animationData->iterationCount(); 80 timing.iterationCount = animationData->iterationCount();
81 } 81 }
82 // For CSS animations, timing functions apply to individual keyframes, not
83 // to the complete animation.
84 // FIXME: Until chained timing functions are implemented, we simply apply
85 // the default timing function to the complete animation.
82 if (animationData->isTimingFunctionSet()) { 86 if (animationData->isTimingFunctionSet()) {
83 if (animationData->timingFunction()->type() != TimingFunction::LinearFun ction) 87 if (animationData->timingFunction()->type() != TimingFunction::LinearFun ction)
84 timing.timingFunction = animationData->timingFunction(); 88 timing.timingFunction = animationData->timingFunction();
85 } else { 89 } else {
86 // CSS default is ease, default in model is linear. 90 timing.timingFunction = CSSAnimationData::initialAnimationTimingFunction ();
87 timing.timingFunction = CubicBezierTimingFunction::preset(CubicBezierTim ingFunction::Ease);
88 } 91 }
89 if (animationData->isFillModeSet()) { 92 if (animationData->isFillModeSet()) {
90 switch (animationData->fillMode()) { 93 switch (animationData->fillMode()) {
91 case AnimationFillModeForwards: 94 case AnimationFillModeForwards:
92 timing.fillMode = Timing::FillModeForwards; 95 timing.fillMode = Timing::FillModeForwards;
93 break; 96 break;
94 case AnimationFillModeBackwards: 97 case AnimationFillModeBackwards:
95 timing.fillMode = Timing::FillModeBackwards; 98 timing.fillMode = Timing::FillModeBackwards;
96 break; 99 break;
97 case AnimationFillModeBoth: 100 case AnimationFillModeBoth:
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 case CSSPropertyWordSpacing: 382 case CSSPropertyWordSpacing:
380 case CSSPropertyZIndex: 383 case CSSPropertyZIndex:
381 case CSSPropertyZoom: 384 case CSSPropertyZoom:
382 return true; 385 return true;
383 default: 386 default:
384 return false; 387 return false;
385 } 388 }
386 } 389 }
387 390
388 } // namespace WebCore 391 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698