Chromium Code Reviews| Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc |
| diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc |
| index 7713dc478595c7b4d7bd2b4784ddbbfb2ae0c5e2..8851c4bc491d69c0e36213d381f071148627ff03 100644 |
| --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc |
| +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc |
| @@ -290,7 +290,7 @@ void OpaqueBrowserFrameView::UpdateWindowTitle() { |
| /////////////////////////////////////////////////////////////////////////////// |
| // OpaqueBrowserFrameView, views::View overrides: |
| -bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const { |
| +bool OpaqueBrowserFrameView::HitTestRect(const gfx::RectF& rect) const { |
| if (!views::View::HitTestRect(rect)) { |
| // |rect| is outside OpaqueBrowserFrameView's bounds. |
| return false; |
| @@ -311,10 +311,8 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const { |
| if (!tabstrip || !browser_view()->IsTabStripVisible()) |
| return false; |
| - 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); |
| + gfx::RectF rect_in_tabstrip_coords(rect); |
| + View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords); |
| if (rect_in_tabstrip_coords.bottom() > tabstrip->GetLocalBounds().bottom()) { |
| // |rect| is below the tabstrip. |
| return false; |
| @@ -333,10 +331,7 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const { |
| gfx::RectF rect_in_window_switcher_coords_f(rect); |
|
tdresser
2014/05/02 13:19:06
|rect_in_window_switcher_coords_f| should probably
|
| View::ConvertRectToTarget(this, window_switcher_button, |
| &rect_in_window_switcher_coords_f); |
| - gfx::Rect rect_in_window_switcher_coords = gfx::ToEnclosingRect( |
| - rect_in_window_switcher_coords_f); |
| - |
| - if (window_switcher_button->HitTestRect(rect_in_window_switcher_coords)) |
| + if (window_switcher_button->HitTestRect(rect_in_window_switcher_coords_f)) |
| return false; |
| } |