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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutProgress.cpp

Issue 1721943002: Don't animate a progress bar if it isn't animated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutProgress.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutProgress.cpp b/third_party/WebKit/Source/core/layout/LayoutProgress.cpp
index 5b2c45cf7b105c6d8d61788b09b3473ac276dcad..9ec5d1bfa1ec38637c52c3963cb7a2c68be6927e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutProgress.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutProgress.cpp
@@ -74,6 +74,16 @@ bool LayoutProgress::isDeterminate() const
&& HTMLProgressElement::InvalidPosition != position());
}
+bool LayoutProgress::isAnimationTimerActive() const
+{
+ return m_animationTimer.isActive();
+}
+
+bool LayoutProgress::isAnimating() const
+{
+ return m_animating;
+}
+
void LayoutProgress::animationTimerFired(Timer<LayoutProgress>*)
{
setShouldDoFullPaintInvalidation();
@@ -86,7 +96,7 @@ void LayoutProgress::updateAnimationState()
m_animationDuration = LayoutTheme::theme().animationDurationForProgressBar();
m_animationRepeatInterval = LayoutTheme::theme().animationRepeatIntervalForProgressBar();
- bool animating = style()->hasAppearance() && m_animationDuration > 0;
+ bool animating = !isDeterminate() && style()->hasAppearance() && m_animationDuration > 0;
if (animating == m_animating)
return;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutProgress.h ('k') | third_party/WebKit/Source/core/layout/LayoutProgressTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698