Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| index b8149222ab70dc5d5adbc6a521ab69610ae1032c..d317a41a3788f77aa610e4bb9aae347c0afec813 100644 |
| --- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| @@ -25,6 +25,7 @@ |
| #include "core/paint/PaintInfo.h" |
| #include "core/paint/PaintLayer.h" |
| #include "core/paint/RoundedInnerRectClipper.h" |
| +#include "core/paint/ScrollRecorder.h" |
| #include "core/paint/ThemePainter.h" |
| #include "platform/LengthFunctions.h" |
| #include "platform/geometry/LayoutPoint.h" |
| @@ -58,11 +59,12 @@ void BoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffse |
| void BoxPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
| { |
| LayoutRect paintRect; |
| + Optional<ScrollRecorder> scrollRecorder; |
|
chrishtr
2016/09/09 21:46:46
*ScrollDisplayItems are never cached, so the cachi
|
| if (isPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer(&m_layoutBox, paintInfo)) { |
| // For the case where we are painting the background into the scrolling contents layer |
| // of a composited scroller we need to include the entire overflow rect. |
| paintRect = m_layoutBox.layoutOverflowRect(); |
| - paintRect.move(-m_layoutBox.scrolledContentOffset()); |
| + scrollRecorder.emplace(paintInfo.context, m_layoutBox, paintInfo.phase, -m_layoutBox.scrolledContentOffset()); |
| // The background painting code assumes that the borders are part of the paintRect so we |
| // expand the paintRect by the border size when painting the background into the |