diff options
Diffstat (limited to 'WebCore/platform/chromium/ScrollbarThemeChromium.cpp')
-rw-r--r-- | WebCore/platform/chromium/ScrollbarThemeChromium.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/platform/chromium/ScrollbarThemeChromium.cpp b/WebCore/platform/chromium/ScrollbarThemeChromium.cpp index de40572..426a078 100644 --- a/WebCore/platform/chromium/ScrollbarThemeChromium.cpp +++ b/WebCore/platform/chromium/ScrollbarThemeChromium.cpp @@ -96,7 +96,7 @@ IntRect ScrollbarThemeChromium::forwardButtonRect(Scrollbar* scrollbar, Scrollba IntRect ScrollbarThemeChromium::trackRect(Scrollbar* scrollbar, bool) { IntSize bs = buttonSize(scrollbar); - int thickness = scrollbarThickness(); + int thickness = scrollbarThickness(scrollbar->controlSize()); if (scrollbar->orientation() == HorizontalScrollbar) { if (scrollbar->width() < 2 * thickness) return IntRect(); @@ -167,26 +167,26 @@ bool ScrollbarThemeChromium::shouldCenterOnThumb(Scrollbar*, const PlatformMouse IntSize ScrollbarThemeChromium::buttonSize(Scrollbar* scrollbar) { +#if defined(__linux__) + // On Linux, we don't use buttons + return IntSize(0, 0); +#endif + // Our desired rect is essentially thickness by thickness. // Our actual rect will shrink to half the available space when we have < 2 // times thickness pixels left. This allows the scrollbar to scale down // and function even at tiny sizes. - int thickness = scrollbarThickness(); + int thickness = scrollbarThickness(scrollbar->controlSize()); -#if !defined(__linux__) // In layout test mode, we force the button "girth" (i.e., the length of // the button along the axis of the scrollbar) to be a fixed size. // FIXME: This is retarded! scrollbarThickness is already fixed in layout // test mode so that should be enough to result in repeatable results, but // preserving this hack avoids having to rebaseline pixel tests. const int kLayoutTestModeGirth = 17; - int girth = ChromiumBridge::layoutTestMode() ? kLayoutTestModeGirth : thickness; -#else - int girth = thickness; -#endif if (scrollbar->orientation() == HorizontalScrollbar) { int width = scrollbar->width() < 2 * girth ? scrollbar->width() / 2 : girth; |