diff options
| author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 22:28:35 +0000 |
|---|---|---|
| committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 22:28:35 +0000 |
| commit | d62bf955b973eeab8b217f46cbcd66768bb9f854 (patch) | |
| tree | acead8dba16bd95a42215ef8c3c0026e92cfc4ff | |
| parent | 69f1be8a969af735b2173349c9bd57a174a9bf16 (diff) | |
| download | chromium_src-d62bf955b973eeab8b217f46cbcd66768bb9f854.zip chromium_src-d62bf955b973eeab8b217f46cbcd66768bb9f854.tar.gz chromium_src-d62bf955b973eeab8b217f46cbcd66768bb9f854.tar.bz2 | |
This CL fixes issue 5729 - RTL: TabStrip context menu should be positioned properly, If window is not maxmized.
(http://crbug.com/5729).
The fix is to popup tabstrip context menu from the left of the click in RTL UI.
Without the fix, tabstrip context menu always popup from the right of the click.
Review URL: http://codereview.chromium.org/73021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13888 0039d316-1c4b-4281-b951-d872f2087c98
| -rw-r--r-- | chrome/browser/views/tabs/tab.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc index 55f6895..e553cf0 100644 --- a/chrome/browser/views/tabs/tab.cc +++ b/chrome/browser/views/tabs/tab.cc @@ -52,8 +52,11 @@ class Tab::ContextMenuController : public views::MenuDelegate { } void RunMenuAt(int x, int y) { + views::MenuItemView::AnchorPosition anchor = + (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ? + views::MenuItemView::TOPRIGHT : views::MenuItemView::TOPLEFT; menu_->RunMenuAt(tab_->GetWidget()->GetNativeView(), gfx::Rect(x, y, 0, 0), - views::MenuItemView::TOPLEFT, true); + anchor, true); if (tab_) tab_->ContextMenuClosed(); delete this; |
