OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 #endif | 249 #endif |
250 | 250 |
251 UpdateAnimationsAndScheduleFrameIfNeeded(elapsed, true); | 251 UpdateAnimationsAndScheduleFrameIfNeeded(elapsed, true); |
252 } | 252 } |
253 | 253 |
254 void SMILTimeContainer::ScheduleAnimationFrame(double delay_time) { | 254 void SMILTimeContainer::ScheduleAnimationFrame(double delay_time) { |
255 DCHECK(std::isfinite(delay_time)); | 255 DCHECK(std::isfinite(delay_time)); |
256 DCHECK(IsTimelineRunning()); | 256 DCHECK(IsTimelineRunning()); |
257 DCHECK(!wakeup_timer_.IsActive()); | 257 DCHECK(!wakeup_timer_.IsActive()); |
258 | 258 |
259 if (delay_time < AnimationTimeline::kMinimumDelay) { | 259 if (delay_time < DocumentTimeline::kMinimumDelay) { |
260 ServiceOnNextFrame(); | 260 ServiceOnNextFrame(); |
261 } else { | 261 } else { |
262 ScheduleWakeUp(delay_time - AnimationTimeline::kMinimumDelay, | 262 ScheduleWakeUp(delay_time - DocumentTimeline::kMinimumDelay, |
263 kFutureAnimationFrame); | 263 kFutureAnimationFrame); |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 void SMILTimeContainer::CancelAnimationFrame() { | 267 void SMILTimeContainer::CancelAnimationFrame() { |
268 frame_scheduling_state_ = kIdle; | 268 frame_scheduling_state_ = kIdle; |
269 wakeup_timer_.Stop(); | 269 wakeup_timer_.Stop(); |
270 } | 270 } |
271 | 271 |
272 void SMILTimeContainer::ScheduleWakeUp( | 272 void SMILTimeContainer::ScheduleWakeUp( |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 void SMILTimeContainer::AdvanceFrameForTesting() { | 532 void SMILTimeContainer::AdvanceFrameForTesting() { |
533 SetElapsed(Elapsed() + kInitialFrameDelay); | 533 SetElapsed(Elapsed() + kInitialFrameDelay); |
534 } | 534 } |
535 | 535 |
536 DEFINE_TRACE(SMILTimeContainer) { | 536 DEFINE_TRACE(SMILTimeContainer) { |
537 visitor->Trace(scheduled_animations_); | 537 visitor->Trace(scheduled_animations_); |
538 visitor->Trace(owner_svg_element_); | 538 visitor->Trace(owner_svg_element_); |
539 } | 539 } |
540 | 540 |
541 } // namespace blink | 541 } // namespace blink |
OLD | NEW |