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

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: Downcast to icu::RuleBasedBreakIterator Created 7 years, 2 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/page/TouchAdjustment.cpp ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e6a3ffcbd7cc654c7479323aeb87e570f4e5f984..5149182fc7b1e0d2e1e37c24204e8a5b6329c6ed 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;
« no previous file with comments | « Source/core/page/TouchAdjustment.cpp ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698