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

Side by Side Diff: Source/core/rendering/RenderMarquee.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 9 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (!m_suspended && !m_stopped) { 166 if (!m_suspended && !m_stopped) {
167 if (isHorizontal()) 167 if (isHorizontal())
168 layer()->scrollableArea()->scrollToOffset(IntSize(m_start, 0)); 168 layer()->scrollableArea()->scrollToOffset(IntSize(m_start, 0));
169 else 169 else
170 layer()->scrollableArea()->scrollToOffset(IntSize(0, m_start)); 170 layer()->scrollableArea()->scrollToOffset(IntSize(0, m_start));
171 } else { 171 } else {
172 m_suspended = false; 172 m_suspended = false;
173 m_stopped = false; 173 m_stopped = false;
174 } 174 }
175 175
176 m_timer.startRepeating(speed() * 0.001); 176 m_timer.startRepeating(speed() * 0.001, FROM_HERE);
177 } 177 }
178 178
179 void RenderMarquee::suspend() 179 void RenderMarquee::suspend()
180 { 180 {
181 m_timer.stop(); 181 m_timer.stop();
182 m_suspended = true; 182 m_suspended = true;
183 } 183 }
184 184
185 void RenderMarquee::stop() 185 void RenderMarquee::stop()
186 { 186 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 s->setTextAlign(TASTART); 245 s->setTextAlign(TASTART);
246 } 246 }
247 247
248 // Legacy hack - multiple browsers default vertical marquees to 200px tall. 248 // Legacy hack - multiple browsers default vertical marquees to 200px tall.
249 if (!isHorizontal() && s->height().isAuto()) 249 if (!isHorizontal() && s->height().isAuto())
250 s->setHeight(Length(200, Fixed)); 250 s->setHeight(Length(200, Fixed));
251 251
252 if (speed() != marqueeSpeed()) { 252 if (speed() != marqueeSpeed()) {
253 m_speed = marqueeSpeed(); 253 m_speed = marqueeSpeed();
254 if (m_timer.isActive()) 254 if (m_timer.isActive())
255 m_timer.startRepeating(speed() * 0.001); 255 m_timer.startRepeating(speed() * 0.001, FROM_HERE);
256 } 256 }
257 257
258 // Check the loop count to see if we should now stop. 258 // Check the loop count to see if we should now stop.
259 bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops); 259 bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops);
260 if (activate && !m_timer.isActive()) 260 if (activate && !m_timer.isActive())
261 setNeedsLayout(); 261 setNeedsLayout();
262 else if (!activate && m_timer.isActive()) 262 else if (!activate && m_timer.isActive())
263 m_timer.stop(); 263 m_timer.stop();
264 } 264 }
265 265
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 m_reset = true; 320 m_reset = true;
321 } 321 }
322 322
323 if (isHorizontal()) 323 if (isHorizontal())
324 layer()->scrollableArea()->scrollToXOffset(newPos); 324 layer()->scrollableArea()->scrollToXOffset(newPos);
325 else 325 else
326 layer()->scrollableArea()->scrollToYOffset(newPos); 326 layer()->scrollableArea()->scrollToYOffset(newPos);
327 } 327 }
328 328
329 } // namespace WebCore 329 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/ImageQualityController.cpp ('k') | Source/core/rendering/RenderProgress.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698