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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
index c8311c001c79f493d287256e2b3263653620a8d6..3b9d2ebfe2483e9ccaeccb4c2cefb28c3aa646c2 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
@@ -31,6 +31,8 @@
#include "platform/graphics/paint/PaintController.h"
#include "platform/graphics/paint/SkPictureBuilder.h"
#include "third_party/skia/include/core/SkPicture.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -75,7 +77,7 @@ PatternData* LayoutSVGResourcePattern::patternForLayoutObject(const LayoutObject
return m_patternMap.set(&object, buildPatternData(object)).storedValue->value.get();
}
-PassOwnPtr<PatternData> LayoutSVGResourcePattern::buildPatternData(const LayoutObject& object)
+std::unique_ptr<PatternData> LayoutSVGResourcePattern::buildPatternData(const LayoutObject& object)
{
// If we couldn't determine the pattern content element root, stop here.
const PatternAttributes& attributes = this->attributes();
@@ -107,7 +109,7 @@ PassOwnPtr<PatternData> LayoutSVGResourcePattern::buildPatternData(const LayoutO
tileTransform.scale(clientBoundingBox.width(), clientBoundingBox.height());
}
- OwnPtr<PatternData> patternData = adoptPtr(new PatternData);
+ std::unique_ptr<PatternData> patternData = wrapUnique(new PatternData);
patternData->pattern = Pattern::createPicturePattern(asPicture(tileBounds, tileTransform));
// Compute pattern space transformation.

Powered by Google App Engine
This is Rietveld 408576698