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..bce24a9854f996252eff5d7321d923ada75e0775 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::setNeedsPaintThumb or |
+ // Scrollbar::setNeedsPaintTrack. |
+ virtual bool shouldRepaintAllPartsOnInvalidation() const { return true; } |
+ |
virtual void updateEnabledState(const ScrollbarThemeClient*) { } |
virtual bool paint(const ScrollbarThemeClient*, GraphicsContext*, const CullRect&); |
@@ -77,6 +85,10 @@ public: |
virtual int trackPosition(const ScrollbarThemeClient*); |
// The length of the track along the axis of the scrollbar. |
virtual int trackLength(const ScrollbarThemeClient*); |
+ // The opacity of the thumb (only non-opaque for Mac overlay scrollbars). |
chrishtr
2015/11/23 18:59:42
Don't specify Mac-specific semantics.
ccameron
2015/11/24 01:12:05
Removed (I'd prefer to say specify the use, at lea
|
+ virtual float thumbOpacity(const ScrollbarThemeClient*) const { return 1.0f; } |
chrishtr
2015/11/23 18:59:42
How is the client supposed to know whether the opa
ccameron
2015/11/24 01:12:05
Opacity is always taken into account when re-drawi
chrishtr
2015/11/24 19:02:07
What I mean is: what is the correct way to interpr
|
+ // The opacity of the track (only non-opaque for Mac overlay scrollbars). |
+ virtual float trackOpacity(const ScrollbarThemeClient*) const { return 1.0f; } |
virtual bool hasButtons(const ScrollbarThemeClient*) = 0; |
virtual bool hasThumb(const ScrollbarThemeClient*) = 0; |