Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc |
| index f6d60c8c5d9ff23eece0a803aa3bdb528785dec1..0e405a568812f2f3d88d62a220fd5281a173595b 100644 |
| --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc |
| +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc |
| @@ -388,24 +388,25 @@ bool BrowserNonClientFrameViewMus::DoesIntersectRect( |
| return false; |
| } |
| - TabStrip* tabstrip = browser_view()->tabstrip(); |
| - if (tabstrip && browser_view()->IsTabStripVisible()) { |
| - // Claim |rect| only if it is above the bottom of the tabstrip in a non-tab |
| - // portion. |
| - gfx::RectF rect_in_tabstrip_coords_f(rect); |
| - View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f); |
| - gfx::Rect rect_in_tabstrip_coords = |
| - gfx::ToEnclosingRect(rect_in_tabstrip_coords_f); |
| - |
| - if (rect_in_tabstrip_coords.y() > tabstrip->height()) |
| - return false; |
| - |
| - return !tabstrip->HitTestRect(rect_in_tabstrip_coords) || |
| - tabstrip->IsRectInWindowCaption(rect_in_tabstrip_coords); |
| + if (!browser_view()->IsTabStripVisible()) { |
| + // Claim |rect| if it is above the top of the topmost view in the client |
| + // area. |
| + return rect.y() < GetTopInset(false); |
| } |
| - // Claim |rect| if it is above the top of the topmost view in the client area. |
| - return rect.y() < GetTopInset(false); |
| + // Claim |rect| only if it is above the bottom of the tabstrip in a non-tab |
| + // portion. |
| + TabStrip* tabstrip = browser_view()->tabstrip(); |
| + gfx::RectF rect_in_tabstrip_coords_f(rect); |
| + View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f); |
| + gfx::Rect rect_in_tabstrip_coords = |
| + gfx::ToEnclosingRect(rect_in_tabstrip_coords_f); |
| + |
| + if (rect_in_tabstrip_coords.y() > tabstrip->height()) |
| + return false; |
| + |
| + return !tabstrip->HitTestRect(rect_in_tabstrip_coords) || |
| + tabstrip->IsRectInWindowCaption(rect_in_tabstrip_coords); |
|
Peter Kasting
2016/03/11 22:19:50
This is functionally equivalent to the Ash code bu
tdanderson
2016/03/14 20:38:33
Done.
|
| } |
| int BrowserNonClientFrameViewMus::GetTabStripLeftInset() const { |