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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 2161683002: Add LayoutLocale class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittest fix Created 4 years, 5 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/shaping/HarfBuzzShaper.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index f1f34e3cc1be7d9fb10921a900ce57182250f7eb..91b815ec73495f5d5aecc4b9888199847b3a3ce3 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -558,9 +558,7 @@ PassRefPtr<ShapeResult> HarfBuzzShaper::shapeResult()
HarfBuzzScopedPtr<hb_buffer_t> harfBuzzBuffer(hb_buffer_create(), hb_buffer_destroy);
const FontDescription& fontDescription = m_font->getFontDescription();
- const String& localeString = fontDescription.locale();
- CString locale = localeString.latin1();
- const hb_language_t language = hb_language_from_string(locale.data(), locale.length());
+ const hb_language_t language = static_cast<const hb_language_t>(fontDescription.localeOrDefault().harfbuzzLanguage());
bool needsCapsHandling = fontDescription.variantCaps() != FontDescription::CapsNormal;
OpenTypeCapsSupport capsSupport;
@@ -649,7 +647,7 @@ PassRefPtr<ShapeResult> HarfBuzzShaper::shapeResult()
CaseMappingHarfBuzzBufferFiller(
caseMapIntend,
- fontDescription.locale(),
+ fontDescription.localeOrDefault().localeString(),
harfBuzzBuffer.get(),
m_normalizedBuffer.get(),
m_normalizedBufferLength,

Powered by Google App Engine
This is Rietveld 408576698