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

Unified Diff: Source/core/paint/ScrollableAreaPainter.cpp

Issue 1142283006: [SP] Always paint whole non-custom scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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: Source/core/paint/ScrollableAreaPainter.cpp
diff --git a/Source/core/paint/ScrollableAreaPainter.cpp b/Source/core/paint/ScrollableAreaPainter.cpp
index fc21720eea45172f2d09c3e70f013c14e44475c7..d2ba3197894c23924ebd5bc7699fa46b04b245f5 100644
--- a/Source/core/paint/ScrollableAreaPainter.cpp
+++ b/Source/core/paint/ScrollableAreaPainter.cpp
@@ -168,22 +168,27 @@ void ScrollableAreaPainter::paintScrollCorner(GraphicsContext* context, const In
{
IntRect absRect = m_scrollableArea.scrollCornerRect();
absRect.moveBy(paintOffset);
- if (!absRect.intersects(damageRect))
- return;
if (m_scrollableArea.scrollCorner()) {
+ if (!absRect.intersects(damageRect))
+ return;
ScrollbarPainter::paintIntoRect(m_scrollableArea.scrollCorner(), context, paintOffset, LayoutRect(absRect));
return;
}
- DrawingRecorder recorder(*context, m_scrollableArea.box(), DisplayItem::ScrollbarCorner, absRect);
- if (recorder.canUseCachedDrawing())
+ if (!RuntimeEnabledFeatures::slimmingPaintEnabled() && !absRect.intersects(damageRect))
return;
// We don't want to paint white if we have overlay scrollbars, since we need
// to see what is behind it.
- if (!m_scrollableArea.hasOverlayScrollbars())
- context->fillRect(absRect, Color::white);
+ if (m_scrollableArea.hasOverlayScrollbars())
+ return;
+
+ DrawingRecorder recorder(*context, m_scrollableArea.box(), DisplayItem::ScrollbarCorner, absRect);
+ if (recorder.canUseCachedDrawing())
+ return;
+
+ context->fillRect(absRect, Color::white);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698