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

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

Issue 1458703010: Mac: Don't repaint scrollbars every frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master2
Patch Set: Sprinkle in some tests Created 5 years, 1 month 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/Scrollbar.h
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.h b/third_party/WebKit/Source/platform/scroll/Scrollbar.h
index 0ec1b88e8a8197190e3287423addafd2e9c8618f..8c1aae570c79398ef827084e3c120d9a8eb39761 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.h
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.h
@@ -140,6 +140,11 @@ public:
float elasticOverscroll() const override { return m_elasticOverscroll; }
void setElasticOverscroll(float elasticOverscroll) override { m_elasticOverscroll = elasticOverscroll; }
+ bool needsPaintTrack() const override { return m_needsPaintTrack; }
+ void setNeedsPaintTrack(bool needsPaintTrack) override { m_needsPaintTrack = needsPaintTrack; }
+ bool needsPaintThumb() const override { return m_needsPaintThumb; }
+ void setNeedsPaintThumb(bool needsPaintThumb) override { m_needsPaintThumb = needsPaintThumb; }
+
bool overlapsResizer() const { return m_overlapsResizer; }
void setOverlapsResizer(bool overlapsResizer) { m_overlapsResizer = overlapsResizer; }
@@ -202,6 +207,9 @@ private:
void invalidateRect(const IntRect&) override { setNeedsPaintInvalidation(); }
float scrollableAreaCurrentPos() const;
+
+ bool m_needsPaintTrack;
+ bool m_needsPaintThumb;
};
DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScrollbar());

Powered by Google App Engine
This is Rietveld 408576698