diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 00:24:20 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 00:24:20 +0000 |
commit | 883ce72de20ef56c3c332215c12f14886b67bf8e (patch) | |
tree | 01bb9b4b848f52ad91e4b151f935dbf7f2fa00fd /chrome | |
parent | 4f2fe461d79175b39787686b76d36b7518e132fd (diff) | |
download | chromium_src-883ce72de20ef56c3c332215c12f14886b67bf8e.zip chromium_src-883ce72de20ef56c3c332215c12f14886b67bf8e.tar.gz chromium_src-883ce72de20ef56c3c332215c12f14886b67bf8e.tar.bz2 |
Small cleanups/style fixes. Simplifies RTL functions slightly.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1932006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/localized_error.cc | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index a434fc3..a6ba190 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -1966,11 +1966,8 @@ LONG AutocompleteEditViewWin::ClipXCoordToVisibleText( // Calculation of the clipped coordinate is more complicated if the paragraph // layout is RTL layout, or if there is RTL characters inside the LTR layout // paragraph. - bool ltr_text_in_ltr_layout = true; - if ((pf2.wEffects & PFE_RTLPARA) || - base::i18n::StringContainsStrongRTLChars(GetText())) { - ltr_text_in_ltr_layout = false; - } + const bool ltr_text_in_ltr_layout = !(pf2.wEffects & PFE_RTLPARA) && + !base::i18n::StringContainsStrongRTLChars(GetText()); const int length = GetTextLength(); RECT r; GetRect(&r); diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc index 5365964c..924cb30 100644 --- a/chrome/renderer/localized_error.cc +++ b/chrome/renderer/localized_error.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -107,9 +107,9 @@ WebErrorNetErrorMap net_error_options[] = { bool LocaleIsRTL() { #if defined(TOOLKIT_GTK) - // base::i18n::GetTextDirection uses the GTK text direction, which doesn't work - // within the renderer sandbox. - return base::i18n::GetICUTextDirection() == base::i18n::RIGHT_TO_LEFT; + // base::i18n::IsRTL() uses the GTK text direction, which doesn't work within + // the renderer sandbox. + return base::i18n::ICUIsRTL(); #else return base::i18n::IsRTL(); #endif |