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

Unified Diff: Source/core/layout/LayoutThemeDefault.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/LayoutThemeDefault.h ('k') | Source/core/layout/LayoutThemeMac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutThemeDefault.cpp
diff --git a/Source/core/layout/LayoutThemeDefault.cpp b/Source/core/layout/LayoutThemeDefault.cpp
index ef477f9b726dc4905d29736256d154c252527f25..2d43d1bb780ecfdc2cf7158a019757517ec4c8fb 100644
--- a/Source/core/layout/LayoutThemeDefault.cpp
+++ b/Source/core/layout/LayoutThemeDefault.cpp
@@ -28,9 +28,9 @@
#include "core/CSSValueKeywords.h"
#include "core/layout/LayoutMediaControls.h"
#include "core/layout/LayoutObject.h"
+#include "core/layout/LayoutProgress.h"
#include "core/layout/LayoutThemeFontProvider.h"
#include "core/layout/PaintInfo.h"
-#include "core/rendering/RenderProgress.h"
#include "platform/LayoutTestSupport.h"
#include "platform/PlatformResourceLoader.h"
#include "platform/graphics/Color.h"
@@ -491,7 +491,7 @@ bool LayoutThemeDefault::paintProgressBar(LayoutObject* o, const PaintInfo& i, c
if (!o->isProgress())
return true;
- RenderProgress* renderProgress = toRenderProgress(o);
+ LayoutProgress* renderProgress = toLayoutProgress(o);
IntRect valueRect = progressValueRectFor(renderProgress, rect);
WebThemeEngine::ExtraParams extraParams;
@@ -815,13 +815,13 @@ static const int progressActivityBlocks = 5;
static const int progressAnimationFrames = 10;
static const double progressAnimationInterval = 0.125;
-IntRect LayoutThemeDefault::determinateProgressValueRectFor(RenderProgress* renderProgress, const IntRect& rect) const
+IntRect LayoutThemeDefault::determinateProgressValueRectFor(LayoutProgress* renderProgress, const IntRect& rect) const
{
int dx = rect.width() * renderProgress->position();
return IntRect(rect.x(), rect.y(), dx, rect.height());
}
-IntRect LayoutThemeDefault::indeterminateProgressValueRectFor(RenderProgress* renderProgress, const IntRect& rect) const
+IntRect LayoutThemeDefault::indeterminateProgressValueRectFor(LayoutProgress* renderProgress, const IntRect& rect) const
{
int valueWidth = rect.width() / progressActivityBlocks;
@@ -835,17 +835,17 @@ IntRect LayoutThemeDefault::indeterminateProgressValueRectFor(RenderProgress* re
return IntRect(rect.x() + (1.0 - progress) * 2 * movableWidth, rect.y(), valueWidth, rect.height());
}
-double LayoutThemeDefault::animationRepeatIntervalForProgressBar(RenderProgress*) const
+double LayoutThemeDefault::animationRepeatIntervalForProgressBar(LayoutProgress*) const
{
return progressAnimationInterval;
}
-double LayoutThemeDefault::animationDurationForProgressBar(RenderProgress* renderProgress) const
+double LayoutThemeDefault::animationDurationForProgressBar(LayoutProgress* renderProgress) const
{
return progressAnimationInterval * progressAnimationFrames * 2; // "2" for back and forth
}
-IntRect LayoutThemeDefault::progressValueRectFor(RenderProgress* renderProgress, const IntRect& rect) const
+IntRect LayoutThemeDefault::progressValueRectFor(LayoutProgress* renderProgress, const IntRect& rect) const
{
return renderProgress->isDeterminate() ? determinateProgressValueRectFor(renderProgress, rect) : indeterminateProgressValueRectFor(renderProgress, rect);
}
« no previous file with comments | « Source/core/layout/LayoutThemeDefault.h ('k') | Source/core/layout/LayoutThemeMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698