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

Unified Diff: third_party/WebKit/Source/core/paint/ScrollableAreaPainter.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/core/paint/ScrollableAreaPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp b/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp
index bd4e107f1a7b5ae5ed9895117dcbe465ab86533d..8b62703b457138f2882ac74ceaf50561467b90de 100644
--- a/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp
@@ -95,9 +95,6 @@ void ScrollableAreaPainter::paintOverflowControls(GraphicsContext* context, cons
if (paintingOverlayControls)
adjustedPaintOffset = scrollableArea().cachedOverlayScrollbarOffset();
- IntRect localDamageRect = cullRect.m_rect;
- localDamageRect.moveBy(-adjustedPaintOffset);
-
CullRect adjustedCullRect(cullRect, -adjustedPaintOffset);
// Overlay scrollbars paint in a second pass through the layer tree so that they will paint
@@ -131,11 +128,11 @@ void ScrollableAreaPainter::paintOverflowControls(GraphicsContext* context, cons
{
if (scrollableArea().horizontalScrollbar() && !scrollableArea().layerForHorizontalScrollbar()) {
TransformRecorder translateRecorder(*context, *scrollableArea().horizontalScrollbar(), AffineTransform::translation(adjustedPaintOffset.x(), adjustedPaintOffset.y()));
- scrollableArea().horizontalScrollbar()->paint(context, localDamageRect);
+ scrollableArea().horizontalScrollbar()->paint(context, adjustedCullRect);
}
if (scrollableArea().verticalScrollbar() && !scrollableArea().layerForVerticalScrollbar()) {
TransformRecorder translateRecorder(*context, *scrollableArea().verticalScrollbar(), AffineTransform::translation(adjustedPaintOffset.x(), adjustedPaintOffset.y()));
- scrollableArea().verticalScrollbar()->paint(context, localDamageRect);
+ scrollableArea().verticalScrollbar()->paint(context, adjustedCullRect);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PartPainter.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698