| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 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 | 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 void ScriptedAnimationController::resume() | 75 void ScriptedAnimationController::resume() |
| 76 { | 76 { |
| 77 // It would be nice to put an ASSERT(m_suspendCount > 0) here, but in WK1 re
sume() can be called | 77 // It would be nice to put an ASSERT(m_suspendCount > 0) here, but in WK1 re
sume() can be called |
| 78 // even when suspend hasn't (if a tab was created in the background). | 78 // even when suspend hasn't (if a tab was created in the background). |
| 79 if (m_suspendCount > 0) | 79 if (m_suspendCount > 0) |
| 80 --m_suspendCount; | 80 --m_suspendCount; |
| 81 scheduleAnimationIfNeeded(); | 81 scheduleAnimationIfNeeded(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 ScriptedAnimationController::CallbackId ScriptedAnimationController::registerCal
lback(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback> callback) | 84 ScriptedAnimationController::CallbackId ScriptedAnimationController::registerCal
lback(RequestAnimationFrameCallback* callback) |
| 85 { | 85 { |
| 86 ScriptedAnimationController::CallbackId id = ++m_nextCallbackId; | 86 ScriptedAnimationController::CallbackId id = ++m_nextCallbackId; |
| 87 callback->m_cancelled = false; | 87 callback->m_cancelled = false; |
| 88 callback->m_id = id; | 88 callback->m_id = id; |
| 89 m_callbacks.append(callback); | 89 m_callbacks.append(callback); |
| 90 scheduleAnimationIfNeeded(); | 90 scheduleAnimationIfNeeded(); |
| 91 | 91 |
| 92 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Reques
tAnimationFrame", "data", InspectorAnimationFrameEvent::data(m_document, id)); | 92 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Reques
tAnimationFrame", "data", InspectorAnimationFrameEvent::data(m_document, id)); |
| 93 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); | 93 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); |
| 94 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 94 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 return; | 233 return; |
| 234 | 234 |
| 235 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) | 235 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) |
| 236 return; | 236 return; |
| 237 | 237 |
| 238 if (FrameView* frameView = m_document->view()) | 238 if (FrameView* frameView = m_document->view()) |
| 239 frameView->scheduleAnimation(); | 239 frameView->scheduleAnimation(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } | 242 } |
| OLD | NEW |