UI code needs to prepare HitTestData to accompany CompositorFrame instances for submission to viz
WIP CL at https://codereview.chromium.org/2972963002/
A design doc for Aura UI hit-test data collection at https://docs.google.com/document/d/1ruwo-mqyh2bPG1MGnbXHqyF7lLj5yKPrBdqVaU0y9F4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8 commit cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Mon Jul 24 20:00:45 2017 [mus+ash] Refactors EasyResizeWindowTargeter for Mus hittest Aura client This is the first step as separated from https://codereview.chromium.org/2972963002/ Adds a virtual WindowTargeter::GetHitTestRects and starts implementing other targeting methods in terms of that. BUG= 732395 TEST=covered by existing tests Change-Id: I58bf9c3607576a51ac0d2ccf46ca822f575de4d7 Reviewed-on: https://chromium-review.googlesource.com/565764 Reviewed-by: Michael Wasserman <msw@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Cr-Commit-Position: refs/heads/master@{#489056} [modify] https://crrev.com/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8/chrome/browser/ui/views/apps/app_window_easy_resize_window_targeter.cc [modify] https://crrev.com/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8/chrome/browser/ui/views/apps/app_window_easy_resize_window_targeter.h [modify] https://crrev.com/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8/ui/aura/window_targeter.cc [modify] https://crrev.com/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8/ui/aura/window_targeter.h [modify] https://crrev.com/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8/ui/wm/core/easy_resize_window_targeter.cc [modify] https://crrev.com/cac5e0c1ed5c843c7c258bcfe8594bf261e69ea8/ui/wm/core/easy_resize_window_targeter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8 commit 94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Wed Jul 26 02:19:50 2017 [mus+ash] Refactors BubbleWindowTargeter, SearchBoxWindowTargeter and TouchHandleWindowTargeter Original idea was to convert MaskedWindowTargeter subclasses to be subclasses of the enhanced WindowTargeter instead. However the such subclasses are not really needed anymore: BubbleWindowTargeter was used for app-list and system tray menu bubble when they could be anchored to the shelf with a visible arrow tip. This functionality is no longer necessary. SearchBoxWindowTargeter was used on a search box in app-list preventing clicks on a shadow from reaching the search box. The shadow is small enough and doesn't seem to warrant special treatment. Also the UI elements are no longer positioned directly next to the search box making this special case unnecessary. TouchHandleWindowTargeter conversion relies on the observation that GetWidgetHitTestMask() returns the same bounds as the widget bounds when offset by the cursor height and a small padding (kSelectionHandleVerticalVisualOffset). This CL follows a plan in https://docs.google.com/document/d/1ruwo-mqyh2bPG1MGnbXHqyF7lLj5yKPrBdqVaU0y9F4/edit#heading=h.ido2dtmpweg5 Bug: 732395 Change-Id: I28992032573b4f607bc87504917691ca3f5dd047 Reviewed-on: https://chromium-review.googlesource.com/567486 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Cr-Commit-Position: refs/heads/master@{#489531} [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/app_list/views/app_list_view.cc [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/aura/window_targeter.cc [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/aura/window_targeter.h [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/views/BUILD.gn [delete] https://crrev.com/2dc1b0f5d089cd78bf907b38be2aeb53f40648fe/ui/views/bubble/bubble_window_targeter.cc [delete] https://crrev.com/2dc1b0f5d089cd78bf907b38be2aeb53f40648fe/ui/views/bubble/bubble_window_targeter.h [delete] https://crrev.com/2dc1b0f5d089cd78bf907b38be2aeb53f40648fe/ui/views/bubble/bubble_window_targeter_unittest.cc [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/views/bubble/tray_bubble_view.cc [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/views/touchui/touch_selection_controller_impl.cc [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/wm/core/easy_resize_window_targeter.cc [modify] https://crrev.com/94dd7ba523b1b8e10ca1c50086ef0aae157cf3b8/ui/wm/core/easy_resize_window_targeter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/513ac8fd957334bf85dce65423f1b8727b91f092 commit 513ac8fd957334bf85dce65423f1b8727b91f092 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Wed Aug 02 23:09:23 2017 [mus+ash] Implements hit-test client in Aura Implements HitTestDataProvider for Mus and wire it to ClientLayerTreeFrameSink. HitTestDataProviderMus makes use of refactored WindowTargeter::GetHitTestData() to get the hit test rectangles from a window and associates those with the window ID and transform before passing it to compositor. Bug: 732395 Test: aura_unittests --gtest_filter=*HitTestDataProviderMusTest* Change-Id: Id492e53527387e9e91bf474cfb2bdea7548063ad Reviewed-on: https://chromium-review.googlesource.com/574882 Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Cr-Commit-Position: refs/heads/master@{#491544} [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/components/viz/client/BUILD.gn [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/components/viz/client/DEPS [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/components/viz/client/client_layer_tree_frame_sink.cc [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/components/viz/client/client_layer_tree_frame_sink.h [add] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/components/viz/client/hit_test_data_provider.h [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/content/renderer/mus/renderer_window_tree_client.cc [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/content/renderer/render_thread_impl.cc [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/services/viz/public/interfaces/hit_test/hit_test_region_list.mojom [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/BUILD.gn [add] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/mus/hit_test_data_provider_aura.cc [add] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/mus/hit_test_data_provider_aura.h [add] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/mus/hit_test_data_provider_aura_unittest.cc [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/mus/window_mus.h [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/mus/window_port_mus.cc [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/mus/window_port_mus.h [modify] https://crrev.com/513ac8fd957334bf85dce65423f1b8727b91f092/ui/aura/window.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee788f72ed36de883a2b02e38036d0f5306258a0 commit ee788f72ed36de883a2b02e38036d0f5306258a0 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Fri Aug 11 22:17:08 2017 Refactors setShape internal API to use a list of Rects This CL changes the internal method signatures to accept and retain a list of hit-test rects in preparation for using it in ShapedAppWindowTargeter. Currently a list of rects is sent via app.currentWindowInternal.setShape API and converted to a region. The region is then used to implement the hit-testing logic with the help of SkRegion::getBoundaryPath. The plan is to change that and use the list of rectangles directly to generate hit-test region data for hit-testing in mus. The next step will add ability of WindowTargeter classes to return multiple hit-test rects and not just 2 as currently (mouse + touch). Bug: 732395 Change-Id: Ib38eaf4f9d54db40034db5fec1fb4b9b03af0898 Reviewed-on: https://chromium-review.googlesource.com/611029 Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#493867} [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/views/apps/chrome_native_app_window_views.h [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/views/apps/shaped_app_window_targeter.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/browser/app_window/app_window.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/browser/app_window/app_window.h [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/browser/app_window/native_app_window.h [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/components/native_app_window/native_app_window_views.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/components/native_app_window/native_app_window_views.h [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/shell/browser/shell_native_app_window.cc [modify] https://crrev.com/ee788f72ed36de883a2b02e38036d0f5306258a0/extensions/shell/browser/shell_native_app_window.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/34a586367ccf31babc17b9223357a497e9fdd798 commit 34a586367ccf31babc17b9223357a497e9fdd798 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Wed Aug 16 16:25:48 2017 Updates ShapedAppWindowTargeter and removes MaskedWindowTargeter Makes ShapedAppWindowTargeter inherit from WindowTargeter and fases out MaskedWindowTargeter. ShapedAppWindowTargeter implementation now simply returns shape_rects() that are set on the AppWindow. They are then used both in classic event handling by WindowTargeter implementation and in mus+ash by the HitTestDataProviderAura. Bug: 732395 Test: Added aura_unittests --gtest_filter=HitTestDataProviderAuraTest.HoleTargeter Change-Id: I1e127808a4841ff2444fc7de6f53ff0e887120c2 Reviewed-on: https://chromium-review.googlesource.com/612154 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Cr-Commit-Position: refs/heads/master@{#494811} [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/chrome/browser/ui/views/apps/shaped_app_window_targeter.cc [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/chrome/browser/ui/views/apps/shaped_app_window_targeter.h [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/ui/aura/mus/hit_test_data_provider_aura.cc [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/ui/aura/mus/hit_test_data_provider_aura_unittest.cc [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/ui/aura/window_targeter.cc [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/ui/aura/window_targeter.h [modify] https://crrev.com/34a586367ccf31babc17b9223357a497e9fdd798/ui/wm/BUILD.gn [delete] https://crrev.com/a604b6e8d467a2c9a9dc134b1ca6f729b410052f/ui/wm/core/masked_window_targeter.cc [delete] https://crrev.com/a604b6e8d467a2c9a9dc134b1ca6f729b410052f/ui/wm/core/masked_window_targeter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fe63eaeda9718cb1e0c6df4da528f75459349387 commit fe63eaeda9718cb1e0c6df4da528f75459349387 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Wed Aug 23 19:11:10 2017 Adds optional frame sink id to HitTestRegion Adds ui::Layer::GetPrimarySurfaceInfo and uses it in HitTestDataProviderAura to figure out if a window is embedding a client surface. If it is, surface_id is set to a valid value, otherwise we should be using a frame_sink_id that would be valid. Adds frame_sink_id field to HitTestRegion. Bug: 732395 Change-Id: Ic35e4cc9b76df888bb87925dc2559b10f135482f Reviewed-on: https://chromium-review.googlesource.com/626537 Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Cr-Commit-Position: refs/heads/master@{#496761} [modify] https://crrev.com/fe63eaeda9718cb1e0c6df4da528f75459349387/services/viz/public/interfaces/hit_test/hit_test_region_list.mojom [modify] https://crrev.com/fe63eaeda9718cb1e0c6df4da528f75459349387/ui/aura/mus/hit_test_data_provider_aura.cc [modify] https://crrev.com/fe63eaeda9718cb1e0c6df4da528f75459349387/ui/aura/mus/hit_test_data_provider_aura_unittest.cc [modify] https://crrev.com/fe63eaeda9718cb1e0c6df4da528f75459349387/ui/compositor/layer.cc [modify] https://crrev.com/fe63eaeda9718cb1e0c6df4da528f75459349387/ui/compositor/layer.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e90dcec82320fe7bca4959e499abff4db1f9f464 commit e90dcec82320fe7bca4959e499abff4db1f9f464 Author: Ria Jiang <riajiang@chromium.org> Date: Tue Aug 29 17:14:27 2017 Get valid FrameSinkId from WindowPortMus to use in hit-test data. WindowPortMus::frame_sink_id_ is only set if it's embedding another client, so getting that value to use in HitTestDataProviderAura results in invalid frame_sink_id in other cases. Since FrameSinkId is allocated by clients now, add a GetFrameSinkId in WindowPortMus to check if frame_sink_id_ is valid and create one with client_id 0 and sink_id of the value of server_id if it's not valid. Add a DCHECK in HitTestDataProviderAura to make sure we get valid FrameSinkId from WindowPortMus. Bug: 732395 Test: aura_unittests Change-Id: I3ce853140a80c296815bf406aef382a8c40d8e6e Reviewed-on: https://chromium-review.googlesource.com/641390 Commit-Queue: Ria Jiang <riajiang@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#498148} [modify] https://crrev.com/e90dcec82320fe7bca4959e499abff4db1f9f464/ui/aura/mus/hit_test_data_provider_aura.cc [modify] https://crrev.com/e90dcec82320fe7bca4959e499abff4db1f9f464/ui/aura/mus/hit_test_data_provider_aura_unittest.cc [modify] https://crrev.com/e90dcec82320fe7bca4959e499abff4db1f9f464/ui/aura/mus/window_port_mus.cc [modify] https://crrev.com/e90dcec82320fe7bca4959e499abff4db1f9f464/ui/aura/mus/window_port_mus.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1493748cbc94c059e949b4073190669c0a400e54 commit 1493748cbc94c059e949b4073190669c0a400e54 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Wed Aug 30 20:07:27 2017 Populates fields in HitTestRegionList The regions elements contained flags and bounds but we missed populating those fields on the parent HitTestRegionList structure. This CL corrects that. Bug: 732395 Change-Id: Ic214b0d2d7d465920088192aebda328616bc871a Reviewed-on: https://chromium-review.googlesource.com/641661 Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#498583} [modify] https://crrev.com/1493748cbc94c059e949b4073190669c0a400e54/components/viz/client/hit_test_data_provider.h [modify] https://crrev.com/1493748cbc94c059e949b4073190669c0a400e54/ui/aura/mus/hit_test_data_provider_aura.cc [modify] https://crrev.com/1493748cbc94c059e949b4073190669c0a400e54/ui/aura/mus/hit_test_data_provider_aura_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6 commit a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6 Author: Ria Jiang <riajiang@chromium.org> Date: Thu Aug 31 00:00:54 2017 Add GetFrameSinkId to aura::Window and use in HitTestDataProviderAura. Add GetFrameSinkId to aura::Window and virtual GetFrameSinkId in WindowPort. Change HitTestDataProviderAura to not create a WindowPortMus out of an aura::Window and just call GetFrameSinkId on that directly. Bug: 732395 Test: aura_unittests Change-Id: If6c1dc4275e69d8ec7190f4be26afa7d556d9796 Reviewed-on: https://chromium-review.googlesource.com/641938 Commit-Queue: Ria Jiang <riajiang@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#498679} [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/local/window_port_local.cc [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/local/window_port_local.h [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/mus/DEPS [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/mus/hit_test_data_provider_aura.cc [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/mus/hit_test_data_provider_aura_unittest.cc [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/mus/window_port_mus.cc [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/mus/window_port_mus.h [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/window.cc [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/window.h [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/window_port.h [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/window_port_for_shutdown.cc [modify] https://crrev.com/a809d1dc3bf2b01ebb3238d78f53e33ccf32d1a6/ui/aura/window_port_for_shutdown.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f022dc423995bb440589cc204d02b39dc9401317 commit f022dc423995bb440589cc204d02b39dc9401317 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Sat Sep 09 01:12:58 2017 Correctly uses WindowTargeter of a child with Mus WindowTargeter (used in classic event targeting) is correctly using child's targeter when it is set. Mus hit-testing implementation was failing to use it resulting in wrong set of rectangles sent to Viz when using ShapedWindowTargeter with shaped windows using setShape API. confirm that the rectangles sent to Viz are masked to 50x100 bounds. Bug: 732395 Test: Using http://springfield.wat.corp.google.com/stuff/chrome-apps-test/window-set-shape/ Change-Id: I248c3f93687dba6eaf11b35ea4f1a4044e53914c Reviewed-on: https://chromium-review.googlesource.com/656202 Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#500769} [modify] https://crrev.com/f022dc423995bb440589cc204d02b39dc9401317/ui/aura/hit_test_data_provider_aura.cc [modify] https://crrev.com/f022dc423995bb440589cc204d02b39dc9401317/ui/aura/hit_test_data_provider_aura_unittest.cc
Fixed % bug 766174 .
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6d215f7a306eb85a15b1f5c710264e9b18e5b439 commit 6d215f7a306eb85a15b1f5c710264e9b18e5b439 Author: Valery Arkhangorodsky <varkha@chromium.org> Date: Tue Oct 03 14:20:43 2017 Reimplements ResizeHandleWindowTargeter using GetHitTestRects Refactors ResizeHandleWindowTargeter allowing the same logic to be used from --use-viz-hit-test (rect-based hit-testing) code path. The implementation shrinks the browser view for the purpose of hit-testing instead of explicitly targeting the frame when an event location is close to the border but the result should be the same. Bug: 732395 Test: Covered by existing ImmersiveFullscreenControllerTest Change-Id: I61fbe2fb80670081a97186451e865df6baece3d1 Reviewed-on: https://chromium-review.googlesource.com/687805 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Valery Arkhangorodsky <varkha@chromium.org> Cr-Commit-Position: refs/heads/master@{#506027} [modify] https://crrev.com/6d215f7a306eb85a15b1f5c710264e9b18e5b439/ash/wm/resize_handle_window_targeter.cc [modify] https://crrev.com/6d215f7a306eb85a15b1f5c710264e9b18e5b439/ash/wm/resize_handle_window_targeter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f70abaee1481344fbe89f7d89844257d308e0588 commit f70abaee1481344fbe89f7d89844257d308e0588 Author: Ria Jiang <riajiang@chromium.org> Date: Thu Oct 19 17:48:08 2017 Set hit-test data child surface flag based on local_surface_id. Before this CL we were checking if the primary surface info is set for window->layer() to see if that window is a child surface. However, we were checking at the wrong layer and there's no clean way to get the layer that we actually set the primary surface info on. local_surface_id should be set only for child surfaces so checking if that is valid should be sufficient to determine whether a window is a child surface or not and get the value if necessary. Bug: 732395 Test: aura_unittests Change-Id: I29ba755392f294dbada7378ebb862e8ac844dfd7 Reviewed-on: https://chromium-review.googlesource.com/726843 Commit-Queue: Ria Jiang <riajiang@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#510124} [modify] https://crrev.com/f70abaee1481344fbe89f7d89844257d308e0588/ui/aura/hit_test_data_provider_aura.cc [modify] https://crrev.com/f70abaee1481344fbe89f7d89844257d308e0588/ui/aura/hit_test_data_provider_aura_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d64177101ddc2a9700b17b5f057b5f3eb9a49cf7 commit d64177101ddc2a9700b17b5f057b5f3eb9a49cf7 Author: Ria Jiang <riajiang@chromium.org> Date: Thu Oct 19 20:35:44 2017 HitTestDataProviderAura shouldn't submit hit-test data for some windows. 1. For invisible windows that are not on screen. 2. For children of a child surface. If a window has local_surface_id set then that window is a child surface and should be responsible for submitting hit-test data for its children. Considered setting the event targeting policy for that window to be TARGET_ONLY but we do check that flag in non-viz hit-test so prob shouldn't change that. Bug: 732395 Test: aura_unittests Change-Id: Ie70c75e3d0145b56cf42110b4eab2f169741bdf6 Reviewed-on: https://chromium-review.googlesource.com/726544 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Ria Jiang <riajiang@chromium.org> Cr-Commit-Position: refs/heads/master@{#510193} [modify] https://crrev.com/d64177101ddc2a9700b17b5f057b5f3eb9a49cf7/ui/aura/hit_test_data_provider_aura.cc [modify] https://crrev.com/d64177101ddc2a9700b17b5f057b5f3eb9a49cf7/ui/aura/hit_test_data_provider_aura_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/632a8797dd3e23a53766e4787a9a331c387d3e99 commit 632a8797dd3e23a53766e4787a9a331c387d3e99 Author: Ria Jiang <riajiang@chromium.org> Date: Sat Nov 11 06:48:33 2017 Set hit-test data child surface flag based on embed_frame_sink_id_. This CL moves |embed_frame_sink_id_| from WindowPortMus to aura::Window. When a window is an embed window, |embed_frame_sink_id_| gets set from WindowPortMus(WindowServer) or RenderWidgetHostViewAura. It adds IsEmbeddingClient() in aura::Window to determine if a window should be a child surface based on that. Bug: 732395 Test: aura_unittests Change-Id: I4f25491b55a031cd10a3440c9066abcdf607ff39 Reviewed-on: https://chromium-review.googlesource.com/749502 Commit-Queue: Ria Jiang <riajiang@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#515832} [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/content/browser/renderer_host/render_widget_host_view_aura.cc [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/ui/aura/hit_test_data_provider_aura.cc [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/ui/aura/hit_test_data_provider_aura_unittest.cc [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/ui/aura/mus/window_port_mus.cc [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/ui/aura/mus/window_port_mus.h [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/ui/aura/window.cc [modify] https://crrev.com/632a8797dd3e23a53766e4787a9a331c387d3e99/ui/aura/window.h
Comment 1 by rjkroege@chromium.org
, Jun 12 2017