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

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

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 d97cfd6ca2e8502002fd9923cd507415c0f1458e..7672bf9a0fcd3081a3a4eff4d820bab6047a2b27 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -29,6 +29,7 @@
#include <algorithm>
#include "platform/PlatformGestureEvent.h"
#include "platform/PlatformMouseEvent.h"
+#include "platform/graphics/paint/CullRect.h"
#include "platform/scroll/ScrollAnimator.h"
#include "platform/scroll/ScrollableArea.h"
#include "platform/scroll/ScrollbarTheme.h"
@@ -176,13 +177,13 @@ void Scrollbar::updateThumbProportion()
updateThumb();
}
-void Scrollbar::paint(GraphicsContext* context, const IntRect& damageRect) const
+void Scrollbar::paint(GraphicsContext* context, const CullRect& cullRect) const
{
- if (!frameRect().intersects(damageRect))
+ if (!cullRect.intersectsCullRect(frameRect()))
return;
- if (!theme()->paint(this, context, damageRect))
- Widget::paint(context, damageRect);
+ if (!theme()->paint(this, context, cullRect))
+ Widget::paint(context, cullRect);
}
void Scrollbar::autoscrollTimerFired(Timer<Scrollbar>*)
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698