summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-14 20:57:31 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-14 20:57:31 +0000
commit35129e71963072674877a2e938e63d588aab78fd (patch)
tree5738a38569dc21c18af15258a223f2f7e8ac2a99 /chrome
parent216e0bc0a053fe5939f829c877959f9a26a91e11 (diff)
downloadchromium_src-35129e71963072674877a2e938e63d588aab78fd.zip
chromium_src-35129e71963072674877a2e938e63d588aab78fd.tar.gz
chromium_src-35129e71963072674877a2e938e63d588aab78fd.tar.bz2
[extensions] Position browser action popup correctly for RTL languages.
ExtensionPopup::Show was hard coded to use BubbleBorder::TOP_RIGHT, by changing it to be dynamic that depends on UI Layout fixes this issue. BUG=29807 TEST=Change chrome language to Arabic, install Sidewiki, the popup will position itself correctly. Review URL: http://codereview.chromium.org/494008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/browser_actions_container.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index b52db8c..ccbc581 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -385,12 +385,14 @@ void BrowserActionsContainer::OnBrowserActionExecuted(
gfx::NativeWindow frame_window =
toolbar_->browser()->window()->GetNativeHandle();
+ BubbleBorder::ArrowLocation arrowLocation = UILayoutIsRightToLeft() ?
+ BubbleBorder::TOP_LEFT : BubbleBorder::TOP_RIGHT;
popup_ = ExtensionPopup::Show(browser_action->popup_url(),
toolbar_->browser(),
toolbar_->browser()->profile(),
frame_window,
rect,
- BubbleBorder::TOP_RIGHT,
+ arrowLocation,
true); // Activate the popup window.
popup_->set_delegate(this);
popup_button_ = button;