| Index: chrome/browser/ui/views/tabs/base_tab.cc
|
| diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
|
| index 81e6038938df546fc8bda80f51749451b144983a..b94fbf12421d4e23b6f10286c3ebe8ec61af0fce 100644
|
| --- a/chrome/browser/ui/views/tabs/base_tab.cc
|
| +++ b/chrome/browser/ui/views/tabs/base_tab.cc
|
| @@ -52,21 +52,22 @@ class BaseTab::TabCloseButton : public views::ImageButton {
|
| virtual ~TabCloseButton() {}
|
|
|
| // Overridden from views::View.
|
| - virtual View* GetEventHandlerForPoint(const gfx::Point& point) OVERRIDE {
|
| + virtual View* GetEventHandler(const gfx::Rect& rect, EventType type)
|
| + OVERRIDE {
|
| // Ignore the padding set on the button.
|
| - gfx::Rect rect = GetContentsBounds();
|
| - rect.set_x(GetMirroredXForRect(rect));
|
| + gfx::Rect contents_rect = GetContentsBounds();
|
| + contents_rect.set_x(GetMirroredXForRect(contents_rect));
|
|
|
| #if defined(USE_ASH)
|
| // Include the padding in hit-test for touch events.
|
| if (aura::Env::GetInstance()->is_touch_down())
|
| - rect = GetLocalBounds();
|
| + contents_rect = GetLocalBounds();
|
| #elif defined(OS_WIN)
|
| // TODO(sky): Use local-bounds if a touch-point is active.
|
| // http://crbug.com/145258
|
| #endif
|
|
|
| - return rect.Contains(point) ? this : parent();
|
| + return contents_rect.Intersects(rect) ? this : parent();
|
| }
|
|
|
| virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
|
|
|