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

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

Issue 1129793005: Replace OwnPtr with WTF::Optional for optional recorders. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge with master 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/PartPainter.cpp
diff --git a/Source/core/paint/PartPainter.cpp b/Source/core/paint/PartPainter.cpp
index 2e0c2ed63ad95fab2d2712e274e5db36eb1b0e59..4710e9121f9619bf971a2b23b825052d6188cf02 100644
--- a/Source/core/paint/PartPainter.cpp
+++ b/Source/core/paint/PartPainter.cpp
@@ -13,6 +13,7 @@
#include "core/paint/RoundedInnerRectClipper.h"
#include "core/paint/ScrollableAreaPainter.h"
#include "core/paint/TransformRecorder.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -42,7 +43,7 @@ void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
return;
{
- OwnPtr<RoundedInnerRectClipper> clipper;
+ Optional<RoundedInnerRectClipper> clipper;
if (m_layoutPart.style()->hasBorderRadius()) {
if (borderRect.isEmpty())
return;
@@ -54,7 +55,7 @@ void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
-(m_layoutPart.paddingBottom() + m_layoutPart.borderBottom()),
-(m_layoutPart.paddingLeft() + m_layoutPart.borderLeft())),
true, true);
- clipper = adoptPtr(new RoundedInnerRectClipper(m_layoutPart, paintInfo, borderRect, roundedInnerRect, ApplyToDisplayListIfEnabled));
+ clipper.emplace(m_layoutPart, paintInfo, borderRect, roundedInnerRect, ApplyToDisplayListIfEnabled);
}
if (m_layoutPart.widget())

Powered by Google App Engine
This is Rietveld 408576698