| Index: third_party/WebKit/Source/core/layout/FloatingObjects.h
|
| diff --git a/third_party/WebKit/Source/core/layout/FloatingObjects.h b/third_party/WebKit/Source/core/layout/FloatingObjects.h
|
| index 11f78d951a8de87fe6fb729ed38c707109911c1e..35fd6d6d5eff99bc51598cebe28b24b82bc3ea7e 100644
|
| --- a/third_party/WebKit/Source/core/layout/FloatingObjects.h
|
| +++ b/third_party/WebKit/Source/core/layout/FloatingObjects.h
|
| @@ -28,7 +28,7 @@
|
| #include "platform/PODIntervalTree.h"
|
| #include "platform/geometry/LayoutRect.h"
|
| #include "wtf/ListHashSet.h"
|
| -#include "wtf/OwnPtr.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -47,11 +47,11 @@ public:
|
| // Note that Type uses bits so you can use FloatLeftRight as a mask to query for both left and right.
|
| enum Type { FloatLeft = 1, FloatRight = 2, FloatLeftRight = 3 };
|
|
|
| - static PassOwnPtr<FloatingObject> create(LayoutBox*);
|
| + static std::unique_ptr<FloatingObject> create(LayoutBox*);
|
|
|
| - PassOwnPtr<FloatingObject> copyToNewContainer(LayoutSize, bool shouldPaint = false, bool isDescendant = false) const;
|
| + std::unique_ptr<FloatingObject> copyToNewContainer(LayoutSize, bool shouldPaint = false, bool isDescendant = false) const;
|
|
|
| - PassOwnPtr<FloatingObject> unsafeClone() const;
|
| + std::unique_ptr<FloatingObject> unsafeClone() const;
|
|
|
| Type getType() const { return static_cast<Type>(m_type); }
|
| LayoutBox* layoutObject() const { return m_layoutObject; }
|
| @@ -112,9 +112,9 @@ private:
|
| struct FloatingObjectHashFunctions {
|
| STATIC_ONLY(FloatingObjectHashFunctions);
|
| static unsigned hash(FloatingObject* key) { return DefaultHash<LayoutBox*>::Hash::hash(key->layoutObject()); }
|
| - static unsigned hash(const OwnPtr<FloatingObject>& key) { return hash(key.get()); }
|
| - static bool equal(OwnPtr<FloatingObject>& a, FloatingObject* b) { return a->layoutObject() == b->layoutObject(); }
|
| - static bool equal(OwnPtr<FloatingObject>& a, const OwnPtr<FloatingObject>& b) { return equal(a, b.get()); }
|
| + static unsigned hash(const std::unique_ptr<FloatingObject>& key) { return hash(key.get()); }
|
| + static bool equal(std::unique_ptr<FloatingObject>& a, FloatingObject* b) { return a->layoutObject() == b->layoutObject(); }
|
| + static bool equal(std::unique_ptr<FloatingObject>& a, const std::unique_ptr<FloatingObject>& b) { return equal(a, b.get()); }
|
|
|
| static const bool safeToCompareToEmptyOrDeleted = true;
|
| };
|
| @@ -122,14 +122,14 @@ struct FloatingObjectHashTranslator {
|
| STATIC_ONLY(FloatingObjectHashTranslator);
|
| static unsigned hash(LayoutBox* key) { return DefaultHash<LayoutBox*>::Hash::hash(key); }
|
| static bool equal(FloatingObject* a, LayoutBox* b) { return a->layoutObject() == b; }
|
| - static bool equal(const OwnPtr<FloatingObject>& a, LayoutBox* b) { return a->layoutObject() == b; }
|
| + static bool equal(const std::unique_ptr<FloatingObject>& a, LayoutBox* b) { return a->layoutObject() == b; }
|
| };
|
| -typedef ListHashSet<OwnPtr<FloatingObject>, 4, FloatingObjectHashFunctions> FloatingObjectSet;
|
| +typedef ListHashSet<std::unique_ptr<FloatingObject>, 4, FloatingObjectHashFunctions> FloatingObjectSet;
|
| typedef FloatingObjectSet::const_iterator FloatingObjectSetIterator;
|
| typedef PODInterval<LayoutUnit, FloatingObject*> FloatingObjectInterval;
|
| typedef PODIntervalTree<LayoutUnit, FloatingObject*> FloatingObjectTree;
|
| typedef PODFreeListArena<PODRedBlackTree<FloatingObjectInterval>::Node> IntervalArena;
|
| -typedef HashMap<LayoutBox*, OwnPtr<FloatingObject>> LayoutBoxToFloatInfoMap;
|
| +typedef HashMap<LayoutBox*, std::unique_ptr<FloatingObject>> LayoutBoxToFloatInfoMap;
|
|
|
| class FloatingObjects {
|
| WTF_MAKE_NONCOPYABLE(FloatingObjects); USING_FAST_MALLOC(FloatingObjects);
|
| @@ -139,7 +139,7 @@ public:
|
|
|
| void clear();
|
| void moveAllToFloatInfoMap(LayoutBoxToFloatInfoMap&);
|
| - FloatingObject* add(PassOwnPtr<FloatingObject>);
|
| + FloatingObject* add(std::unique_ptr<FloatingObject>);
|
| void remove(FloatingObject*);
|
| void addPlacedObject(FloatingObject&);
|
| void removePlacedObject(FloatingObject&);
|
|
|