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

Side by Side Diff: third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/FrameRequestCallbackCollection.h" 5 #include "core/dom/FrameRequestCallbackCollection.h"
6 6
7 #include "core/dom/FrameRequestCallback.h" 7 #include "core/dom/FrameRequestCallback.h"
8 #include "core/inspector/InspectorInstrumentation.h" 8 #include "core/inspector/InspectorInstrumentation.h"
9 #include "core/inspector/InspectorTraceEvents.h" 9 #include "core/inspector/InspectorTraceEvents.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 m_callbacksToInvoke[i]->m_cancelled = true; 57 m_callbacksToInvoke[i]->m_cancelled = true;
58 // will be removed at the end of executeCallbacks() 58 // will be removed at the end of executeCallbacks()
59 return; 59 return;
60 } 60 }
61 } 61 }
62 } 62 }
63 63
64 void FrameRequestCallbackCollection::executeCallbacks( 64 void FrameRequestCallbackCollection::executeCallbacks(
65 double highResNowMs, 65 double highResNowMs,
66 double highResNowMsLegacy) { 66 double highResNowMsLegacy) {
67 // First, generate a list of callbacks to consider. Callbacks registered from this point 67 // First, generate a list of callbacks to consider. Callbacks registered from
68 // on are considered only for the "next" frame, not this one. 68 // this point on are considered only for the "next" frame, not this one.
69 DCHECK(m_callbacksToInvoke.isEmpty()); 69 DCHECK(m_callbacksToInvoke.isEmpty());
70 m_callbacksToInvoke.swap(m_callbacks); 70 m_callbacksToInvoke.swap(m_callbacks);
71 71
72 for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) { 72 for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) {
73 FrameRequestCallback* callback = m_callbacksToInvoke[i].get(); 73 FrameRequestCallback* callback = m_callbacksToInvoke[i].get();
74 if (!callback->m_cancelled) { 74 if (!callback->m_cancelled) {
75 TRACE_EVENT1( 75 TRACE_EVENT1(
76 "devtools.timeline", "FireAnimationFrame", "data", 76 "devtools.timeline", "FireAnimationFrame", "data",
77 InspectorAnimationFrameEvent::data(m_context, callback->m_id)); 77 InspectorAnimationFrameEvent::data(m_context, callback->m_id));
78 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 78 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
(...skipping 12 matching lines...) Expand all
91 m_callbacksToInvoke.clear(); 91 m_callbacksToInvoke.clear();
92 } 92 }
93 93
94 DEFINE_TRACE(FrameRequestCallbackCollection) { 94 DEFINE_TRACE(FrameRequestCallbackCollection) {
95 visitor->trace(m_callbacks); 95 visitor->trace(m_callbacks);
96 visitor->trace(m_callbacksToInvoke); 96 visitor->trace(m_callbacksToInvoke);
97 visitor->trace(m_context); 97 visitor->trace(m_context);
98 } 98 }
99 99
100 } // namespace blink 100 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698