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

Side by Side Diff: Source/core/animation/Timing.h

Issue 178663007: Web Animations: Reduce duplication of Timing defaults. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/animation/TimedItemCalculationsTest.cpp ('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 /* 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 FillModeBoth 46 FillModeBoth
47 }; 47 };
48 48
49 enum PlaybackDirection { 49 enum PlaybackDirection {
50 PlaybackDirectionNormal, 50 PlaybackDirectionNormal,
51 PlaybackDirectionReverse, 51 PlaybackDirectionReverse,
52 PlaybackDirectionAlternate, 52 PlaybackDirectionAlternate,
53 PlaybackDirectionAlternateReverse 53 PlaybackDirectionAlternateReverse
54 }; 54 };
55 55
56 static const Timing& defaults()
57 {
58 DEFINE_STATIC_LOCAL(Timing, timing, ());
59 return timing;
60 }
61
56 Timing() 62 Timing()
57 : startDelay(0) 63 : startDelay(0)
58 , endDelay(0) 64 , endDelay(0)
59 , fillMode(FillModeAuto) 65 , fillMode(FillModeAuto)
60 , iterationStart(0) 66 , iterationStart(0)
61 , iterationCount(1) 67 , iterationCount(1)
62 , iterationDuration(std::numeric_limits<double>::quiet_NaN()) 68 , iterationDuration(std::numeric_limits<double>::quiet_NaN())
63 , playbackRate(1) 69 , playbackRate(1)
64 , direction(PlaybackDirectionNormal) 70 , direction(PlaybackDirectionNormal)
65 , timingFunction(LinearTimingFunction::create()) 71 , timingFunction(LinearTimingFunction::create())
(...skipping 20 matching lines...) Expand all
86 double iterationDuration; 92 double iterationDuration;
87 // FIXME: Add activeDuration. 93 // FIXME: Add activeDuration.
88 double playbackRate; 94 double playbackRate;
89 PlaybackDirection direction; 95 PlaybackDirection direction;
90 RefPtr<TimingFunction> timingFunction; 96 RefPtr<TimingFunction> timingFunction;
91 }; 97 };
92 98
93 } // namespace WebCore 99 } // namespace WebCore
94 100
95 #endif 101 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/TimedItemCalculationsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698