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

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

Issue 1456953003: Revert of Calculate paint invalidation rect for scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/ScrollbarTheme.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
index 601dc30aa70d2280b0bbfe66cb227aa844199924..9a1b08e5f1e06dd64991235e9f8b697a7a429875 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
@@ -170,6 +170,46 @@
return result;
}
+void ScrollbarTheme::invalidatePart(ScrollbarThemeClient* scrollbar, ScrollbarPart part)
+{
+ if (part == NoPart)
+ return;
+
+ IntRect result;
+ switch (part) {
+ case BackButtonStartPart:
+ result = backButtonRect(scrollbar, BackButtonStartPart, true);
+ break;
+ case BackButtonEndPart:
+ result = backButtonRect(scrollbar, BackButtonEndPart, true);
+ break;
+ case ForwardButtonStartPart:
+ result = forwardButtonRect(scrollbar, ForwardButtonStartPart, true);
+ break;
+ case ForwardButtonEndPart:
+ result = forwardButtonRect(scrollbar, ForwardButtonEndPart, true);
+ break;
+ case TrackBGPart:
+ result = trackRect(scrollbar, true);
+ break;
+ case ScrollbarBGPart:
+ result = scrollbar->frameRect();
+ break;
+ default: {
+ IntRect beforeThumbRect, thumbRect, afterThumbRect;
+ splitTrack(scrollbar, trackRect(scrollbar), beforeThumbRect, thumbRect, afterThumbRect);
+ if (part == BackTrackPart)
+ result = beforeThumbRect;
+ else if (part == ForwardTrackPart)
+ result = afterThumbRect;
+ else
+ result = thumbRect;
+ }
+ }
+ result.moveBy(-scrollbar->location());
+ scrollbar->invalidateRect(result);
+}
+
void ScrollbarTheme::paintScrollCorner(GraphicsContext* context, const DisplayItemClientWrapper& displayItemClient, const IntRect& cornerRect)
{
if (cornerRect.isEmpty())
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h ('k') | third_party/WebKit/Source/web/tests/ScrollAnimatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698