diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 21:06:11 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 21:06:11 +0000 |
commit | 26ef58b74eb86e3520542ecd1eb768d71a374601 (patch) | |
tree | 8f6fd3a1c5fd4b62852a2f1ca160a50e7156c12e /chrome/browser/views | |
parent | f091469f74c8a73b0fb9de1359f3ae23a324a56d (diff) | |
download | chromium_src-26ef58b74eb86e3520542ecd1eb768d71a374601.zip chromium_src-26ef58b74eb86e3520542ecd1eb768d71a374601.tar.gz chromium_src-26ef58b74eb86e3520542ecd1eb768d71a374601.tar.bz2 |
Fix RTL-mode display of table of URLs to load on startup. The table itself should still be mirrored (items are laid out right-to-left), we just want to mark the text contents as LTR (since they're URLs).
BUG=7215
TEST=In Hebrew UI, go to first page of options and add URLs to table of URLs to load on startup. Check that they're laid out right-to-left with favicon first, but actual URLs are still drawn LTR.
Review URL: http://codereview.chromium.org/1962004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/options/general_page_view.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc index bbb81e8..86503f9 100644 --- a/chrome/browser/views/options/general_page_view.cc +++ b/chrome/browser/views/options/general_page_view.cc @@ -8,6 +8,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/callback.h" +#include "base/i18n/rtl.h" #include "base/message_loop.h" #include "base/string_util.h" #include "chrome/browser/browser.h" @@ -192,9 +193,9 @@ std::wstring CustomHomePagesTableModel::GetText(int row, int column_id) { DCHECK(row >= 0 && row < RowCount()); std::wstring languages = profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); - // No need to force URL to have LTR directionality because the custom home - // pages control is created using LTR directionality. - return net::FormatUrl(entries_[row].url, languages); + std::wstring url(net::FormatUrl(entries_[row].url, languages)); + base::i18n::GetDisplayStringInLTRDirectionality(&url); + return url; } SkBitmap CustomHomePagesTableModel::GetIcon(int row) { @@ -719,8 +720,6 @@ void GeneralPageView::InitStartupGroup() { startup_custom_pages_table_ = new views::TableView( startup_custom_pages_table_model_.get(), columns, views::ICON_AND_TEXT, false, false, true); - // URLs are inherently left-to-right, so do not mirror the table. - startup_custom_pages_table_->EnableUIMirroringForRTLLanguages(false); startup_custom_pages_table_->SetObserver(this); using views::GridLayout; |