| Index: ui/views/widget/root_view.cc
|
| diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
|
| index 7f72a26bbcc0ccb1a6f471d340bdfa4a5b72c5b9..ff1294ae9f776ca0cd17acde66aea875292c6265 100644
|
| --- a/ui/views/widget/root_view.cc
|
| +++ b/ui/views/widget/root_view.cc
|
| @@ -157,7 +157,6 @@
|
| mouse_move_handler_(NULL),
|
| last_click_handler_(NULL),
|
| explicit_mouse_handler_(false),
|
| - clear_mouse_handler_on_release_(true),
|
| last_mouse_event_flags_(0),
|
| last_mouse_event_x_(-1),
|
| last_mouse_event_y_(-1),
|
| @@ -442,8 +441,7 @@
|
| // We allow the view to delete us from the event dispatch callback. As such,
|
| // configure state such that we're done first, then call View.
|
| View* mouse_pressed_handler = mouse_pressed_handler_;
|
| - if (clear_mouse_handler_on_release_)
|
| - SetMouseHandler(nullptr);
|
| + SetMouseHandler(NULL);
|
| ui::EventDispatchDetails dispatch_details =
|
| DispatchEvent(mouse_pressed_handler, &mouse_released);
|
| if (dispatch_details.dispatcher_destroyed)
|
| @@ -594,7 +592,11 @@
|
| }
|
|
|
| void RootView::SetMouseHandler(View* new_mh) {
|
| - SetMouseHandler(new_mh, true /* clear_on_release */);
|
| + // If we're clearing the mouse handler, clear explicit_mouse_handler_ as well.
|
| + explicit_mouse_handler_ = (new_mh != NULL);
|
| + mouse_pressed_handler_ = new_mh;
|
| + gesture_handler_ = new_mh;
|
| + drag_info_.Reset();
|
| }
|
|
|
| void RootView::GetAccessibleState(ui::AXViewState* state) {
|
| @@ -634,7 +636,6 @@
|
| // handlers are reset, so that after it is reshown, events are not captured
|
| // by old handlers.
|
| explicit_mouse_handler_ = false;
|
| - clear_mouse_handler_on_release_ = true;
|
| mouse_pressed_handler_ = NULL;
|
| mouse_move_handler_ = NULL;
|
| gesture_handler_ = NULL;
|
| @@ -704,15 +705,6 @@
|
| return ui::EventDispatchDetails();
|
| }
|
|
|
| -void RootView::SetMouseHandler(View* new_mh, bool clear_on_release) {
|
| - // If we're clearing the mouse handler, clear explicit_mouse_handler_ as well.
|
| - explicit_mouse_handler_ = (new_mh != nullptr);
|
| - clear_mouse_handler_on_release_ = clear_on_release;
|
| - mouse_pressed_handler_ = new_mh;
|
| - gesture_handler_ = new_mh;
|
| - drag_info_.Reset();
|
| -}
|
| -
|
| bool RootView::CanDispatchToTarget(ui::EventTarget* target) {
|
| return event_dispatch_target_ == target;
|
| }
|
|
|