diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 07:29:21 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 07:29:21 +0000 |
commit | 8a5da801541e61deddb35fae6e8916e69fb90826 (patch) | |
tree | d32af3085e37238ccbd907649454b5aa89616ebf /chrome/browser/jsmessage_box_handler.cc | |
parent | ccbbc250ad912fec03f79247835c930f5b0deefc (diff) | |
download | chromium_src-8a5da801541e61deddb35fae6e8916e69fb90826.zip chromium_src-8a5da801541e61deddb35fae6e8916e69fb90826.tar.gz chromium_src-8a5da801541e61deddb35fae6e8916e69fb90826.tar.bz2 |
This change list fix issue 3233: RTL: Wrong URL showing on Javascript pop up window
( http://crbug.com/3233)
The fix put LTR-PDF pair around URL to force URL to be LTR always.
test step:
1. open RTL Chrome
2. open http://www.w3.org/International/tests/test-rtl-chrome-4
3. click any "click me" button
without the fix, the ending "/" in the URL appears at left-most in the alert window title.
with the fix, the ending "/" in the URL appears correctly.
Review URL: http://codereview.chromium.org/18088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/jsmessage_box_handler.cc')
-rw-r--r-- | chrome/browser/jsmessage_box_handler.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/jsmessage_box_handler.cc b/chrome/browser/jsmessage_box_handler.cc index 47b0998..bf8b65d 100644 --- a/chrome/browser/jsmessage_box_handler.cc +++ b/chrome/browser/jsmessage_box_handler.cc @@ -71,9 +71,12 @@ std::wstring JavascriptMessageBoxHandler::GetWindowTitle() const { GURL clean_url = url.ReplaceComponents(replacements); // TODO(brettw) it should be easier than this to do the correct language - // handling without getting the accept language from the profil. + // handling without getting the accept language from the profile. std::wstring base_address = gfx::ElideUrl(clean_url, ChromeFont(), 0, web_contents_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages)); + // Force URL to have LTR directionality. + if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) + l10n_util::WrapStringWithLTRFormatting(&base_address); return l10n_util::GetStringF(IDS_JAVASCRIPT_MESSAGEBOX_TITLE, base_address); } |