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

Unified Diff: third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.h

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/shapes/ShapeOutsideInfo.h
diff --git a/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.h b/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.h
index 56f27f27e7846740b5bc26a384c1af903bde0767..0dc4a70c75c82c9f03abba9d1a6f3fcf74df97b3 100644
--- a/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.h
+++ b/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.h
@@ -36,7 +36,8 @@
#include "core/style/ShapeValue.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/LayoutSize.h"
-#include "wtf/OwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -93,7 +94,7 @@ public:
LayoutUnit shapeLogicalWidth() const { return computedShape().shapeMarginLogicalBoundingBox().width(); }
LayoutUnit shapeLogicalHeight() const { return computedShape().shapeMarginLogicalBoundingBox().height(); }
- static PassOwnPtr<ShapeOutsideInfo> createInfo(const LayoutBox& layoutBox) { return adoptPtr(new ShapeOutsideInfo(layoutBox)); }
+ static std::unique_ptr<ShapeOutsideInfo> createInfo(const LayoutBox& layoutBox) { return wrapUnique(new ShapeOutsideInfo(layoutBox)); }
static bool isEnabledFor(const LayoutBox&);
ShapeOutsideDeltas computeDeltasForContainingBlockLine(const LineLayoutBlockFlow&, const FloatingObject&, LayoutUnit lineTop, LayoutUnit lineHeight);
@@ -126,12 +127,12 @@ protected:
{ }
private:
- PassOwnPtr<Shape> createShapeForImage(StyleImage*, float shapeImageThreshold, WritingMode, float margin) const;
+ std::unique_ptr<Shape> createShapeForImage(StyleImage*, float shapeImageThreshold, WritingMode, float margin) const;
LayoutUnit logicalTopOffset() const;
LayoutUnit logicalLeftOffset() const;
- typedef HashMap<const LayoutBox*, OwnPtr<ShapeOutsideInfo>> InfoMap;
+ typedef HashMap<const LayoutBox*, std::unique_ptr<ShapeOutsideInfo>> InfoMap;
static InfoMap& infoMap()
{
DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ());
@@ -139,7 +140,7 @@ private:
}
const LayoutBox& m_layoutBox;
- mutable OwnPtr<Shape> m_shape;
+ mutable std::unique_ptr<Shape> m_shape;
LayoutSize m_referenceBoxLogicalSize;
ShapeOutsideDeltas m_shapeOutsideDeltas;
mutable bool m_isComputingShape;

Powered by Google App Engine
This is Rietveld 408576698