OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 | 5 |
6 /** | 6 /** |
7 * @constructor | 7 * @constructor |
8 * @extends {WebInspector.SDKModel} | 8 * @extends {WebInspector.SDKModel} |
9 * @param {!WebInspector.Target} target | 9 * @param {!WebInspector.Target} target |
10 */ | 10 */ |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return this._payload.startTime; | 145 return this._payload.startTime; |
146 }, | 146 }, |
147 | 147 |
148 /** | 148 /** |
149 * @return {number} | 149 * @return {number} |
150 */ | 150 */ |
151 endTime: function() | 151 endTime: function() |
152 { | 152 { |
153 if (!this.source().iterations) | 153 if (!this.source().iterations) |
154 return Infinity; | 154 return Infinity; |
155 return this.startTime() + this.source().duration() * this.source().itera
tions(); | 155 return this.startTime() + this.source().delay() + this.source().duration
() * this.source().iterations() + this.source().endDelay(); |
156 }, | 156 }, |
157 | 157 |
158 /** | 158 /** |
159 * @return {number} | 159 * @return {number} |
160 */ | 160 */ |
161 currentTime: function() | 161 currentTime: function() |
162 { | 162 { |
163 return this._payload.currentTime; | 163 return this._payload.currentTime; |
164 }, | 164 }, |
165 | 165 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 * @param {number} delay | 226 * @param {number} delay |
227 */ | 227 */ |
228 setDelay: function(delay) | 228 setDelay: function(delay) |
229 { | 229 { |
230 this._delay = delay; | 230 this._delay = delay; |
231 }, | 231 }, |
232 | 232 |
233 /** | 233 /** |
234 * @return {number} | 234 * @return {number} |
235 */ | 235 */ |
| 236 endDelay: function() |
| 237 { |
| 238 return this._payload.endDelay; |
| 239 }, |
| 240 |
| 241 /** |
| 242 * @return {number} |
| 243 */ |
236 playbackRate: function() | 244 playbackRate: function() |
237 { | 245 { |
238 return this._payload.playbackRate; | 246 return this._payload.playbackRate; |
239 }, | 247 }, |
240 | 248 |
241 /** | 249 /** |
242 * @return {number} | 250 * @return {number} |
243 */ | 251 */ |
244 iterationStart: function() | 252 iterationStart: function() |
245 { | 253 { |
246 return this._payload.iterationStart; | 254 return this._payload.iterationStart; |
247 }, | 255 }, |
248 | 256 |
249 /** | 257 /** |
250 * @return {number} | 258 * @return {number} |
251 */ | 259 */ |
252 iterations: function() | 260 iterations: function() |
253 { | 261 { |
254 return this._payload.iterations; | 262 return this._payload.iterations || Infinity; |
255 }, | 263 }, |
256 | 264 |
257 /** | 265 /** |
258 * @return {number} | 266 * @return {number} |
259 */ | 267 */ |
260 duration: function() | 268 duration: function() |
261 { | 269 { |
262 return this._duration; | 270 return this._duration; |
263 }, | 271 }, |
264 | 272 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 /** | 464 /** |
457 * @override | 465 * @override |
458 * @param {!AnimationAgent.AnimationPlayer} payload | 466 * @param {!AnimationAgent.AnimationPlayer} payload |
459 * @param {boolean} resetTimeline | 467 * @param {boolean} resetTimeline |
460 */ | 468 */ |
461 animationPlayerCreated: function(payload, resetTimeline) | 469 animationPlayerCreated: function(payload, resetTimeline) |
462 { | 470 { |
463 this._animationModel.animationPlayerCreated(payload, resetTimeline); | 471 this._animationModel.animationPlayerCreated(payload, resetTimeline); |
464 } | 472 } |
465 } | 473 } |
OLD | NEW |