Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: Source/core/dom/ScriptedAnimationController.cpp

Issue 333333002: DevTools: Instrument DOMWindowEventQueue for async stacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 for (size_t i = 0; i < events.size(); ++i) { 117 for (size_t i = 0; i < events.size(); ++i) {
118 EventTarget* eventTarget = events[i]->target(); 118 EventTarget* eventTarget = events[i]->target();
119 // FIXME: we should figure out how to make dispatchEvent properly virtua l to avoid 119 // FIXME: we should figure out how to make dispatchEvent properly virtua l to avoid
120 // special casting window. 120 // special casting window.
121 // FIXME: We should not fire events for nodes that are no longer in the tree. 121 // FIXME: We should not fire events for nodes that are no longer in the tree.
122 if (DOMWindow* window = eventTarget->toDOMWindow()) 122 if (DOMWindow* window = eventTarget->toDOMWindow())
123 window->dispatchEvent(events[i], nullptr); 123 window->dispatchEvent(events[i], nullptr);
124 else 124 else
125 eventTarget->dispatchEvent(events[i]); 125 eventTarget->dispatchEvent(events[i]);
126 126
127 InspectorInstrumentation::didDispatchEvent(eventTarget, events[i].get()) ; 127 InspectorInstrumentation::didRemoveEvent(eventTarget, events[i].get());
128 } 128 }
129 } 129 }
130 130
131 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) 131 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow)
132 { 132 {
133 // dispatchEvents() runs script which can cause the document to be destroyed . 133 // dispatchEvents() runs script which can cause the document to be destroyed .
134 if (!m_document) 134 if (!m_document)
135 return; 135 return;
136 136
137 double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTime ToZeroBasedDocumentTime(monotonicTimeNow); 137 double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTime ToZeroBasedDocumentTime(monotonicTimeNow);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return; 199 return;
200 200
201 if (!m_callbacks.size() && !m_eventQueue.size()) 201 if (!m_callbacks.size() && !m_eventQueue.size())
202 return; 202 return;
203 203
204 if (FrameView* frameView = m_document->view()) 204 if (FrameView* frameView = m_document->view())
205 frameView->scheduleAnimation(); 205 frameView->scheduleAnimation();
206 } 206 }
207 207
208 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698