New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616101 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 609555



Sign in to add a comment

aura::WindowEventDispatcher mutates aura::Env that is checked by OnEvent flow

Project Member Reported by markdittmer@chromium.org, May 31 2016

Issue description

In order for NativeWidgetMus to dispatch events via its own OnEvent flow it needs event handling code to see a consistent state. Currently, that means ensuring that aura::Env contains the correct values for, for example, in-flight mouse events.

E.g.:
If NativeWidgetMus dispatches mouse-pressed events manually via its OnEvent interface, we eventually end up here: https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/widget/widget.cc&q=widget.cc&sq=package:chromium&l=1188, where internal::NativeWidgetPrivate::IsMouseButtonDown() fails because the dispatch flow here: https://code.google.com/p/chromium/codesearch#chromium/src/ui/aura/window_event_dispatcher.cc&l=854 never ran.

In the mus case, we do not wish to exercise the entire WindowEventDispatcher flow, but we do need to keep things in a correct state for the Widget.

After discussing this with sadrul@chromium.org, we planned that WindowEventDispatcher can own an instance of an interface that accesses aura::Env on its behalf. NativeWidgetMus can have its own instance that is will use to ensure consistent state for its event dispatch.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8

commit 9d8d13f5ea46d5f5450aecc28edb3c9613977fd8
Author: sadrul <sadrul@chromium.org>
Date: Mon Jun 20 22:33:05 2016

aura: Introduce EnvInputStateController for updating Env input states.

aura::Env stores some information about the input events (e.g. the latest
location of the mouse cursor, current event-flags, whethere there is any
active touch point).  Move the code that updates these states out of
WindowEventDispatcher into EnvInputStateController, so that it can be
used in NativeWidgetMus to update the Env states (since NativeWidgetMus
will directly dispatch events to Widget, and so WindowEventDispatcher
will not be used).

BUG= 616101 

Review-Url: https://codereview.chromium.org/2080303003
Cr-Commit-Position: refs/heads/master@{#400813}

[modify] https://crrev.com/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8/ui/aura/BUILD.gn
[modify] https://crrev.com/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8/ui/aura/aura.gyp
[add] https://crrev.com/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8/ui/aura/env_input_state_controller.cc
[add] https://crrev.com/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8/ui/aura/env_input_state_controller.h
[modify] https://crrev.com/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8/ui/aura/window_event_dispatcher.cc
[modify] https://crrev.com/9d8d13f5ea46d5f5450aecc28edb3c9613977fd8/ui/aura/window_event_dispatcher.h

Comment 2 by sadrul@chromium.org, Jul 25 2016

Status: Fixed (was: Started)

Sign in to add a comment