Skip to content
Snippets Groups Projects
Commit 7bf1a959 authored by sky@chromium.org's avatar sky@chromium.org
Browse files

Fixes bug where we would allow dragging tabs in incognito windows too

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
parent a4734198
No related merge requests found
...@@ -1021,12 +1021,12 @@ gfx::Point DraggedTabController::GetAttachedTabDragPoint( ...@@ -1021,12 +1021,12 @@ gfx::Point DraggedTabController::GetAttachedTabDragPoint(
const gfx::Size& tab_size = attached_tab_->bounds().size(); const gfx::Size& tab_size = attached_tab_->bounds().size();
if (attached_tabstrip_->type() == BaseTabStrip::HORIZONTAL_TAB_STRIP) { 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); x = std::min(std::max(x, 0), max_x);
y = 0; y = 0;
} else { } else {
x = SideTabStrip::kTabStripInset; 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); y = std::min(std::max(y, SideTabStrip::kTabStripInset), max_y);
} }
return gfx::Point(x, y); return gfx::Point(x, y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment