Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 11821036: Fixes couple of bugs in the TabStrip that could cause tabs to dance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 4dd522794576b55daa66993fc2cac656977e97d7..642cbc9d6f2228773ac55fbaed949fbda5443121 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -364,7 +364,6 @@ TabDragController::TabDragController()
attached_tabstrip_(NULL),
screen_(NULL),
host_desktop_type_(chrome::HOST_DESKTOP_TYPE_NATIVE),
- source_tab_offset_(0),
offset_to_width_ratio_(0),
old_focused_view_(NULL),
last_move_screen_loc_(0),
@@ -431,7 +430,6 @@ void TabDragController::Init(
source_tabstrip->GetWidget()->GetNativeView());
host_desktop_type_ = chrome::GetHostDesktopTypeForNativeView(
source_tabstrip->GetWidget()->GetNativeView());
- source_tab_offset_ = source_tab_offset;
start_point_in_screen_ = gfx::Point(source_tab_offset, mouse_offset.y());
views::View::ConvertPointToScreen(source_tab, &start_point_in_screen_);
mouse_offset_ = mouse_offset;
@@ -453,7 +451,8 @@ void TabDragController::Init(
MessageLoopForUI::current()->AddObserver(this);
if (source_tab->width() > 0) {
- offset_to_width_ratio_ = static_cast<float>(source_tab_offset_) /
+ offset_to_width_ratio_ = static_cast<float>(
+ source_tab->GetMirroredXInView(source_tab_offset)) /
static_cast<float>(source_tab->width());
}
InitWindowCreatePoint();
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698