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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp

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/paint/PaintLayerStackingNode.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp b/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
index 747674ac53b09ab44f6be1fbb5521efa084c4488..8489a694dcb1f477305d41cefd0760f5124543e9 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
@@ -48,9 +48,7 @@
#include "core/layout/compositing/PaintLayerCompositor.h"
#include "core/paint/PaintLayer.h"
#include "public/platform/Platform.h"
-#include "wtf/PtrUtil.h"
#include <algorithm>
-#include <memory>
namespace blink {
@@ -150,7 +148,7 @@ void PaintLayerStackingNode::rebuildZOrderLists()
PaintLayer* layer = toLayoutBoxModelObject(child)->layer();
// Create the buffer if it doesn't exist yet.
if (!m_posZOrderList)
- m_posZOrderList = wrapUnique(new Vector<PaintLayerStackingNode*>);
+ m_posZOrderList = adoptPtr(new Vector<PaintLayerStackingNode*>);
m_posZOrderList->append(layer->stackingNode());
}
}
@@ -163,15 +161,15 @@ void PaintLayerStackingNode::rebuildZOrderLists()
m_zOrderListsDirty = false;
}
-void PaintLayerStackingNode::collectLayers(std::unique_ptr<Vector<PaintLayerStackingNode*>>& posBuffer, std::unique_ptr<Vector<PaintLayerStackingNode*>>& negBuffer)
+void PaintLayerStackingNode::collectLayers(OwnPtr<Vector<PaintLayerStackingNode*>>& posBuffer, OwnPtr<Vector<PaintLayerStackingNode*>>& negBuffer)
{
if (layer()->isInTopLayer())
return;
if (isStacked()) {
- std::unique_ptr<Vector<PaintLayerStackingNode*>>& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
+ OwnPtr<Vector<PaintLayerStackingNode*>>& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
if (!buffer)
- buffer = wrapUnique(new Vector<PaintLayerStackingNode*>);
+ buffer = adoptPtr(new Vector<PaintLayerStackingNode*>);
buffer->append(this);
}

Powered by Google App Engine
This is Rietveld 408576698