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

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

Issue 951453003: Rename rendering/RenderScrollbar* to layout/LayoutScrollbar* (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/LayoutScrollbarTheme.h ('k') | Source/core/paint/ScrollbarPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutScrollbarTheme.cpp
diff --git a/Source/core/rendering/RenderScrollbarTheme.cpp b/Source/core/layout/LayoutScrollbarTheme.cpp
similarity index 70%
rename from Source/core/rendering/RenderScrollbarTheme.cpp
rename to Source/core/layout/LayoutScrollbarTheme.cpp
index 7804727da731d97dbb281eb7f31b5fab61050b82..4b43379496badb512d6e3f27d4ed131ad6dcf3fb 100644
--- a/Source/core/rendering/RenderScrollbarTheme.cpp
+++ b/Source/core/layout/LayoutScrollbarTheme.cpp
@@ -24,10 +24,10 @@
*/
#include "config.h"
-#include "core/rendering/RenderScrollbarTheme.h"
+#include "core/layout/LayoutScrollbarTheme.h"
+#include "core/layout/LayoutScrollbar.h"
#include "core/paint/ScrollbarPainter.h"
-#include "core/rendering/RenderScrollbar.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/paint/DrawingRecorder.h"
#include "platform/scroll/ScrollbarThemeClient.h"
@@ -35,13 +35,13 @@
namespace blink {
-RenderScrollbarTheme* RenderScrollbarTheme::renderScrollbarTheme()
+LayoutScrollbarTheme* LayoutScrollbarTheme::renderScrollbarTheme()
{
- DEFINE_STATIC_LOCAL(RenderScrollbarTheme, theme, ());
+ DEFINE_STATIC_LOCAL(LayoutScrollbarTheme, theme, ());
return &theme;
}
-void RenderScrollbarTheme::buttonSizesAlongTrackAxis(ScrollbarThemeClient* scrollbar, int& beforeSize, int& afterSize)
+void LayoutScrollbarTheme::buttonSizesAlongTrackAxis(ScrollbarThemeClient* scrollbar, int& beforeSize, int& afterSize)
{
IntRect firstButton = backButtonRect(scrollbar, BackButtonStartPart);
IntRect secondButton = forwardButtonRect(scrollbar, ForwardButtonStartPart);
@@ -56,7 +56,7 @@ void RenderScrollbarTheme::buttonSizesAlongTrackAxis(ScrollbarThemeClient* scrol
}
}
-bool RenderScrollbarTheme::hasButtons(ScrollbarThemeClient* scrollbar)
+bool LayoutScrollbarTheme::hasButtons(ScrollbarThemeClient* scrollbar)
{
int startSize;
int endSize;
@@ -64,27 +64,27 @@ bool RenderScrollbarTheme::hasButtons(ScrollbarThemeClient* scrollbar)
return (startSize + endSize) <= (scrollbar->orientation() == HorizontalScrollbar ? scrollbar->width() : scrollbar->height());
}
-bool RenderScrollbarTheme::hasThumb(ScrollbarThemeClient* scrollbar)
+bool LayoutScrollbarTheme::hasThumb(ScrollbarThemeClient* scrollbar)
{
return trackLength(scrollbar) - thumbLength(scrollbar) >= 0;
}
-int RenderScrollbarTheme::minimumThumbLength(ScrollbarThemeClient* scrollbar)
+int LayoutScrollbarTheme::minimumThumbLength(ScrollbarThemeClient* scrollbar)
{
- return toRenderScrollbar(scrollbar)->minimumThumbLength();
+ return toLayoutScrollbar(scrollbar)->minimumThumbLength();
}
-IntRect RenderScrollbarTheme::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart partType, bool)
+IntRect LayoutScrollbarTheme::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart partType, bool)
{
- return toRenderScrollbar(scrollbar)->buttonRect(partType);
+ return toLayoutScrollbar(scrollbar)->buttonRect(partType);
}
-IntRect RenderScrollbarTheme::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart partType, bool)
+IntRect LayoutScrollbarTheme::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart partType, bool)
{
- return toRenderScrollbar(scrollbar)->buttonRect(partType);
+ return toLayoutScrollbar(scrollbar)->buttonRect(partType);
}
-IntRect RenderScrollbarTheme::trackRect(ScrollbarThemeClient* scrollbar, bool)
+IntRect LayoutScrollbarTheme::trackRect(ScrollbarThemeClient* scrollbar, bool)
{
if (!hasButtons(scrollbar))
return scrollbar->frameRect();
@@ -93,13 +93,13 @@ IntRect RenderScrollbarTheme::trackRect(ScrollbarThemeClient* scrollbar, bool)
int endLength;
buttonSizesAlongTrackAxis(scrollbar, startLength, endLength);
- return toRenderScrollbar(scrollbar)->trackRect(startLength, endLength);
+ return toLayoutScrollbar(scrollbar)->trackRect(startLength, endLength);
}
-IntRect RenderScrollbarTheme::constrainTrackRectToTrackPieces(ScrollbarThemeClient* scrollbar, const IntRect& rect)
+IntRect LayoutScrollbarTheme::constrainTrackRectToTrackPieces(ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
- IntRect backRect = toRenderScrollbar(scrollbar)->trackPieceRectWithMargins(BackTrackPart, rect);
- IntRect forwardRect = toRenderScrollbar(scrollbar)->trackPieceRectWithMargins(ForwardTrackPart, rect);
+ IntRect backRect = toLayoutScrollbar(scrollbar)->trackPieceRectWithMargins(BackTrackPart, rect);
+ IntRect forwardRect = toLayoutScrollbar(scrollbar)->trackPieceRectWithMargins(ForwardTrackPart, rect);
IntRect result = rect;
if (scrollbar->orientation() == HorizontalScrollbar) {
result.setX(backRect.x());
@@ -111,12 +111,12 @@ IntRect RenderScrollbarTheme::constrainTrackRectToTrackPieces(ScrollbarThemeClie
return result;
}
-bool RenderScrollbarTheme::paint(ScrollbarThemeClient* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect)
+bool LayoutScrollbarTheme::paint(ScrollbarThemeClient* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect)
{
return paintInternal(scrollbar, graphicsContext, damageRect);
}
-void RenderScrollbarTheme::paintScrollCorner(GraphicsContext* context, DisplayItemClient displayItemClient, const IntRect& cornerRect)
+void LayoutScrollbarTheme::paintScrollCorner(GraphicsContext* context, DisplayItemClient displayItemClient, const IntRect& cornerRect)
{
DrawingRecorder recorder(context, displayItemClient, DisplayItem::ScrollbarCorner, cornerRect);
// FIXME: Implement.
@@ -124,32 +124,32 @@ void RenderScrollbarTheme::paintScrollCorner(GraphicsContext* context, DisplayIt
context->fillRect(cornerRect, Color::white);
}
-void RenderScrollbarTheme::paintScrollbarBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar)
+void LayoutScrollbarTheme::paintScrollbarBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar)
{
- ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, ScrollbarBGPart, scrollbar->frameRect());
+ ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, ScrollbarBGPart, scrollbar->frameRect());
}
-void RenderScrollbarTheme::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void LayoutScrollbarTheme::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
- ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, TrackBGPart, rect);
+ ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, TrackBGPart, rect);
}
-void RenderScrollbarTheme::paintTrackPiece(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
+void LayoutScrollbarTheme::paintTrackPiece(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
{
- ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, part, rect);
+ ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, part, rect);
}
-void RenderScrollbarTheme::paintButton(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
+void LayoutScrollbarTheme::paintButton(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
{
- ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, part, rect);
+ ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, part, rect);
}
-void RenderScrollbarTheme::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void LayoutScrollbarTheme::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
- ScrollbarPainter(*toRenderScrollbar(scrollbar)).paintPart(context, ThumbPart, rect);
+ ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, ThumbPart, rect);
}
-void RenderScrollbarTheme::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void LayoutScrollbarTheme::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
DrawingRecorder recorder(context, scrollbar->displayItemClient(), DisplayItem::ScrollbarTickMark, rect);
if (!recorder.canUseCachedDrawing())
« no previous file with comments | « Source/core/layout/LayoutScrollbarTheme.h ('k') | Source/core/paint/ScrollbarPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698