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

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

Issue 334283004: Rename DOMWindow to LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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 11 matching lines...) Expand all
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 * 23 *
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/dom/ScriptedAnimationController.h" 27 #include "core/dom/ScriptedAnimationController.h"
28 28
29 #include "core/dom/Document.h" 29 #include "core/dom/Document.h"
30 #include "core/dom/RequestAnimationFrameCallback.h" 30 #include "core/dom/RequestAnimationFrameCallback.h"
31 #include "core/events/Event.h" 31 #include "core/events/Event.h"
32 #include "core/frame/DOMWindow.h" 32 #include "core/frame/LocalDOMWindow.h"
33 #include "core/frame/FrameView.h" 33 #include "core/frame/FrameView.h"
34 #include "core/inspector/InspectorInstrumentation.h" 34 #include "core/inspector/InspectorInstrumentation.h"
35 #include "core/inspector/InspectorTraceEvents.h" 35 #include "core/inspector/InspectorTraceEvents.h"
36 #include "core/loader/DocumentLoader.h" 36 #include "core/loader/DocumentLoader.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 std::pair<EventTarget*, StringImpl*> eventTargetKey(const Event* event) 40 std::pair<EventTarget*, StringImpl*> eventTargetKey(const Event* event)
41 { 41 {
42 return std::make_pair(event->target(), event->type().impl()); 42 return std::make_pair(event->target(), event->type().impl());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 { 112 {
113 WillBeHeapVector<RefPtrWillBeMember<Event> > events; 113 WillBeHeapVector<RefPtrWillBeMember<Event> > events;
114 events.swap(m_eventQueue); 114 events.swap(m_eventQueue);
115 m_perFrameEvents.clear(); 115 m_perFrameEvents.clear();
116 116
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 (LocalDOMWindow* 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::didDispatchEvent(eventTarget, events[i].get()) ;
128 } 128 }
129 } 129 }
130 130
131 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) 131 void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow)
132 { 132 {
(...skipping 66 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