Title: [157455] trunk/Source/WebCore
Revision
157455
Author
[email protected]
Date
2013-10-15 11:16:51 -0700 (Tue, 15 Oct 2013)

Log Message

FontGenericFamilies should not be ref-counted.
<https://webkit.org/b/122835>

Reviewed by Anders Carlsson.

FontGenericFamilies is singly-owned by Settings.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157454 => 157455)


--- trunk/Source/WebCore/ChangeLog	2013-10-15 18:08:14 UTC (rev 157454)
+++ trunk/Source/WebCore/ChangeLog	2013-10-15 18:16:51 UTC (rev 157455)
@@ -1,3 +1,12 @@
+2013-10-15  Andreas Kling  <[email protected]>
+
+        FontGenericFamilies should not be ref-counted.
+        <https://webkit.org/b/122835>
+
+        Reviewed by Anders Carlsson.
+
+        FontGenericFamilies is singly-owned by Settings.
+
 2013-10-15  Zoltan Horvath  <[email protected]>
 
         [CSS Shapes] Move RenderBlock::layoutShapeInsideInfo into RenderBlock.cpp

Modified: trunk/Source/WebCore/page/Settings.cpp (157454 => 157455)


--- trunk/Source/WebCore/page/Settings.cpp	2013-10-15 18:08:14 UTC (rev 157454)
+++ trunk/Source/WebCore/page/Settings.cpp	2013-10-15 18:16:51 UTC (rev 157455)
@@ -136,7 +136,7 @@
 Settings::Settings(Page* page)
     : m_page(0)
     , m_mediaTypeOverride("screen")
-    , m_fontGenericFamilies(FontGenericFamilies::create())
+    , m_fontGenericFamilies(std::make_unique<FontGenericFamilies>())
     , m_storageBlockingPolicy(SecurityOrigin::AllowAllStorage)
 #if ENABLE(TEXT_AUTOSIZING)
     , m_textAutosizingFontScaleFactor(1)

Modified: trunk/Source/WebCore/page/Settings.h (157454 => 157455)


--- trunk/Source/WebCore/page/Settings.h	2013-10-15 18:08:14 UTC (rev 157454)
+++ trunk/Source/WebCore/page/Settings.h	2013-10-15 18:16:51 UTC (rev 157455)
@@ -277,7 +277,7 @@
 
     String m_mediaTypeOverride;
     URL m_userStyleSheetLocation;
-    RefPtr<FontGenericFamilies> m_fontGenericFamilies;
+    const std::unique_ptr<FontGenericFamilies> m_fontGenericFamilies;
     SecurityOrigin::StorageBlockingPolicy m_storageBlockingPolicy;
 #if ENABLE(TEXT_AUTOSIZING)
     float m_textAutosizingFontScaleFactor;

Modified: trunk/Source/WebCore/platform/graphics/FontGenericFamilies.h (157454 => 157455)


--- trunk/Source/WebCore/platform/graphics/FontGenericFamilies.h	2013-10-15 18:08:14 UTC (rev 157454)
+++ trunk/Source/WebCore/platform/graphics/FontGenericFamilies.h	2013-10-15 18:16:51 UTC (rev 157455)
@@ -27,7 +27,6 @@
 #define FontGenericFamilies_h
 
 #include <wtf/HashMap.h>
-#include <wtf/RefCounted.h>
 #include <wtf/text/AtomicString.h>
 
 namespace WebCore {
@@ -43,9 +42,9 @@
 
 typedef HashMap<int, AtomicString, DefaultHash<int>::Hash, UScriptCodeHashTraits> ScriptFontFamilyMap;
 
-class FontGenericFamilies : public RefCounted<FontGenericFamilies> {
+class FontGenericFamilies {
 public:
-    static PassRefPtr<FontGenericFamilies> create() { return adoptRef(new FontGenericFamilies); }
+    FontGenericFamilies();
 
     const AtomicString& standardFontFamily(UScriptCode = USCRIPT_COMMON) const;
     const AtomicString& fixedFontFamily(UScriptCode = USCRIPT_COMMON) const;
@@ -64,8 +63,6 @@
     bool setPictographFontFamily(const AtomicString&, UScriptCode);
 
 private:
-    FontGenericFamilies();
-
     ScriptFontFamilyMap m_standardFontFamilyMap;
     ScriptFontFamilyMap m_serifFontFamilyMap;
     ScriptFontFamilyMap m_fixedFontFamilyMap;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to