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

Unified Diff: Source/platform/fonts/FontDescription.h

Issue 924903002: Don't allocate Strings in FontDescription(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/css/resolver/FontBuilder.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontDescription.h
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h
index 7adfba4db024c397e9bdb96de818426d9a2393bb..87c6ef0f908edfc498c50a30875029dc9f7d65ff 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -55,8 +55,7 @@ public:
enum LigaturesState { NormalLigaturesState, DisabledLigaturesState, EnabledLigaturesState };
FontDescription()
- : m_locale("en")
- , m_specifiedSize(0)
+ : m_specifiedSize(0)
, m_computedSize(0)
, m_letterSpacing(0)
, m_wordSpacing(0)
@@ -161,7 +160,7 @@ public:
FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMode>(m_fontSmoothing); }
TextRenderingMode textRendering() const { return static_cast<TextRenderingMode>(m_textRendering); }
UScriptCode script() const { return static_cast<UScriptCode>(m_script); }
- const String& locale() const { return m_locale; }
+ const AtomicString& locale() const;
bool isSyntheticBold() const { return m_syntheticBold; }
bool isSyntheticItalic() const { return m_syntheticItalic; }
bool useSubpixelPositioning() const { return m_subpixelTextPosition; }
@@ -195,7 +194,7 @@ public:
void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJKGlyphOrientation = orientation; }
void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; }
void setScript(UScriptCode s) { m_script = s; }
- void setLocale(const String& locale) { m_locale = locale; }
+ void setLocale(const AtomicString& locale) { m_locale = locale; }
void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; }
void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheticItalic; }
void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featureSettings = settings; }
@@ -214,7 +213,7 @@ public:
private:
FontFamily m_familyList; // The list of font families to be used.
RefPtr<FontFeatureSettings> m_featureSettings;
- String m_locale;
+ AtomicString m_locale;
void updateTypesettingFeatures() const;
« no previous file with comments | « Source/core/css/resolver/FontBuilder.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698