Skip to content

Commit

Permalink
Fixes bug where we would allow dragging tabs in incognito windows too
Browse files Browse the repository at this point in the history
far to the right.

BUG=66713
TEST=see bug

Review URL: http://codereview.chromium.org/6023014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70741 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sky@chromium.org committed Jan 7, 2011
1 parent a473419 commit 7bf1a95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/ui/views/tabs/dragged_tab_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1021,12 +1021,12 @@ gfx::Point DraggedTabController::GetAttachedTabDragPoint(
const gfx::Size& tab_size = attached_tab_->bounds().size();

if (attached_tabstrip_->type() == BaseTabStrip::HORIZONTAL_TAB_STRIP) {
int max_x = attached_tabstrip_->bounds().right() - tab_size.width();
int max_x = attached_tabstrip_->width() - tab_size.width();
x = std::min(std::max(x, 0), max_x);
y = 0;
} else {
x = SideTabStrip::kTabStripInset;
int max_y = attached_tabstrip_->bounds().bottom() - tab_size.height();
int max_y = attached_tabstrip_->height() - tab_size.height();
y = std::min(std::max(y, SideTabStrip::kTabStripInset), max_y);
}
return gfx::Point(x, y);
Expand Down

0 comments on commit 7bf1a95

Please sign in to comment.