| Index: Source/core/paint/FileUploadControlPainter.cpp
|
| diff --git a/Source/core/paint/FileUploadControlPainter.cpp b/Source/core/paint/FileUploadControlPainter.cpp
|
| index 34b3031de96de022954b2cb7d4e69470b34ba2d0..66e7d1d60acb21fe4f35c283a477e5924c94811e 100644
|
| --- a/Source/core/paint/FileUploadControlPainter.cpp
|
| +++ b/Source/core/paint/FileUploadControlPainter.cpp
|
| @@ -11,6 +11,7 @@
|
| #include "core/paint/LayoutObjectDrawingRecorder.h"
|
| #include "core/paint/PaintInfo.h"
|
| #include "platform/graphics/paint/ClipRecorder.h"
|
| +#include "wtf/Optional.h"
|
|
|
| namespace blink {
|
|
|
| @@ -22,14 +23,14 @@ void FileUploadControlPainter::paintObject(const PaintInfo& paintInfo, const Lay
|
| return;
|
|
|
| // Push a clip.
|
| - OwnPtr<ClipRecorder> clipRecorder;
|
| + Optional<ClipRecorder> clipRecorder;
|
| if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
|
| IntRect clipRect = enclosingIntRect(LayoutRect(
|
| LayoutPoint(paintOffset.x() + m_layoutFileUploadControl.borderLeft(), paintOffset.y() + m_layoutFileUploadControl.borderTop()),
|
| m_layoutFileUploadControl.size() + LayoutSize(0, -m_layoutFileUploadControl.borderWidth() + buttonShadowHeight)));
|
| if (clipRect.isEmpty())
|
| return;
|
| - clipRecorder = adoptPtr(new ClipRecorder(*paintInfo.context, m_layoutFileUploadControl, DisplayItem::ClipFileUploadControlRect, LayoutRect(clipRect)));
|
| + clipRecorder.emplace(*paintInfo.context, m_layoutFileUploadControl, DisplayItem::ClipFileUploadControlRect, LayoutRect(clipRect));
|
| }
|
|
|
| if (paintInfo.phase == PaintPhaseForeground) {
|
|
|