1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/test/fake_web_scrollbar_theme_geometry.h"
11 WebKit::WebScrollbarThemeGeometry
*
12 FakeWebScrollbarThemeGeometry::clone() const {
13 return new FakeWebScrollbarThemeGeometry(has_thumb_
);
16 int FakeWebScrollbarThemeGeometry::thumbPosition(
17 WebKit::WebScrollbar
* scrollbar
) {
23 int FakeWebScrollbarThemeGeometry::thumbLength(
24 WebKit::WebScrollbar
* scrollbar
) {
30 int FakeWebScrollbarThemeGeometry::trackPosition(
31 WebKit::WebScrollbar
* scrollbar
) {
35 int FakeWebScrollbarThemeGeometry::trackLength(
36 WebKit::WebScrollbar
* scrollbar
) {
40 bool FakeWebScrollbarThemeGeometry::hasButtons(
41 WebKit::WebScrollbar
* scrollbar
) {
45 bool FakeWebScrollbarThemeGeometry::hasThumb(WebKit::WebScrollbar
* scrollbar
) {
49 WebRect
FakeWebScrollbarThemeGeometry::trackRect(
50 WebKit::WebScrollbar
* scrollbar
) {
51 return WebRect(0, 0, 10, 10);
54 WebRect
FakeWebScrollbarThemeGeometry::thumbRect(
55 WebKit::WebScrollbar
* scrollbar
) {
57 return WebRect(0, 0, 0, 0);
58 return WebRect(0, 5, 5, 2);
61 int FakeWebScrollbarThemeGeometry::minimumThumbLength(
62 WebKit::WebScrollbar
* scrollbar
) {
66 int FakeWebScrollbarThemeGeometry::scrollbarThickness(
67 WebKit::WebScrollbar
* scrollbar
) {
71 WebRect
FakeWebScrollbarThemeGeometry::backButtonStartRect(
72 WebKit::WebScrollbar
* scrollbar
) {
76 WebRect
FakeWebScrollbarThemeGeometry::backButtonEndRect(
77 WebKit::WebScrollbar
* scrollbar
) {
81 WebRect
FakeWebScrollbarThemeGeometry::forwardButtonStartRect(
82 WebKit::WebScrollbar
* scrollbar
) {
86 WebRect
FakeWebScrollbarThemeGeometry::forwardButtonEndRect(
87 WebKit::WebScrollbar
* scrollbar
) {
91 WebRect
FakeWebScrollbarThemeGeometry::constrainTrackRectToTrackPieces(
92 WebKit::WebScrollbar
* scrollbar
,
93 const WebRect
& rect
) {
97 void FakeWebScrollbarThemeGeometry::splitTrack(WebKit::WebScrollbar
* scrollbar
,
101 WebRect
& end_track
) {
103 thumb
= WebRect(0, 0, 0, 0);
104 start_track
= WebRect(0, 0, 10, 10);
105 end_track
= WebRect(0, 10, 10, 0);
107 thumb
= WebRect(0, 5, 5, 2);
108 start_track
= WebRect(0, 5, 0, 5);
109 end_track
= WebRect(0, 0, 0, 5);