| Index: Source/core/paint/BlockPainter.cpp
|
| diff --git a/Source/core/paint/BlockPainter.cpp b/Source/core/paint/BlockPainter.cpp
|
| index 7bc94c78b5977bf5b2a4045cf9bf85dc39ecbd4b..3a67ec06232e0d334143902275ba0820194f3baa 100644
|
| --- a/Source/core/paint/BlockPainter.cpp
|
| +++ b/Source/core/paint/BlockPainter.cpp
|
| @@ -21,6 +21,7 @@
|
| #include "core/paint/ScrollRecorder.h"
|
| #include "core/paint/ScrollableAreaPainter.h"
|
| #include "platform/graphics/paint/ClipRecorder.h"
|
| +#include "wtf/Optional.h"
|
|
|
| namespace blink {
|
|
|
| @@ -186,11 +187,11 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa
|
|
|
| {
|
| PaintInfo scrolledPaintInfo(paintInfo);
|
| - OwnPtr<ScrollRecorder> scrollRecorder;
|
| + Optional<ScrollRecorder> scrollRecorder;
|
| if (m_layoutBlock.hasOverflowClip()) {
|
| IntSize scrollOffset = m_layoutBlock.scrolledContentOffset();
|
| if (m_layoutBlock.layer()->scrollsOverflow() || !scrollOffset.isZero()) {
|
| - scrollRecorder = adoptPtr(new ScrollRecorder(*paintInfo.context, m_layoutBlock, paintPhase, scrollOffset));
|
| + scrollRecorder.emplace(*paintInfo.context, m_layoutBlock, paintPhase, scrollOffset);
|
| scrolledPaintInfo.rect.move(scrollOffset);
|
| }
|
| }
|
|
|