summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 23:36:24 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 23:36:24 +0000
commitc32bca69a02aee3306603e5a211a03dd220f6102 (patch)
tree012dabbcda358e319ab1bd42184ca40ba574892d /chrome/browser/views/tabs
parent448219347191361795210e39ccdca14cfd76a62c (diff)
downloadchromium_src-c32bca69a02aee3306603e5a211a03dd220f6102.zip
chromium_src-c32bca69a02aee3306603e5a211a03dd220f6102.tar.gz
chromium_src-c32bca69a02aee3306603e5a211a03dd220f6102.tar.bz2
This CL fixes issue 6223 - Drag and drop a new tab from RTL Chrome: the docked window usually showing out of current screen
The problem is that the dragged tab view is not rendered correctly in RTL locale. The view should be rendered in a position that the mouse is on tabstrip, which is consistent with the position in which the view will be docked when mouse release. The root cause is the dragged tab view's width is calculated incorrectly in RTL locale. BUG=http://crbug.com/6223 TEST=Open Chrome in Hebrew, drag and drop a tab, observe the tab view while dragging, the view should be rendered in a position that the mouse is on tabstrip. Review URL: http://codereview.chromium.org/115938 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17263 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs')
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_view.cc b/chrome/browser/views/tabs/dragged_tab_view.cc
index 77fd7c7..f3101d9 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/views/tabs/dragged_tab_view.cc
@@ -197,7 +197,10 @@ void DraggedTabView::Layout() {
int left = 0;
if (UILayoutIsRightToLeft())
left = GetPreferredSize().width() - attached_tab_size_.width();
- renderer_->SetBounds(left, 0, left + attached_tab_size_.width(),
+ // The renderer_'s width should be attached_tab_size_.width() in both LTR
+ // and RTL locales. Wrong width will cause the wrong positioning of the tab
+ // view in dragging. Please refer to http://crbug.com/6223 for details.
+ renderer_->SetBounds(left, 0, attached_tab_size_.width(),
attached_tab_size_.height());
}
}