diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 00:09:28 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 00:09:28 +0000 |
commit | b8e78518197f97eebb4606e2b7105e6747b86e9e (patch) | |
tree | 6336970b563f4ebb5329773f40a4af70a42a0354 /ash | |
parent | 853f8ea50d0af8e5b9955eebde1683a6c837ffa0 (diff) | |
download | chromium_src-b8e78518197f97eebb4606e2b7105e6747b86e9e.zip chromium_src-b8e78518197f97eebb4606e2b7105e6747b86e9e.tar.gz chromium_src-b8e78518197f97eebb4606e2b7105e6747b86e9e.tar.bz2 |
ToplevelWindowEventHandler::HandleMousePressed() has some comments about only handling events post target. Those comments are untrue so remove them.
It is also non trivial to get the originally desired behavior, namely getting mouse events to HTML elements with the "-webkit-app-region" CSS style applied.
BUG=None
TEST=None
Review URL: https://codereview.chromium.org/108723008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/toplevel_window_event_handler.cc | 4 | ||||
-rw-r--r-- | ash/wm/workspace/workspace_event_handler.cc | 6 |
2 files changed, 1 insertions, 9 deletions
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc index e7d4bac..1c12c97 100644 --- a/ash/wm/toplevel_window_event_handler.cc +++ b/ash/wm/toplevel_window_event_handler.cc @@ -386,9 +386,7 @@ void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status) { void ToplevelWindowEventHandler::HandleMousePressed( aura::Window* target, ui::MouseEvent* event) { - // Move/size operations are initiated post-target handling to give the target - // an opportunity to cancel this default behavior by returning ER_HANDLED. - if (ui::EventCanceledDefaultHandling(*event)) + if (event->phase() != ui::EP_PRETARGET) return; // We also update the current window component here because for the diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc index bcd7e9e..a5b514f 100644 --- a/ash/wm/workspace/workspace_event_handler.cc +++ b/ash/wm/workspace/workspace_event_handler.cc @@ -77,12 +77,6 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) { case ui::ET_MOUSE_EXITED: break; case ui::ET_MOUSE_PRESSED: { - // Maximize behavior is implemented as post-target handling so the target - // can cancel it. - if (ui::EventCanceledDefaultHandling(*event)) { - ToplevelWindowEventHandler::OnMouseEvent(event); - return; - } wm::WindowState* target_state = wm::GetWindowState(target); if (event->flags() & ui::EF_IS_DOUBLE_CLICK && event->IsOnlyLeftMouseButton() && |