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

Unified Diff: base/i18n/break_iterator.cc

Issue 7458014: Implement Uniscribe RenderText for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux build error. Created 9 years, 4 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: base/i18n/break_iterator.cc
diff --git a/base/i18n/break_iterator.cc b/base/i18n/break_iterator.cc
index afa1fd80d89b080a97a0585351b1be0b6daacd71..e4328be09600383ec4ec096d91e511e22ff9bb30 100644
--- a/base/i18n/break_iterator.cc
+++ b/base/i18n/break_iterator.cc
@@ -92,6 +92,17 @@ bool BreakIterator::IsWord() const {
return (break_type_ == BREAK_WORD && status != UBRK_WORD_NONE);
}
+bool BreakIterator::IsWordBreakAt(size_t position) {
+ UBreakIterator* iter = static_cast<UBreakIterator*>(iter_);
+ UBool boundary = ubrk_isBoundary(iter, static_cast<int32_t>(position));
+ int32_t status = ubrk_getRuleStatus(iter);
+ // Check the next word boundary type, but ignore the position.
+ ubrk_next(iter);
+ int32_t next_status = ubrk_getRuleStatus(iter);
+ return (!!boundary && status == UBRK_WORD_NONE &&
+ (next_status != UBRK_WORD_NONE));
+}
+
string16 BreakIterator::GetString() const {
DCHECK(prev_ != npos && pos_ != npos);
return string_.substr(prev_, pos_ - prev_);
« no previous file with comments | « base/i18n/break_iterator.h ('k') | ui/gfx/render_text.h » ('j') | ui/gfx/render_text_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698