[go: nahoru, domu]

Avoid two targeting phases in aura client-lib and EventProcessor.

1. Client-lib now skips the step where it converted the event location from
target window's coordinate system to root window's coordinate system; and
sets the target window received from mus-ws to be the target for that event.

2. Added two virtual functions in EventProcessor responsible for getting the
window with the right targeter (either root window or the farthest ancestor
with a targeter set) and for getting the default targeter (WindowTargeter)
respectively.

3. WindowEventDispatcher now is responsible for finding the right target and
doing the conversion between their coordinate systems.

4. WindowTreeHost only sets a targeter for the root window in non-mus mode
so that we don't end up walking all the way up to the root window just to use
the default event targeter.

This also solves the bug where we were using DIP for conversion in the
client-lib but event location was still in pixels at that time.

BUG=687700
TEST=aura_unittests
     manual (--force-device-scale-factor=2)

Review-Url: https://codereview.chromium.org/2681613002
Cr-Original-Commit-Position: refs/heads/master@{#452393}
Committed: https://chromium.googlesource.com/chromium/src/+/6b3d9805494f966193ad47181d39544d541e79f2
Review-Url: https://codereview.chromium.org/2681613002
Cr-Commit-Position: refs/heads/master@{#454530}
27 files changed