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

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

Issue 942583002: Move rendering/RenderProgress to layout/LayoutProgress (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/core/layout/LayoutProgress.h ('k') | Source/core/layout/LayoutTheme.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutProgress.cpp
diff --git a/Source/core/rendering/RenderProgress.cpp b/Source/core/layout/LayoutProgress.cpp
similarity index 82%
rename from Source/core/rendering/RenderProgress.cpp
rename to Source/core/layout/LayoutProgress.cpp
index a7f3675164ef7a8cfb744e2721f946ec294f53e2..c602e220d03c67ff9c02881265df3cd8a78649cb 100644
--- a/Source/core/rendering/RenderProgress.cpp
+++ b/Source/core/layout/LayoutProgress.cpp
@@ -20,7 +20,7 @@
#include "config.h"
-#include "core/rendering/RenderProgress.h"
+#include "core/layout/LayoutProgress.h"
#include "core/html/HTMLProgressElement.h"
#include "core/layout/LayoutTheme.h"
@@ -29,22 +29,22 @@
namespace blink {
-RenderProgress::RenderProgress(HTMLElement* element)
+LayoutProgress::LayoutProgress(HTMLElement* element)
: RenderBlockFlow(element)
, m_position(HTMLProgressElement::InvalidPosition)
, m_animationStartTime(0)
, m_animationRepeatInterval(0)
, m_animationDuration(0)
, m_animating(false)
- , m_animationTimer(this, &RenderProgress::animationTimerFired)
+ , m_animationTimer(this, &LayoutProgress::animationTimerFired)
{
}
-RenderProgress::~RenderProgress()
+LayoutProgress::~LayoutProgress()
{
}
-void RenderProgress::destroy()
+void LayoutProgress::destroy()
{
if (m_animating) {
m_animationTimer.stop();
@@ -53,7 +53,7 @@ void RenderProgress::destroy()
RenderBlockFlow::destroy();
}
-void RenderProgress::updateFromElement()
+void LayoutProgress::updateFromElement()
{
HTMLProgressElement* element = progressElement();
if (m_position == element->position())
@@ -65,25 +65,25 @@ void RenderProgress::updateFromElement()
RenderBlockFlow::updateFromElement();
}
-double RenderProgress::animationProgress() const
+double LayoutProgress::animationProgress() const
{
return m_animating ? (fmod((currentTime() - m_animationStartTime), m_animationDuration) / m_animationDuration) : 0;
}
-bool RenderProgress::isDeterminate() const
+bool LayoutProgress::isDeterminate() const
{
return (HTMLProgressElement::IndeterminatePosition != position()
- && HTMLProgressElement::InvalidPosition != position());
+ && HTMLProgressElement::InvalidPosition != position());
}
-void RenderProgress::animationTimerFired(Timer<RenderProgress>*)
+void LayoutProgress::animationTimerFired(Timer<LayoutProgress>*)
{
setShouldDoFullPaintInvalidation();
if (!m_animationTimer.isActive() && m_animating)
m_animationTimer.startOneShot(m_animationRepeatInterval, FROM_HERE);
}
-void RenderProgress::updateAnimationState()
+void LayoutProgress::updateAnimationState()
{
m_animationDuration = LayoutTheme::theme().animationDurationForProgressBar(this);
m_animationRepeatInterval = LayoutTheme::theme().animationRepeatIntervalForProgressBar(this);
@@ -96,11 +96,12 @@ void RenderProgress::updateAnimationState()
if (m_animating) {
m_animationStartTime = currentTime();
m_animationTimer.startOneShot(m_animationRepeatInterval, FROM_HERE);
- } else
+ } else {
m_animationTimer.stop();
+ }
}
-HTMLProgressElement* RenderProgress::progressElement() const
+HTMLProgressElement* LayoutProgress::progressElement() const
{
if (!node())
return 0;
« no previous file with comments | « Source/core/layout/LayoutProgress.h ('k') | Source/core/layout/LayoutTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698