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

Unified Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

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/platform/fonts/SimpleFontData.h
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.h b/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
index 9cbeb8b371988ab6d39cf1ab155293a2773d26e4..1403a8efe5e3c8f70f18e66e2cc42d6d6935133e 100644
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
@@ -35,9 +35,9 @@
#include "platform/fonts/TypesettingFeatures.h"
#include "platform/fonts/opentype/OpenTypeVerticalData.h"
#include "platform/geometry/FloatRect.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/text/StringHash.h"
-#include <memory>
namespace blink {
@@ -144,7 +144,7 @@ private:
FontPlatformData m_platformData;
- mutable std::unique_ptr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap;
+ mutable OwnPtr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap;
mutable GlyphMetricsMap<float> m_glyphToWidthMap;
bool m_isTextOrientationFallback;
@@ -161,7 +161,7 @@ private:
USING_FAST_MALLOC(DerivedFontData);
WTF_MAKE_NONCOPYABLE(DerivedFontData);
public:
- static std::unique_ptr<DerivedFontData> create(bool forCustomFont);
+ static PassOwnPtr<DerivedFontData> create(bool forCustomFont);
~DerivedFontData();
bool forCustomFont;
@@ -177,7 +177,7 @@ private:
}
};
- mutable std::unique_ptr<DerivedFontData> m_derivedFontData;
+ mutable OwnPtr<DerivedFontData> m_derivedFontData;
RefPtr<CustomFontData> m_customFontData;
};
@@ -193,7 +193,7 @@ ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
bounds = platformBoundsForGlyph(glyph);
if (!m_glyphToBoundsMap)
- m_glyphToBoundsMap = wrapUnique(new GlyphMetricsMap<FloatRect>);
+ m_glyphToBoundsMap = adoptPtr(new GlyphMetricsMap<FloatRect>);
m_glyphToBoundsMap->setMetricsForGlyph(glyph, bounds);
return bounds;
}

Powered by Google App Engine
This is Rietveld 408576698