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

Unified Diff: Source/core/platform/graphics/mac/ComplexTextController.cpp

Issue 23618052: TextBreakIterator should use the C++ icu API instead of the C one (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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: Source/core/platform/graphics/mac/ComplexTextController.cpp
diff --git a/Source/core/platform/graphics/mac/ComplexTextController.cpp b/Source/core/platform/graphics/mac/ComplexTextController.cpp
index 8811f4b98129ce72053dd713988708e24e35730f..6b809cc2ef7587e832ef27b431bbc5651f1cbbd0 100644
--- a/Source/core/platform/graphics/mac/ComplexTextController.cpp
+++ b/Source/core/platform/graphics/mac/ComplexTextController.cpp
@@ -206,10 +206,10 @@ int ComplexTextController::offsetForPosition(float h, bool includePartialGlyphs)
int stringLength = complexTextRun.stringLength();
TextBreakIterator* cursorPositionIterator = cursorMovementIterator(complexTextRun.characters(), stringLength);
int clusterStart;
- if (isTextBreak(cursorPositionIterator, hitIndex))
+ if (cursorPositionIterator->isBoundary(hitIndex))
clusterStart = hitIndex;
else {
- clusterStart = textBreakPreceding(cursorPositionIterator, hitIndex);
+ clusterStart = cursorPositionIterator->preceding(hitIndex);
if (clusterStart == TextBreakDone)
clusterStart = 0;
}
@@ -217,7 +217,7 @@ int ComplexTextController::offsetForPosition(float h, bool includePartialGlyphs)
if (!includePartialGlyphs)
return complexTextRun.stringLocation() + clusterStart;
- int clusterEnd = textBreakFollowing(cursorPositionIterator, hitIndex);
+ int clusterEnd = cursorPositionIterator->following(hitIndex);
if (clusterEnd == TextBreakDone)
clusterEnd = stringLength;

Powered by Google App Engine
This is Rietveld 408576698