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

Unified Diff: app/gfx/canvas_win.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « app/gfx/canvas.cc ('k') | app/l10n_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/canvas_win.cc
===================================================================
--- app/gfx/canvas_win.cc (revision 42180)
+++ app/gfx/canvas_win.cc (working copy)
@@ -7,7 +7,7 @@
#include <limits>
#include "app/gfx/font.h"
-#include "app/l10n_util.h"
+#include "base/i18n/rtl.h"
#include "gfx/rect.h"
#include "third_party/skia/include/core/SkShader.h"
@@ -24,7 +24,7 @@
// 1. The current locale is RTL.
// 2. The string itself has RTL directionality.
if (flags & DT_RTLREADING) {
- if (l10n_util::AdjustStringForLocaleDirection(text, &localized_text)) {
+ if (base::i18n::AdjustStringForLocaleDirection(text, &localized_text)) {
string_ptr = localized_text.c_str();
string_size = static_cast<int>(localized_text.length());
}
@@ -42,7 +42,7 @@
if (!(flags & (gfx::Canvas::TEXT_ALIGN_CENTER |
gfx::Canvas::TEXT_ALIGN_RIGHT |
gfx::Canvas::TEXT_ALIGN_LEFT))) {
- flags |= l10n_util::DefaultCanvasTextAlignment();
+ flags |= gfx::Canvas::DefaultCanvasTextAlignment();
}
// horizontal alignment
@@ -113,8 +113,8 @@
// using RTL directionality then we respect that and pass DT_RTLREADING to
// ::DrawText even if the locale is LTR.
if ((flags & gfx::Canvas::FORCE_RTL_DIRECTIONALITY) ||
- ((l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) &&
- (f & DT_RIGHT) && l10n_util::StringContainsStrongRTLChars(text))) {
+ (base::i18n::IsRTL() &&
+ (f & DT_RIGHT) && base::i18n::StringContainsStrongRTLChars(text))) {
f |= DT_RTLREADING;
}
« no previous file with comments | « app/gfx/canvas.cc ('k') | app/l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698