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

Unified Diff: Source/core/rendering/RenderScrollbarTheme.cpp

Issue 613503002: Move paint code for RenderScrollbar and RenderScrollbarPart into ScrollbarPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/rendering/RenderScrollbarPart.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderScrollbarTheme.cpp
diff --git a/Source/core/rendering/RenderScrollbarTheme.cpp b/Source/core/rendering/RenderScrollbarTheme.cpp
index 37947174c830086ef286e14b4ad74a1ba01f3ae1..cf465bc3b96105c819ec12e27f3ef79da9b1e22e 100644
--- a/Source/core/rendering/RenderScrollbarTheme.cpp
+++ b/Source/core/rendering/RenderScrollbarTheme.cpp
@@ -24,8 +24,10 @@
*/
#include "config.h"
-#include "core/rendering/RenderScrollbar.h"
#include "core/rendering/RenderScrollbarTheme.h"
+
+#include "core/paint/ScrollbarPainter.h"
+#include "core/rendering/RenderScrollbar.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/scroll/ScrollbarThemeClient.h"
#include "wtf/StdLibExtras.h"
@@ -116,27 +118,27 @@ void RenderScrollbarTheme::paintScrollCorner(GraphicsContext* context, const Int
void RenderScrollbarTheme::paintScrollbarBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar)
{
- toRenderScrollbar(scrollbar)->paintPart(context, ScrollbarBGPart, scrollbar->frameRect());
+ ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, ScrollbarBGPart, scrollbar->frameRect());
}
void RenderScrollbarTheme::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
- toRenderScrollbar(scrollbar)->paintPart(context, TrackBGPart, rect);
+ ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, TrackBGPart, rect);
}
void RenderScrollbarTheme::paintTrackPiece(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
{
- toRenderScrollbar(scrollbar)->paintPart(context, part, rect);
+ ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, part, rect);
}
void RenderScrollbarTheme::paintButton(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
{
- toRenderScrollbar(scrollbar)->paintPart(context, part, rect);
+ ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, part, rect);
}
void RenderScrollbarTheme::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
- toRenderScrollbar(scrollbar)->paintPart(context, ThumbPart, rect);
+ ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, ThumbPart, rect);
}
void RenderScrollbarTheme::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
« no previous file with comments | « Source/core/rendering/RenderScrollbarPart.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698