diff options
author | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 00:29:29 +0000 |
---|---|---|
committer | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 00:29:29 +0000 |
commit | cc86ad48c5356770901273c4a423ffe9ec1afb46 (patch) | |
tree | d073aa9905c763cbd4fa0b75d64ecfac2fbc6ebb | |
parent | b0ea0b7fb7de56e777995ebeef678d80d2f2dc01 (diff) | |
download | chromium_src-cc86ad48c5356770901273c4a423ffe9ec1afb46.zip chromium_src-cc86ad48c5356770901273c4a423ffe9ec1afb46.tar.gz chromium_src-cc86ad48c5356770901273c4a423ffe9ec1afb46.tar.bz2 |
Drag and drop for extension in RTL wasn't working properly.
ExtensionShelf::ToolstripAtX would never find a toolstrip for any value of x (or would find wrong one).
BUG=11880
TEST=Load chrome with --lang=he, add 2-3 extensions and try dragging and switching their positions. It should work as LTR.
Review URL: http://codereview.chromium.org/204015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26188 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/extensions/extension_shelf.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/views/extensions/extension_shelf.cc b/chrome/browser/views/extensions/extension_shelf.cc index 91c20b6..8999434 100644 --- a/chrome/browser/views/extensions/extension_shelf.cc +++ b/chrome/browser/views/extensions/extension_shelf.cc @@ -981,7 +981,8 @@ ExtensionShelf::Toolstrip* ExtensionShelf::ToolstripAtX(int x) { for (int i = 0; i < count; ++i) { Toolstrip* toolstrip = ToolstripAtIndex(i); View* view = toolstrip->GetShelfView(); - if (x > (view->x() + view->width() + kToolstripPadding)) + int x_mirrored = view->GetRootView()->MirroredXCoordinateInsideView(x); + if (x_mirrored > view->x() + view->width() + kToolstripPadding) continue; return toolstrip; } |