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

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

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
index 1b86c474a95c10e9d90eb9250183cd5ff7e15404..fd9970a15621e85d29b885d7b9e72c8ed9ba7acb 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
@@ -244,19 +244,14 @@ void ScrollableArea::scrollPositionChanged(const DoublePoint& position, ScrollTy
// Tell the derived class to scroll its contents.
setScrollOffset(truncatedPosition, scrollType);
- Scrollbar* verticalScrollbar = this->verticalScrollbar();
-
// Tell the scrollbars to update their thumb postions.
- if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {
+ // If the scrollbar does not have its own layer, it must always be
+ // invalidated to reflect the new thumb position, even if the theme did not
+ // invalidate any individual part.
+ if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar())
horizontalScrollbar->offsetDidChange();
- if (horizontalScrollbar->isOverlayScrollbar() && !hasLayerForHorizontalScrollbar())
- setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
- }
- if (verticalScrollbar) {
+ if (Scrollbar* verticalScrollbar = this->verticalScrollbar())
verticalScrollbar->offsetDidChange();
- if (verticalScrollbar->isOverlayScrollbar() && !hasLayerForVerticalScrollbar())
- setScrollbarNeedsPaintInvalidation(VerticalScrollbar);
- }
if (scrollPositionDouble() != oldPosition) {
// FIXME: Pass in DoubleSize. crbug.com/414283.
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698