Chromium Code Reviews| Index: Source/core/paint/ScrollableAreaPainter.cpp |
| diff --git a/Source/core/paint/ScrollableAreaPainter.cpp b/Source/core/paint/ScrollableAreaPainter.cpp |
| index d2ba3197894c23924ebd5bc7699fa46b04b245f5..6cfb3fbaa93a7def7c1457e78ffe77ba658b707c 100644 |
| --- a/Source/core/paint/ScrollableAreaPainter.cpp |
| +++ b/Source/core/paint/ScrollableAreaPainter.cpp |
| @@ -23,15 +23,20 @@ void ScrollableAreaPainter::paintResizer(GraphicsContext* context, const IntPoin |
| return; |
| IntRect absRect = m_scrollableArea.resizerCornerRect(m_scrollableArea.box().pixelSnappedBorderBoxRect(), ResizerForPointer); |
| - absRect.moveBy(paintOffset); |
| - if (!absRect.intersects(damageRect)) |
| + if (absRect.isEmpty()) |
| return; |
| + absRect.moveBy(paintOffset); |
| if (m_scrollableArea.resizer()) { |
| + if (!absRect.intersects(damageRect)) |
|
chrishtr
2015/06/05 22:50:09
Why is this ok? I thought we had to paint all or n
Xianzhu
2015/06/05 22:56:54
We paint all or none for non-custom parts. For cus
chrishtr
2015/06/05 22:59:11
OK, then...
|
| + return; |
| ScrollbarPainter::paintIntoRect(m_scrollableArea.resizer(), context, paintOffset, LayoutRect(absRect)); |
| return; |
| } |
| + if (!RuntimeEnabledFeatures::slimmingPaintEnabled() && !absRect.intersects(damageRect)) |
|
chrishtr
2015/06/05 22:59:11
Why condition on slimming paint here?
Xianzhu
2015/06/05 23:04:41
This is the non-custom path. In slimming paint mod
|
| + return; |
| + |
| DrawingRecorder recorder(*context, m_scrollableArea.box(), DisplayItem::Resizer, absRect); |
| if (recorder.canUseCachedDrawing()) |
| return; |
| @@ -167,6 +172,8 @@ bool ScrollableAreaPainter::overflowControlsIntersectRect(const IntRect& localRe |
| void ScrollableAreaPainter::paintScrollCorner(GraphicsContext* context, const IntPoint& paintOffset, const IntRect& damageRect) |
| { |
| IntRect absRect = m_scrollableArea.scrollCornerRect(); |
| + if (absRect.isEmpty()) |
| + return; |
| absRect.moveBy(paintOffset); |
| if (m_scrollableArea.scrollCorner()) { |