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

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

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

Powered by Google App Engine
This is Rietveld 408576698