Index: third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp |
diff --git a/third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp b/third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp |
index 8b63bbffefa025a5c11808b04db7e8dfe09f394b..d4e9828e3db39b0559dccd7e65a06cf045fc30d9 100644 |
--- a/third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp |
+++ b/third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp |
@@ -68,6 +68,8 @@ void WebScrollbarThemePainter::paintTrackBackground(WebCanvas* canvas, const Web |
pictureBuilder.context().setDeviceScaleFactor(m_deviceScaleFactor); |
m_theme->paintTrackBackground(&pictureBuilder.context(), m_scrollbar.get(), intRect); |
pictureBuilder.endRecording()->playback(canvas); |
+ if (!m_theme->shouldRepaintAllPartsOnInvalidation()) |
+ m_scrollbar->setTrackNeedsRepaint(false); |
} |
void WebScrollbarThemePainter::paintBackTrackPart(WebCanvas* canvas, const WebRect& rect) |
@@ -140,6 +142,8 @@ void WebScrollbarThemePainter::paintThumb(WebCanvas* canvas, const WebRect& rect |
pictureBuilder.context().setDeviceScaleFactor(m_deviceScaleFactor); |
m_theme->paintThumb(&pictureBuilder.context(), m_scrollbar.get(), intRect); |
pictureBuilder.endRecording()->playback(canvas); |
+ if (!m_theme->shouldRepaintAllPartsOnInvalidation()) |
+ m_scrollbar->setThumbNeedsRepaint(false); |
} |
WebScrollbarThemePainter::WebScrollbarThemePainter(ScrollbarTheme* theme, Scrollbar* scrollbar, float deviceScaleFactor) |
@@ -149,4 +153,19 @@ WebScrollbarThemePainter::WebScrollbarThemePainter(ScrollbarTheme* theme, Scroll |
{ |
} |
+float WebScrollbarThemePainter::thumbOpacity() const |
+{ |
+ return m_theme->thumbOpacity(m_scrollbar.get()); |
+} |
+ |
+bool WebScrollbarThemePainter::trackNeedsRepaint() const |
+{ |
+ return m_scrollbar->trackNeedsRepaint(); |
+} |
+ |
+bool WebScrollbarThemePainter::thumbNeedsRepaint() const |
+{ |
+ return m_scrollbar->thumbNeedsRepaint(); |
+} |
+ |
} // namespace blink |