New issue
Advanced search Search tips

Issue 752380 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Sign in to add a comment

use hit-test host from mus-ws

Project Member Reported by riajiang@chromium.org, Aug 4 2017

Issue description

(as summary)
 
Blockedon: 755546

Comment 2 by varkha@chromium.org, Aug 15 2017

Blocking: 710016
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 18 2017

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

commit 7f479e36e49962c560c2d8631b97bfd12224b23d
Author: Ria Jiang <riajiang@chromium.org>
Date: Fri Aug 18 02:17:04 2017

Use HitTestQuery in EventTargeter in mus-ws.

Get the HitTestQuery associated with the display a location is in and
use that HTQ to find the target for that location.

Next step:
We can get the transformed location in the coord-space of the target
from HitTestQuery but many places assume it's still location-in-root,
e.g. EventDispatcher::AdjustLocationTargetForModal,
EventDispatcher::DispatchToClient etc.. Refactor them to do the transform
from location-in-target if transform is necessary to make use of
LocationTarget::location_in_target.

Bug: 752380
Test: services_unittest
Change-Id: Ic0791c4c41ca85046c96f561848c103e22b50900
Reviewed-on: https://chromium-review.googlesource.com/607596
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495428}
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/common/switches.cc
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/common/switches.h
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/BUILD.gn
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_dispatcher.cc
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_dispatcher.h
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_dispatcher_delegate.h
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_dispatcher_unittest.cc
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_targeter.cc
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_targeter.h
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/event_targeter_delegate.h
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/window_manager_state.cc
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/window_manager_state.h
[modify] https://crrev.com/7f479e36e49962c560c2d8631b97bfd12224b23d/services/ui/ws/window_manager_state_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 18 2017

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

commit 51cd352c9ba89e71e698a83f1781d597d712b4f7
Author: Ria Jiang <riajiang@chromium.org>
Date: Fri Aug 18 18:32:42 2017

Change mus-ws to use viz::HostFrameSinkManager.

1. WS is not a viz::mojom::FrameSinkManagerClient anymore, instead it
now owns a viz::HostFrameSinkManager. Before it was talking to
FrameSinkManager through FrameSinkManagerClientBinding, but now it's
through the new host_frame_sink_manager_. It creates the
FrameSinkManager and set that as the manager for the
host_frame_sink_manager_.

2. ServerWindow is now a viz::HostFrameSinkClient. It registers its
frame_sink_id in ctor and invalidates it in dtor. When it receives
OnFirstSurfaceActivation, it delegates the call out to WS to keep using
the existing WS::OnFirstSurfaceActivation logic. And instead of talking
to FrameSinkManager through ServerWindowCompositorFrameSinkManager,
it now talks through the HostFrameSinkManager in its delegate.

3. Move display_hit_test_query_ map to HostFrameSinkManager so it can
be used by both mus-ws and content. It's owned by HostFrameSinkManager
and associated with the frame_sink_id_ of the root compositor frame
sink.

4. Delete FrameSinkManagerClientBinding,
ServerWindowCompositorFrameSinkManager and WindowServerHitTest as
they are no longer needed.


Bug: 752380
Test: covered by tests
Change-Id: I5caa59008e669f53e44d84bde47cb39276a13935
Reviewed-on: https://chromium-review.googlesource.com/611612
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495628}
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/host/host_frame_sink_manager.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/host/host_frame_sink_manager.h
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/host/host_frame_sink_manager_unittests.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/test/BUILD.gn
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/test/DEPS
[add] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/test/test_frame_sink_manager.cc
[add] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/components/viz/test/test_frame_sink_manager.h
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/service.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/BUILD.gn
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/DEPS
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/event_dispatcher_unittest.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/focus_controller_unittest.cc
[delete] https://crrev.com/3751e40eb241978d4bd46c0b6cb9d8967a026f49/services/ui/ws/frame_sink_manager_client_binding.cc
[delete] https://crrev.com/3751e40eb241978d4bd46c0b6cb9d8967a026f49/services/ui/ws/frame_sink_manager_client_binding.h
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/server_window.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/server_window.h
[delete] https://crrev.com/3751e40eb241978d4bd46c0b6cb9d8967a026f49/services/ui/ws/server_window_compositor_frame_sink_manager.cc
[delete] https://crrev.com/3751e40eb241978d4bd46c0b6cb9d8967a026f49/services/ui/ws/server_window_compositor_frame_sink_manager.h
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/server_window_delegate.h
[delete] https://crrev.com/3751e40eb241978d4bd46c0b6cb9d8967a026f49/services/ui/ws/test_frame_sink_manager.h
[add] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/test_gpu_host.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/test_gpu_host.h
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/test_server_window_delegate.h
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/test_utils.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/window_finder_unittest.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/window_manager_state.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/window_server.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/window_server.h
[delete] https://crrev.com/3751e40eb241978d4bd46c0b6cb9d8967a026f49/services/ui/ws/window_server_hit_test_unittest.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/window_server_test_impl.cc
[modify] https://crrev.com/51cd352c9ba89e71e698a83f1781d597d712b4f7/services/ui/ws/window_tree.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 13 2017

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

commit 5be06c0804fa5cbf2a87de870a84a711c0d82baa
Author: Ria Jiang <riajiang@chromium.org>
Date: Wed Sep 13 15:22:25 2017

Drop the event when the target window has been deleted.

In the viz-hit-test case, when we cannot find the target window in
EventTargeter, we were using NOTREACHED before this CL. But there are
cases where the target window has simply been deleted by the time this
event is processed, e.g. clicking the settings button inside system
tray's network page, mouse move events after that but before the system
tray goes away would fail. In these cases, it makes sense to just drop
the event like we did in non-viz hit-test. Kept the TODO to investigate
if it can be a security fault when no target window is found.

Also fixes a memory exception in HTQ when using the transform directly.

Bug: 752380
Change-Id: Ifa099c88a98d623b8be363fe3a77b7bc8eea4a54
Reviewed-on: https://chromium-review.googlesource.com/651564
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501636}
[modify] https://crrev.com/5be06c0804fa5cbf2a87de870a84a711c0d82baa/components/viz/service/hit_test/hit_test_aggregator.cc
[modify] https://crrev.com/5be06c0804fa5cbf2a87de870a84a711c0d82baa/services/ui/ws/event_targeter.cc
[modify] https://crrev.com/5be06c0804fa5cbf2a87de870a84a711c0d82baa/tools/metrics/actions/actions.xml
[modify] https://crrev.com/5be06c0804fa5cbf2a87de870a84a711c0d82baa/ui/gfx/transform.h

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 23 2017

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

commit a16998be390d597825ce8432c2fe077a62f819c4
Author: Ria Jiang <riajiang@chromium.org>
Date: Mon Oct 23 23:16:07 2017

Use the correct client_window_id in ws::GetUnknownWindowsFrom.

In ws::GetUnknownWindowsFrom, we were using window_id as the
client_window_id. However, window_id and client_window_id are not
necessarily the same; in which case we end up with the wrong
client_window_id. Change that to get the frame_sink_id from window
which has the same value as client_window_id.

This also updates MakeClientWindowId to only take in transport id,
not WindowId anymore(which was error-prone).

Bug: 752380
Test: covered by tests
Change-Id: Icdc8e892691c4da0fd44acfec6f5636f3249226b
Reviewed-on: https://chromium-review.googlesource.com/729260
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510956}
[modify] https://crrev.com/a16998be390d597825ce8432c2fe077a62f819c4/services/ui/ws/server_window.h
[modify] https://crrev.com/a16998be390d597825ce8432c2fe077a62f819c4/services/ui/ws/window_manager_state_unittest.cc
[modify] https://crrev.com/a16998be390d597825ce8432c2fe077a62f819c4/services/ui/ws/window_tree.cc
[modify] https://crrev.com/a16998be390d597825ce8432c2fe077a62f819c4/services/ui/ws/window_tree.h
[modify] https://crrev.com/a16998be390d597825ce8432c2fe077a62f819c4/services/ui/ws/window_tree_client_unittest.cc
[modify] https://crrev.com/a16998be390d597825ce8432c2fe077a62f819c4/services/ui/ws/window_tree_unittest.cc

Blockedon: 788185

Comment 8 by sky@chromium.org, Jan 8 2018

Blocking: 799238
Components: -Internals>MUS Internals>Services>WindowService
Labels: -Proj-Mustash-Mus-WS
Deprecating label Proj-Mustash-Mus-WS in favor of Components.
Labels: -Proj-Mustash-Mus
Migrating Proj-Mustash-Mus to components Internals>Services>WindowService and Internals>Services>Ash

Labels: -Proj-Mustash Proj-Mash-MultiProcess

Sign in to add a comment