diff options
author | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-08 19:24:17 +0000 |
---|---|---|
committer | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-08 19:24:17 +0000 |
commit | b3d58694a22714a224d940c5cde1fa822fccc930 (patch) | |
tree | cc8078482c86180be3aa9d98620d163361aa9bd3 /ash/sticky_keys/sticky_keys_controller.cc | |
parent | 1e3fbf7bbe7b9a4a4e702c576b5d8dc5ad652da0 (diff) | |
download | chromium_src-b3d58694a22714a224d940c5cde1fa822fccc930.zip chromium_src-b3d58694a22714a224d940c5cde1fa822fccc930.tar.gz chromium_src-b3d58694a22714a224d940c5cde1fa822fccc930.tar.bz2 |
Revert of Fix sticky keys crash when handling synthetic events without a native event. (https://codereview.chromium.org/227113009/)
Reason for revert:
Breaks compile on Linux ChromiumOS (Clang dbg)
.../sticky_keys_unittest.cc:848:3:error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
dispatcher->OnEventFromSource(kev.get());
(and 2 more)
link: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20%28Clang%20dbg%29/builds/922/
Original issue's description:
> Fix sticky keys crash when handling synthetic events without a native event.
>
> BUG=358270
> TEST=modified tests
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262465
TBR=sadrul@chromium.org,tengs@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=358270
Review URL: https://codereview.chromium.org/229053002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/sticky_keys/sticky_keys_controller.cc')
-rw-r--r-- | ash/sticky_keys/sticky_keys_controller.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ash/sticky_keys/sticky_keys_controller.cc b/ash/sticky_keys/sticky_keys_controller.cc index 45c1248..e5bb0af 100644 --- a/ash/sticky_keys/sticky_keys_controller.cc +++ b/ash/sticky_keys/sticky_keys_controller.cc @@ -69,18 +69,10 @@ void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event, DCHECK(target); // We need to send a new, untransformed mouse event to the host. if (event->IsMouseWheelEvent()) { - aura::Window* source = static_cast<aura::Window*>(event->target()); - ui::MouseWheelEvent new_event(*static_cast<ui::MouseWheelEvent*>(event), - source, - source->GetRootWindow()); - // Transform the location back to host coordinates before dispatching. - new_event.UpdateForRootTransform(source->GetHost()->GetRootTransform()); + ui::MouseWheelEvent new_event(event->native_event()); DispatchEvent(&new_event, target); } else { - aura::Window* source = static_cast<aura::Window*>(event->target()); - ui::MouseEvent new_event(*event, source, source->GetRootWindow()); - // Transform the location back to host coordinates before dispatching. - new_event.UpdateForRootTransform(source->GetHost()->GetRootTransform()); + ui::MouseEvent new_event(event->native_event()); DispatchEvent(&new_event, target); } } |