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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index c5b41801e3386164d1245b4d02636d74b820dac5..8263e0f5cc9c0c04a24028dcb2cd0b6b6eaa4481 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -80,7 +80,6 @@
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
#include <algorithm>
-#include <memory>
#ifndef NDEBUG
#include <stdio.h>
#endif
@@ -138,7 +137,7 @@ static SelectionPaintInvalidationMap* selectionPaintInvalidationMap = nullptr;
// The pointer to paint properties is implemented as a global hash map temporarily,
// to avoid memory regression during the transition towards SPv2.
-typedef HashMap<const LayoutObject*, std::unique_ptr<ObjectPaintProperties>> ObjectPaintPropertiesMap;
+typedef HashMap<const LayoutObject*, OwnPtr<ObjectPaintProperties>> ObjectPaintPropertiesMap;
static ObjectPaintPropertiesMap& objectPaintPropertiesMap()
{
DEFINE_STATIC_LOCAL(ObjectPaintPropertiesMap, staticObjectPaintPropertiesMap, ());
@@ -1171,9 +1170,9 @@ void addJsonObjectForPoint(TracedValue* value, const char* name, const T& point)
value->endDictionary();
}
-static std::unique_ptr<TracedValue> jsonObjectForPaintInvalidationInfo(const LayoutRect& rect, const String& invalidationReason)
+static PassOwnPtr<TracedValue> jsonObjectForPaintInvalidationInfo(const LayoutRect& rect, const String& invalidationReason)
{
- std::unique_ptr<TracedValue> value = TracedValue::create();
+ OwnPtr<TracedValue> value = TracedValue::create();
addJsonObjectForRect(value.get(), "rect", rect);
value->setString("invalidation_reason", invalidationReason);
return value;
@@ -1328,9 +1327,9 @@ void LayoutObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationStat
}
}
-static std::unique_ptr<TracedValue> jsonObjectForOldAndNewRects(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoint& newLocation)
+static PassOwnPtr<TracedValue> jsonObjectForOldAndNewRects(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoint& newLocation)
{
- std::unique_ptr<TracedValue> value = TracedValue::create();
+ OwnPtr<TracedValue> value = TracedValue::create();
addJsonObjectForRect(value.get(), "oldRect", oldRect);
addJsonObjectForPoint(value.get(), "oldLocation", oldLocation);
addJsonObjectForRect(value.get(), "newRect", newRect);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGrid.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698