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

Unified Diff: Source/core/paint/ReplacedPainter.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/ReplacedPainter.cpp
diff --git a/Source/core/paint/ReplacedPainter.cpp b/Source/core/paint/ReplacedPainter.cpp
index 4e01e46b9e8ba5f6bf061b2194494cb8382049fb..13a7bdde4ca6c8a478ba3cbbb87476cde17fca15 100644
--- a/Source/core/paint/ReplacedPainter.cpp
+++ b/Source/core/paint/ReplacedPainter.cpp
@@ -12,6 +12,7 @@
#include "core/paint/ObjectPainter.h"
#include "core/paint/PaintInfo.h"
#include "core/paint/RoundedInnerRectClipper.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -56,7 +57,7 @@ void ReplacedPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint
return;
{
- OwnPtr<RoundedInnerRectClipper> clipper;
+ Optional<RoundedInnerRectClipper> clipper;
bool completelyClippedOut = false;
if (m_layoutReplaced.style()->hasBorderRadius()) {
LayoutRect borderRect = LayoutRect(adjustedPaintOffset, m_layoutReplaced.size());
@@ -73,7 +74,7 @@ void ReplacedPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint
-(m_layoutReplaced.paddingLeft() + m_layoutReplaced.borderLeft())),
true, true);
- clipper = adoptPtr(new RoundedInnerRectClipper(m_layoutReplaced, paintInfo, paintRect, roundedInnerRect, ApplyToDisplayListIfEnabled));
+ clipper.emplace(m_layoutReplaced, paintInfo, paintRect, roundedInnerRect, ApplyToDisplayListIfEnabled);
}
}

Powered by Google App Engine
This is Rietveld 408576698