| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 for (size_t i = 0; i < events.size(); ++i) { | 126 for (size_t i = 0; i < events.size(); ++i) { |
| 127 EventTarget* eventTarget = events[i]->target(); | 127 EventTarget* eventTarget = events[i]->target(); |
| 128 // FIXME: we should figure out how to make dispatchEvent properly virtua
l to avoid | 128 // FIXME: we should figure out how to make dispatchEvent properly virtua
l to avoid |
| 129 // special casting window. | 129 // special casting window. |
| 130 // FIXME: We should not fire events for nodes that are no longer in the
tree. | 130 // FIXME: We should not fire events for nodes that are no longer in the
tree. |
| 131 if (DOMWindow* window = eventTarget->toDOMWindow()) | 131 if (DOMWindow* window = eventTarget->toDOMWindow()) |
| 132 window->dispatchEvent(events[i], nullptr); | 132 window->dispatchEvent(events[i], nullptr); |
| 133 else | 133 else |
| 134 eventTarget->dispatchEvent(events[i]); | 134 eventTarget->dispatchEvent(events[i]); |
| 135 | 135 |
| 136 InspectorInstrumentation::didDispatchEvent(eventTarget, events[i].get())
; | 136 InspectorInstrumentation::didRemoveEvent(eventTarget, events[i].get()); |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) | 140 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) |
| 141 { | 141 { |
| 142 // dispatchEvents() runs script which can cause the document to be destroyed
. | 142 // dispatchEvents() runs script which can cause the document to be destroyed
. |
| 143 if (!m_document) | 143 if (!m_document) |
| 144 return; | 144 return; |
| 145 | 145 |
| 146 double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTime
ToZeroBasedDocumentTime(monotonicTimeNow); | 146 double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTime
ToZeroBasedDocumentTime(monotonicTimeNow); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 return; | 208 return; |
| 209 | 209 |
| 210 if (!m_callbacks.size() && !m_eventQueue.size()) | 210 if (!m_callbacks.size() && !m_eventQueue.size()) |
| 211 return; | 211 return; |
| 212 | 212 |
| 213 if (FrameView* frameView = m_document->view()) | 213 if (FrameView* frameView = m_document->view()) |
| 214 frameView->scheduleAnimation(); | 214 frameView->scheduleAnimation(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } | 217 } |
| OLD | NEW |