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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.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/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index fda8bbe7880f6421f01033f4040673828dfd3cec..a8bae52d16fd4cdacb1ceeee596203aea8ede8e6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -54,9 +54,7 @@
#include "core/paint/PaintLayer.h"
#include "core/style/ComputedStyle.h"
#include "platform/RuntimeEnabledFeatures.h"
-#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
-#include <memory>
namespace blink {
@@ -105,7 +103,7 @@ LayoutBlock::LayoutBlock(ContainerNode* node)
void LayoutBlock::removeFromGlobalMaps()
{
if (hasPositionedObjects()) {
- std::unique_ptr<TrackedLayoutBoxListHashSet> descendants = gPositionedDescendantsMap->take(this);
+ OwnPtr<TrackedLayoutBoxListHashSet> descendants = gPositionedDescendantsMap->take(this);
ASSERT(!descendants->isEmpty());
for (LayoutBox* descendant : *descendants) {
ASSERT(gPositionedContainerMap->get(descendant) == this);
@@ -113,7 +111,7 @@ void LayoutBlock::removeFromGlobalMaps()
}
}
if (hasPercentHeightDescendants()) {
- std::unique_ptr<TrackedLayoutBoxListHashSet> descendants = gPercentHeightDescendantsMap->take(this);
+ OwnPtr<TrackedLayoutBoxListHashSet> descendants = gPercentHeightDescendantsMap->take(this);
ASSERT(!descendants->isEmpty());
for (LayoutBox* descendant : *descendants) {
ASSERT(descendant->percentHeightContainer() == this);
@@ -876,7 +874,7 @@ void LayoutBlock::insertPositionedObject(LayoutBox* o)
TrackedLayoutBoxListHashSet* descendantSet = gPositionedDescendantsMap->get(this);
if (!descendantSet) {
descendantSet = new TrackedLayoutBoxListHashSet;
- gPositionedDescendantsMap->set(this, wrapUnique(descendantSet));
+ gPositionedDescendantsMap->set(this, adoptPtr(descendantSet));
}
descendantSet->add(o);
@@ -964,7 +962,7 @@ void LayoutBlock::addPercentHeightDescendant(LayoutBox* descendant)
TrackedLayoutBoxListHashSet* descendantSet = gPercentHeightDescendantsMap->get(this);
if (!descendantSet) {
descendantSet = new TrackedLayoutBoxListHashSet;
- gPercentHeightDescendantsMap->set(this, wrapUnique(descendantSet));
+ gPercentHeightDescendantsMap->set(this, adoptPtr(descendantSet));
}
descendantSet->add(descendant);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698