Index: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h |
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h |
index f078c02a657b570e851d0aad5a1982ea0f4d0a91..11a38e527cc006345a12db6c6a9532c5cac858d1 100644 |
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h |
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h |
@@ -38,6 +38,7 @@ class CullRect; |
class GraphicsContext; |
class PlatformMouseEvent; |
class ScrollbarThemeClient; |
+class ScrollbarThemePaintParams; |
class PLATFORM_EXPORT ScrollbarTheme { |
WTF_MAKE_NONCOPYABLE(ScrollbarTheme); USING_FAST_MALLOC(ScrollbarTheme); |
@@ -45,6 +46,13 @@ public: |
ScrollbarTheme() { } |
virtual ~ScrollbarTheme() { } |
+ // If true, then scrollbars with this theme will be painted every time |
+ // Scrollbar::setNeedsPaintInvalidation is called. If false, then scrollbar |
+ // thumb and track part painting results will be cached and not repainted |
+ // unless requested by Scrollbar::setThumbNeedsRepaint or |
+ // Scrollbar::setTrackNeedsRepaint. |
+ virtual bool shouldRepaintAllPartsOnInvalidation() const { return true; } |
+ |
virtual void updateEnabledState(const ScrollbarThemeClient*) { } |
virtual bool paint(const ScrollbarThemeClient*, GraphicsContext*, const CullRect&); |
@@ -77,6 +85,8 @@ public: |
virtual int trackPosition(const ScrollbarThemeClient*); |
// The length of the track along the axis of the scrollbar. |
virtual int trackLength(const ScrollbarThemeClient*); |
+ // The opacity to be applied to the thumb. |
+ virtual float thumbOpacity(const ScrollbarThemeClient*) const { return 1.0f; } |
virtual bool hasButtons(const ScrollbarThemeClient*) = 0; |
virtual bool hasThumb(const ScrollbarThemeClient*) = 0; |