| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 InspectorInstrumentation::didRemoveEvent(eventTarget, events[i].get()); | 153 InspectorInstrumentation::didRemoveEvent(eventTarget, events[i].get()); |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 | 156 |
| 157 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) | 157 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) |
| 158 { | 158 { |
| 159 // dispatchEvents() runs script which can cause the document to be destroyed
. | 159 // dispatchEvents() runs script which can cause the document to be destroyed
. |
| 160 if (!m_document) | 160 if (!m_document) |
| 161 return; | 161 return; |
| 162 | 162 |
| 163 double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTime
ToZeroBasedDocumentTime(monotonicTimeNow); | 163 double highResNowMs = 1000.0 * m_document->loader()->timing().monotonicTimeT
oZeroBasedDocumentTime(monotonicTimeNow); |
| 164 double legacyHighResNowMs = 1000.0 * m_document->loader()->timing()->monoton
icTimeToPseudoWallTime(monotonicTimeNow); | 164 double legacyHighResNowMs = 1000.0 * m_document->loader()->timing().monotoni
cTimeToPseudoWallTime(monotonicTimeNow); |
| 165 | 165 |
| 166 // First, generate a list of callbacks to consider. Callbacks registered fr
om this point | 166 // First, generate a list of callbacks to consider. Callbacks registered fr
om this point |
| 167 // on are considered only for the "next" frame, not this one. | 167 // on are considered only for the "next" frame, not this one. |
| 168 ASSERT(m_callbacksToInvoke.isEmpty()); | 168 ASSERT(m_callbacksToInvoke.isEmpty()); |
| 169 m_callbacksToInvoke.swap(m_callbacks); | 169 m_callbacksToInvoke.swap(m_callbacks); |
| 170 | 170 |
| 171 for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) { | 171 for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) { |
| 172 RequestAnimationFrameCallback* callback = m_callbacksToInvoke[i].get(); | 172 RequestAnimationFrameCallback* callback = m_callbacksToInvoke[i].get(); |
| 173 if (!callback->m_cancelled) { | 173 if (!callback->m_cancelled) { |
| 174 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FireAn
imationFrame", "data", InspectorAnimationFrameEvent::data(m_document, callback->
m_id)); | 174 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FireAn
imationFrame", "data", InspectorAnimationFrameEvent::data(m_document, callback->
m_id)); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return; | 243 return; |
| 244 | 244 |
| 245 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) | 245 if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListener
s.size()) |
| 246 return; | 246 return; |
| 247 | 247 |
| 248 if (FrameView* frameView = m_document->view()) | 248 if (FrameView* frameView = m_document->view()) |
| 249 frameView->scheduleAnimation(); | 249 frameView->scheduleAnimation(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 } | 252 } |
| OLD | NEW |