Title: [145327] trunk/Source/WebCore
- Revision
- 145327
- Author
- [email protected]
- Date
- 2013-03-10 09:46:16 -0700 (Sun, 10 Mar 2013)
Log Message
GlyphMetricsMap should use OwnPtr.
<http://webkit.org/b/111937>
Reviewed by Anders Carlsson.
Use OwnPtr instead of raw pointer + deleteAllValues().
* platform/graphics/GlyphMetricsMap.h:
(GlyphMetricsMap):
(WebCore::::locatePageSlowCase):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (145326 => 145327)
--- trunk/Source/WebCore/ChangeLog 2013-03-10 16:09:00 UTC (rev 145326)
+++ trunk/Source/WebCore/ChangeLog 2013-03-10 16:46:16 UTC (rev 145327)
@@ -1,3 +1,16 @@
+2013-03-10 Andreas Kling <[email protected]>
+
+ GlyphMetricsMap should use OwnPtr.
+ <http://webkit.org/b/111937>
+
+ Reviewed by Anders Carlsson.
+
+ Use OwnPtr instead of raw pointer + deleteAllValues().
+
+ * platform/graphics/GlyphMetricsMap.h:
+ (GlyphMetricsMap):
+ (WebCore::::locatePageSlowCase):
+
2013-03-10 Eric Carlson <[email protected]>
Allow iOS port to use InbandTextTrackPrivateAVF
Modified: trunk/Source/WebCore/platform/graphics/GlyphMetricsMap.h (145326 => 145327)
--- trunk/Source/WebCore/platform/graphics/GlyphMetricsMap.h 2013-03-10 16:09:00 UTC (rev 145326)
+++ trunk/Source/WebCore/platform/graphics/GlyphMetricsMap.h 2013-03-10 16:46:16 UTC (rev 145327)
@@ -43,12 +43,6 @@
WTF_MAKE_NONCOPYABLE(GlyphMetricsMap);
public:
GlyphMetricsMap() : m_filledPrimaryPage(false) { }
- ~GlyphMetricsMap()
- {
- if (m_pages)
- deleteAllValues(*m_pages);
- }
-
T metricsForGlyph(Glyph glyph)
{
return locatePage(glyph / GlyphMetricsPage::size)->metricsForGlyph(glyph);
@@ -88,7 +82,7 @@
bool m_filledPrimaryPage;
GlyphMetricsPage m_primaryPage; // We optimize for the page that contains glyph indices 0-255.
- OwnPtr<HashMap<int, GlyphMetricsPage*> > m_pages;
+ OwnPtr<HashMap<int, OwnPtr<GlyphMetricsPage> > > m_pages;
};
template<> inline float GlyphMetricsMap<float>::unknownMetrics()
@@ -113,9 +107,9 @@
if ((page = m_pages->get(pageNumber)))
return page;
} else
- m_pages = adoptPtr(new HashMap<int, GlyphMetricsPage*>);
+ m_pages = adoptPtr(new HashMap<int, OwnPtr<GlyphMetricsPage> >);
page = new GlyphMetricsPage;
- m_pages->set(pageNumber, page);
+ m_pages->set(pageNumber, adoptPtr(page));
}
// Fill in the whole page with the unknown glyph information.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes