| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 { | 152 { |
| 153 m_timer.stop(); | 153 m_timer.stop(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void AnimationTimeline::AnimationTimelineTiming::serviceOnNextFrame() | 156 void AnimationTimeline::AnimationTimelineTiming::serviceOnNextFrame() |
| 157 { | 157 { |
| 158 if (m_timeline->m_document && m_timeline->m_document->view()) | 158 if (m_timeline->m_document && m_timeline->m_document->view()) |
| 159 m_timeline->m_document->view()->scheduleAnimation(); | 159 m_timeline->m_document->view()->scheduleAnimation(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void AnimationTimeline::AnimationTimelineTiming::trace(Visitor* visitor) | |
| 163 { | |
| 164 visitor->trace(m_timeline); | |
| 165 AnimationTimeline::PlatformTiming::trace(visitor); | |
| 166 } | |
| 167 | |
| 168 double AnimationTimeline::currentTime(bool& isNull) | 162 double AnimationTimeline::currentTime(bool& isNull) |
| 169 { | 163 { |
| 170 return currentTimeInternal(isNull) * 1000; | 164 return currentTimeInternal(isNull) * 1000; |
| 171 } | 165 } |
| 172 | 166 |
| 173 double AnimationTimeline::currentTimeInternal(bool& isNull) | 167 double AnimationTimeline::currentTimeInternal(bool& isNull) |
| 174 { | 168 { |
| 175 if (!m_document) { | 169 if (!m_document) { |
| 176 isNull = true; | 170 isNull = true; |
| 177 return std::numeric_limits<double>::quiet_NaN(); | 171 return std::numeric_limits<double>::quiet_NaN(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 217 } |
| 224 | 218 |
| 225 #if !ENABLE(OILPAN) | 219 #if !ENABLE(OILPAN) |
| 226 void AnimationTimeline::detachFromDocument() | 220 void AnimationTimeline::detachFromDocument() |
| 227 { | 221 { |
| 228 // FIXME: AnimationTimeline should keep Document alive. | 222 // FIXME: AnimationTimeline should keep Document alive. |
| 229 m_document = nullptr; | 223 m_document = nullptr; |
| 230 } | 224 } |
| 231 #endif | 225 #endif |
| 232 | 226 |
| 233 void AnimationTimeline::trace(Visitor* visitor) | |
| 234 { | |
| 235 #if ENABLE(OILPAN) | |
| 236 visitor->trace(m_document); | |
| 237 visitor->trace(m_timing); | |
| 238 visitor->trace(m_playersNeedingUpdate); | |
| 239 visitor->trace(m_players); | |
| 240 #endif | |
| 241 } | |
| 242 | |
| 243 } // namespace | 227 } // namespace |
| OLD | NEW |