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

Side by Side Diff: Source/core/animation/TimedItem.cpp

Issue 19266007: Web Animations: Introduce ActiveAnimations and AnimationStack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 7 years, 5 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/TimedItem.h ('k') | Source/core/animation/TimedItemTest.cpp » ('j') | 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 27 matching lines...) Expand all
38 : m_parent(0) 38 : m_parent(0)
39 , m_startTime(0) 39 , m_startTime(0)
40 , m_specified(timing) 40 , m_specified(timing)
41 , m_calculated() 41 , m_calculated()
42 { 42 {
43 timing.assertValid(); 43 timing.assertValid();
44 } 44 }
45 45
46 void TimedItem::updateInheritedTime(double inheritedTime) const 46 void TimedItem::updateInheritedTime(double inheritedTime) const
47 { 47 {
48 ASSERT(player());
48 const double localTime = inheritedTime - m_startTime; 49 const double localTime = inheritedTime - m_startTime;
49 const double iterationDuration = m_specified.hasIterationDuration 50 const double iterationDuration = m_specified.hasIterationDuration
50 ? m_specified.iterationDuration 51 ? m_specified.iterationDuration
51 : intrinsicIterationDuration(); 52 : intrinsicIterationDuration();
52 53
53 const double repeatedDuration = iterationDuration * m_specified.iterationCou nt; 54 const double repeatedDuration = iterationDuration * m_specified.iterationCou nt;
54 const double activeDuration = m_specified.playbackRate 55 const double activeDuration = m_specified.playbackRate
55 ? repeatedDuration / abs(m_specified.playbackRate) 56 ? repeatedDuration / abs(m_specified.playbackRate)
56 : std::numeric_limits<double>::infinity(); 57 : std::numeric_limits<double>::infinity();
57 58
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 , currentIteration(nullValue()) 101 , currentIteration(nullValue())
101 , timeFraction(nullValue()) 102 , timeFraction(nullValue())
102 , isScheduled(false) 103 , isScheduled(false)
103 , isActive(false) 104 , isActive(false)
104 , isCurrent(false) 105 , isCurrent(false)
105 , isInEffect(false) 106 , isInEffect(false)
106 { 107 {
107 } 108 }
108 109
109 } // namespace WebCore 110 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/TimedItem.h ('k') | Source/core/animation/TimedItemTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698