| OLD | NEW |
| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 double AnimationTimeline::currentTime() { | 216 double AnimationTimeline::currentTime() { |
| 217 return CurrentTimeInternal() * 1000; | 217 return CurrentTimeInternal() * 1000; |
| 218 } | 218 } |
| 219 | 219 |
| 220 double AnimationTimeline::CurrentTimeInternal() { | 220 double AnimationTimeline::CurrentTimeInternal() { |
| 221 bool is_null; | 221 bool is_null; |
| 222 return CurrentTimeInternal(is_null); | 222 return CurrentTimeInternal(is_null); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void AnimationTimeline::setCurrentTime(double current_time) { | 225 void AnimationTimeline::setCurrentTime(double current_time, bool is_null) { |
| 226 SetCurrentTimeInternal(current_time / 1000); | 226 SetCurrentTimeInternal(current_time / 1000); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void AnimationTimeline::SetCurrentTimeInternal(double current_time) { | 229 void AnimationTimeline::SetCurrentTimeInternal(double current_time) { |
| 230 if (!IsActive()) | 230 if (!IsActive()) |
| 231 return; | 231 return; |
| 232 zero_time_ = playback_rate_ == 0 | 232 zero_time_ = playback_rate_ == 0 |
| 233 ? current_time | 233 ? current_time |
| 234 : GetDocument()->GetAnimationClock().CurrentTime() - | 234 : GetDocument()->GetAnimationClock().CurrentTime() - |
| 235 current_time / playback_rate_; | 235 current_time / playback_rate_; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 318 } |
| 319 | 319 |
| 320 DEFINE_TRACE(AnimationTimeline) { | 320 DEFINE_TRACE(AnimationTimeline) { |
| 321 visitor->Trace(document_); | 321 visitor->Trace(document_); |
| 322 visitor->Trace(timing_); | 322 visitor->Trace(timing_); |
| 323 visitor->Trace(animations_needing_update_); | 323 visitor->Trace(animations_needing_update_); |
| 324 visitor->Trace(animations_); | 324 visitor->Trace(animations_); |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace blink | 327 } // namespace blink |
| OLD | NEW |