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(m_hasThumb
);
16 int FakeWebScrollbarThemeGeometry::thumbPosition(WebKit::WebScrollbar
*) {
22 int FakeWebScrollbarThemeGeometry::thumbLength(WebKit::WebScrollbar
*) {
28 int FakeWebScrollbarThemeGeometry::trackPosition(WebKit::WebScrollbar
*) {
32 int FakeWebScrollbarThemeGeometry::trackLength(WebKit::WebScrollbar
*) {
36 bool FakeWebScrollbarThemeGeometry::hasButtons(WebKit::WebScrollbar
*) {
40 bool FakeWebScrollbarThemeGeometry::hasThumb(WebKit::WebScrollbar
*) {
44 WebRect
FakeWebScrollbarThemeGeometry::trackRect(WebKit::WebScrollbar
*) {
45 return WebRect(0, 0, 10, 10);
48 WebRect
FakeWebScrollbarThemeGeometry::thumbRect(WebKit::WebScrollbar
*) {
50 return WebRect(0, 0, 0, 0);
51 return WebRect(0, 5, 5, 2);
54 int FakeWebScrollbarThemeGeometry::minimumThumbLength(WebKit::WebScrollbar
*) {
58 int FakeWebScrollbarThemeGeometry::scrollbarThickness(WebKit::WebScrollbar
*) {
62 WebRect
FakeWebScrollbarThemeGeometry::backButtonStartRect(
63 WebKit::WebScrollbar
*) {
67 WebRect
FakeWebScrollbarThemeGeometry::backButtonEndRect(
68 WebKit::WebScrollbar
*) {
72 WebRect
FakeWebScrollbarThemeGeometry::forwardButtonStartRect(
73 WebKit::WebScrollbar
*) {
77 WebRect
FakeWebScrollbarThemeGeometry::forwardButtonEndRect(
78 WebKit::WebScrollbar
*) {
82 WebRect
FakeWebScrollbarThemeGeometry::constrainTrackRectToTrackPieces(
83 WebKit::WebScrollbar
*,
88 void FakeWebScrollbarThemeGeometry::splitTrack(
89 WebKit::WebScrollbar
*,
95 thumb
= WebRect(0, 0, 0, 0);
96 startTrack
= WebRect(0, 0, 10, 10);
97 endTrack
= WebRect(0, 10, 10, 0);
99 thumb
= WebRect(0, 5, 5, 2);
100 startTrack
= WebRect(0, 5, 0, 5);
101 endTrack
= WebRect(0, 0, 0, 5);