Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc |
| index 7904459102dd2beec0efd228970f59c3c0736c85..1cb2097aec66cb97299658cc7d768bf02148db8a 100644 |
| --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc |
| +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc |
| @@ -400,21 +400,26 @@ bool BrowserNonClientFrameViewAsh::DoesIntersectRect( |
| return false; |
| } |
| - TabStrip* tabstrip = browser_view()->tabstrip(); |
| - if (!tabstrip || !browser_view()->IsTabStripVisible()) { |
| + if (!browser_view()->IsTabStripVisible()) { |
| // Claim |rect| if it is above the top of the topmost client area view. |
| return rect.y() < GetTopInset(false); |
| } |
| - // Claim |rect| if it is above the bottom of the tabstrip in a non-tab |
| - // portion. |
| + // Claim |rect| only if it is above the bottom of the tabstrip in a non-tab |
| + // portion. In particular, the avatar label/button is left of the tabstrip and |
| + // the window controls are right of the tabstrip. |
| + TabStrip* tabstrip = browser_view()->tabstrip(); |
| gfx::RectF rect_in_tabstrip_coords_f(rect); |
| View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f); |
| const gfx::Rect rect_in_tabstrip_coords( |
| gfx::ToEnclosingRect(rect_in_tabstrip_coords_f)); |
| - return (rect_in_tabstrip_coords.y() <= tabstrip->height()) && |
| - (!tabstrip->HitTestRect(rect_in_tabstrip_coords) || |
| - tabstrip->IsRectInWindowCaption(rect_in_tabstrip_coords)); |
| + if (rect_in_tabstrip_coords.y() > tabstrip->height()) { |
| + // |rect| is entirely below the tabstrip. |
|
Peter Kasting
2016/03/14 23:04:42
Nit: To me this comment basically restates the cod
tdanderson
2016/03/15 15:51:42
Done.
|
| + return false; |
| + } |
| + |
| + return !tabstrip->HitTestRect(rect_in_tabstrip_coords) || |
| + tabstrip->IsRectInWindowCaption(rect_in_tabstrip_coords); |
| } |
| int BrowserNonClientFrameViewAsh::GetTabStripLeftInset() const { |