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

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

Issue 2507063010: Moving string normalization out of HarfBuzz (Closed)
Patch Set: Merge w/HEAD Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.cpp b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.cpp
index 80f506bd8c2af2a2cab59a57b309b3199c066441..4f17d0e0cc44f2b8df503d9eb5f284db45f5453b 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.cpp
@@ -15,7 +15,10 @@ PassRefPtr<const ShapeResult> CachingWordShapeIterator::shapeWordWithoutSpacing(
if (cacheEntry && cacheEntry->m_shapeResult)
return cacheEntry->m_shapeResult;
- HarfBuzzShaper shaper(wordRun);
+ unsigned wordLength = 0;
+ std::unique_ptr<UChar[]> wordText = wordRun.normalizedUTF16(&wordLength);
+
+ HarfBuzzShaper shaper(wordText.get(), wordLength, wordRun.direction());
RefPtr<const ShapeResult> shapeResult = shaper.shapeResult(font);
if (!shapeResult)
return nullptr;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698