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

Unified Diff: Source/core/paint/SVGForeignObjectPainter.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/SVGForeignObjectPainter.cpp
diff --git a/Source/core/paint/SVGForeignObjectPainter.cpp b/Source/core/paint/SVGForeignObjectPainter.cpp
index a96044d6d8cab291454f61636b6c0d82f5e315a7..25c5c71c1bf0bba1dff7a8873be1fc18b1684bce 100644
--- a/Source/core/paint/SVGForeignObjectPainter.cpp
+++ b/Source/core/paint/SVGForeignObjectPainter.cpp
@@ -12,6 +12,7 @@
#include "core/paint/PaintInfo.h"
#include "core/paint/SVGPaintContext.h"
#include "core/paint/TransformRecorder.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -24,9 +25,9 @@ void SVGForeignObjectPainter::paint(const PaintInfo& paintInfo)
paintInfoBeforeFiltering.updateCullRectForSVGTransform(m_layoutSVGForeignObject.localTransform());
TransformRecorder transformRecorder(*paintInfoBeforeFiltering.context, m_layoutSVGForeignObject, m_layoutSVGForeignObject.localTransform());
- OwnPtr<FloatClipRecorder> clipRecorder;
+ Optional<FloatClipRecorder> clipRecorder;
if (SVGLayoutSupport::isOverflowHidden(&m_layoutSVGForeignObject))
- clipRecorder = adoptPtr(new FloatClipRecorder(*paintInfoBeforeFiltering.context, m_layoutSVGForeignObject, paintInfoBeforeFiltering.phase, m_layoutSVGForeignObject.viewportRect()));
+ clipRecorder.emplace(*paintInfoBeforeFiltering.context, m_layoutSVGForeignObject, paintInfoBeforeFiltering.phase, m_layoutSVGForeignObject.viewportRect());
SVGPaintContext paintContext(m_layoutSVGForeignObject, paintInfoBeforeFiltering);
bool continueRendering = true;

Powered by Google App Engine
This is Rietveld 408576698