| Index: third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| index 9ce514ca0d64f95e2f2e04c8fc5c954dc64da881..3f6ee8e3974e65d83458b685f84a00f7f0967815 100644
|
| --- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| @@ -47,6 +47,8 @@
|
| #include "core/layout/api/LayoutAPIShim.h"
|
| #include "core/layout/api/LayoutViewItem.h"
|
| #include "core/page/Page.h"
|
| +#include "wtf/PtrUtil.h"
|
| +#include <memory>
|
|
|
| #ifdef AUTOSIZING_DOM_DEBUG_INFO
|
| #include "core/dom/ExecutionContextTask.h"
|
| @@ -82,7 +84,7 @@ static void writeDebugInfo(LayoutObject* layoutObject, const AtomicString& outpu
|
| node = toDocument(node)->documentElement();
|
| if (!node->isElementNode())
|
| return;
|
| - node->document().postTask(adoptPtr(new WriteDebugInfoTask(toElement(node), output)));
|
| + node->document().postTask(wrapUnique(new WriteDebugInfoTask(toElement(node), output)));
|
| }
|
|
|
| void TextAutosizer::writeClusterDebugInfo(Cluster* cluster)
|
| @@ -361,7 +363,7 @@ void TextAutosizer::prepareClusterStack(const LayoutObject* layoutObject)
|
| m_blocksThatHaveBegunLayout.add(block);
|
| #endif
|
| if (Cluster* cluster = maybeCreateCluster(block))
|
| - m_clusterStack.append(adoptPtr(cluster));
|
| + m_clusterStack.append(wrapUnique(cluster));
|
| }
|
| }
|
|
|
| @@ -375,7 +377,7 @@ void TextAutosizer::beginLayout(LayoutBlock* block, SubtreeLayoutScope* layouter
|
| ASSERT(!m_clusterStack.isEmpty() || block->isLayoutView());
|
|
|
| if (Cluster* cluster = maybeCreateCluster(block))
|
| - m_clusterStack.append(adoptPtr(cluster));
|
| + m_clusterStack.append(wrapUnique(cluster));
|
|
|
| ASSERT(!m_clusterStack.isEmpty());
|
|
|
| @@ -765,12 +767,12 @@ TextAutosizer::Supercluster* TextAutosizer::getSupercluster(const LayoutBlock* b
|
| if (!roots || roots->size() < 2 || !roots->contains(block))
|
| return nullptr;
|
|
|
| - SuperclusterMap::AddResult addResult = m_superclusters.add(fingerprint, PassOwnPtr<Supercluster>());
|
| + SuperclusterMap::AddResult addResult = m_superclusters.add(fingerprint, std::unique_ptr<Supercluster>());
|
| if (!addResult.isNewEntry)
|
| return addResult.storedValue->value.get();
|
|
|
| Supercluster* supercluster = new Supercluster(roots);
|
| - addResult.storedValue->value = adoptPtr(supercluster);
|
| + addResult.storedValue->value = wrapUnique(supercluster);
|
| return supercluster;
|
| }
|
|
|
| @@ -1093,9 +1095,9 @@ void TextAutosizer::FingerprintMapper::addTentativeClusterRoot(const LayoutBlock
|
| {
|
| add(block, fingerprint);
|
|
|
| - ReverseFingerprintMap::AddResult addResult = m_blocksForFingerprint.add(fingerprint, PassOwnPtr<BlockSet>());
|
| + ReverseFingerprintMap::AddResult addResult = m_blocksForFingerprint.add(fingerprint, std::unique_ptr<BlockSet>());
|
| if (addResult.isNewEntry)
|
| - addResult.storedValue->value = adoptPtr(new BlockSet);
|
| + addResult.storedValue->value = wrapUnique(new BlockSet);
|
| addResult.storedValue->value->add(block);
|
| #if ENABLE(ASSERT)
|
| assertMapsAreConsistent();
|
|
|