Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h

Issue 1591953005: Make ScrollbarThemeAura selectively invalidate scrollbar parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge with master; remove blank line Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 8103c98e391c6a1e83002fc5743cfddfed8ce11d..3b4dd4888df96a43277fb32dc6c3de140db46b65 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
@@ -47,10 +47,8 @@ public:
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.
+ // Scrollbar::setNeedsPaintInvalidation is called. If false, then only parts
+ // which are explicitly invalidated will be repainted.
virtual bool shouldRepaintAllPartsOnInvalidation() const { return true; }
virtual void updateEnabledState(const ScrollbarThemeClient&) { }
@@ -71,6 +69,14 @@ public:
virtual bool invalidateOnMouseEnterExit() { return false; }
virtual bool invalidateOnWindowActiveChange() const { return false; }
+ // Returns parts of the scrollbar which must be repainted following a change
+ // in the thumb position, given scroll positions before and after.
+ virtual ScrollbarPart invalidateOnThumbPositionChange(
+ const ScrollbarThemeClient&, float oldPosition, float newPosition) const
+ {
+ return AllParts;
+ }
+
virtual void paintScrollCorner(GraphicsContext&, const DisplayItemClient&, const IntRect& cornerRect);
virtual void paintTickmarks(GraphicsContext&, const ScrollbarThemeClient&, const IntRect&) { }

Powered by Google App Engine
This is Rietveld 408576698