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

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

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.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
index 19538b25345adfea775bd2084f30f5c464d38b67..5f3bccc901a81f5b4aed22b7e8d365cce0fa82c6 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -61,6 +61,8 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
, m_overlapsResizer(false)
, m_isAlphaLocked(false)
, m_elasticOverscroll(0)
+ , m_needsPaintTrack(true)
+ , m_needsPaintThumb(true)
{
if (!m_theme)
m_theme = ScrollbarTheme::theme();
@@ -541,6 +543,10 @@ float Scrollbar::scrollableAreaCurrentPos() const
void Scrollbar::setNeedsPaintInvalidation()
{
+ if (m_theme->shouldRepaintAllPartsOnInvalidation()) {
+ m_needsPaintTrack = true;
+ m_needsPaintThumb = true;
+ }
if (m_scrollableArea)
m_scrollableArea->setScrollbarNeedsPaintInvalidation(this);
}

Powered by Google App Engine
This is Rietveld 408576698