Index: ui/message_center/views/notification_view.cc |
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc |
index a39b4e4beeed8087e35098b041224f24498d014c..d83b9f431d7b09b2ec1517ad41e36954d8785f7a 100644 |
--- a/ui/message_center/views/notification_view.cc |
+++ b/ui/message_center/views/notification_view.cc |
@@ -685,8 +685,10 @@ void NotificationView::ScrollRectToVisible(const gfx::Rect& rect) { |
views::View::ScrollRectToVisible(GetLocalBounds()); |
} |
-views::View* NotificationView::GetEventHandlerForPoint( |
- const gfx::Point& point) { |
+views::View* NotificationView::GetEventHandlerForRect(const gfx::Rect& rect) { |
+ if (!views::View::UsePointBasedTargeting(rect)) |
+ return views::View::GetEventHandlerForRect(rect); |
+ |
// Want to return this for underlying views, otherwise GetCursor is not |
// called. But buttons are exceptions, they'll have their own event handlings. |
std::vector<views::View*> buttons(action_buttons_); |
@@ -694,10 +696,10 @@ views::View* NotificationView::GetEventHandlerForPoint( |
buttons.push_back(expand_button()); |
for (size_t i = 0; i < buttons.size(); ++i) { |
- gfx::Point point_in_child = point; |
- ConvertPointToTarget(this, buttons[i], &point_in_child); |
- if (buttons[i]->HitTestPoint(point_in_child)) |
- return buttons[i]->GetEventHandlerForPoint(point_in_child); |
+ gfx::Rect rect_in_child = rect; |
+ ConvertRectToTarget(this, buttons[i], &rect_in_child); |
+ if (buttons[i]->HitTestRect(rect_in_child)) |
+ return buttons[i]->GetEventHandlerForRect(rect_in_child); |
} |
return this; |