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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 2261443002: Replace SMILTime with double for elapsed time in SMILTimeContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@smilcontainer-canscheduleframe-pred
Patch Set: REbase Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 Google, Inc. 5 * Copyright (C) 2014 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 m_timeContainer->resume(); 541 m_timeContainer->resume();
542 } 542 }
543 543
544 bool SVGSVGElement::animationsPaused() const 544 bool SVGSVGElement::animationsPaused() const
545 { 545 {
546 return m_timeContainer->isPaused(); 546 return m_timeContainer->isPaused();
547 } 547 }
548 548
549 float SVGSVGElement::getCurrentTime() const 549 float SVGSVGElement::getCurrentTime() const
550 { 550 {
551 return narrowPrecisionToFloat(m_timeContainer->elapsed().value()); 551 return narrowPrecisionToFloat(m_timeContainer->elapsed());
552 } 552 }
553 553
554 void SVGSVGElement::setCurrentTime(float seconds) 554 void SVGSVGElement::setCurrentTime(float seconds)
555 { 555 {
556 ASSERT(std::isfinite(seconds)); 556 ASSERT(std::isfinite(seconds));
557 seconds = max(seconds, 0.0f); 557 seconds = max(seconds, 0.0f);
558 m_timeContainer->setElapsed(seconds); 558 m_timeContainer->setElapsed(seconds);
559 } 559 }
560 560
561 bool SVGSVGElement::selfHasRelativeLengths() const 561 bool SVGSVGElement::selfHasRelativeLengths() const
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 visitor->trace(m_width); 731 visitor->trace(m_width);
732 visitor->trace(m_height); 732 visitor->trace(m_height);
733 visitor->trace(m_translation); 733 visitor->trace(m_translation);
734 visitor->trace(m_timeContainer); 734 visitor->trace(m_timeContainer);
735 visitor->trace(m_viewSpec); 735 visitor->trace(m_viewSpec);
736 SVGGraphicsElement::trace(visitor); 736 SVGGraphicsElement::trace(visitor);
737 SVGFitToViewBox::trace(visitor); 737 SVGFitToViewBox::trace(visitor);
738 } 738 }
739 739
740 } // namespace blink 740 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698