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

Side by Side Diff: Source/platform/fonts/FontDescription.cpp

Issue 1135003004: Make small-caps work correctly with tr locale (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add back TestExpectations change Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | Source/wtf/text/StringImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com> 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com>
3 * Copyright (C) 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 static const AtomicString& defaultLocale() 126 static const AtomicString& defaultLocale()
127 { 127 {
128 DEFINE_STATIC_LOCAL(AtomicString, locale, ()); 128 DEFINE_STATIC_LOCAL(AtomicString, locale, ());
129 if (locale.isNull()) 129 if (locale.isNull())
130 locale = AtomicString("en"); 130 locale = AtomicString("en");
131 return locale; 131 return locale;
132 } 132 }
133 133
134 const AtomicString& FontDescription::locale() const 134 const AtomicString& FontDescription::locale(bool includeDefault) const
135 { 135 {
136 if (m_locale.isNull()) 136 if (m_locale.isNull() && includeDefault)
137 return defaultLocale(); 137 return defaultLocale();
138 return m_locale; 138 return m_locale;
139 } 139 }
140 140
141 void FontDescription::setTraits(FontTraits traits) 141 void FontDescription::setTraits(FontTraits traits)
142 { 142 {
143 setStyle(traits.style()); 143 setStyle(traits.style());
144 setVariant(traits.variant()); 144 setVariant(traits.variant());
145 setWeight(traits.weight()); 145 setWeight(traits.weight());
146 setStretch(traits.stretch()); 146 setStretch(traits.stretch());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate 235 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate
236 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate 236 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate
237 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) { 237 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) {
238 m_typesettingFeatures |= blink::Ligatures; 238 m_typesettingFeatures |= blink::Ligatures;
239 } 239 }
240 } 240 }
241 } 241 }
242 242
243 } // namespace blink 243 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698