Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module viz.hit_test.mojom; | |
| 6 | |
| 7 import "cc/ipc/surface_id.mojom"; | |
| 8 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
| 9 import "ui/gfx/mojo/transform.mojom"; | |
| 10 | |
| 11 enum HitTestRegionFlags { | |
| 12 | |
| 13 // Region maps to this surface ( me ). | |
|
rjkroege
2017/06/09 15:47:08
The bounds flag is still necessary. Please put it
| |
| 14 HIT_TEST_MINE = 0, | |
| 15 | |
| 16 // Region ignored for hit testing ( transparent backgrounds & hover:none ). | |
| 17 HIT_TEST_IGNORE, | |
| 18 | |
| 19 // Region maps to child surface ( OOPIF ). | |
| 20 HIT_TEST_CHILD_SURFACE, | |
| 21 | |
| 22 // Irregular boundary - send HitTestRequest to resolve. | |
| 23 HIT_TEST_ASK, | |
| 24 | |
| 25 // No touch event handler exists - no need to send touch events. | |
| 26 HIT_TEST_NO_TOUCH_EVENT_HANDLER, | |
| 27 | |
| 28 }; | |
| 29 | |
| 30 struct HitTestRegion { | |
| 31 | |
| 32 // Flags to indicate the type of HitTestRegion. | |
| 33 HitTestRegionFlags flags_; | |
| 34 | |
| 35 // SurfaceId is required when flags_ = HIT_TEST_CHILD_SURFACE. | |
| 36 cc.mojom.SurfaceId surface_id_; | |
| 37 | |
| 38 // The rect of the region in the coordinate space of the embedder. | |
| 39 gfx.mojom.Rect rect_; | |
| 40 | |
| 41 // The transform applied to the child region. | |
| 42 gfx.mojom.Transform transform_; | |
| 43 }; | |
| 44 | |
| 45 struct HitTestData { | |
| 46 | |
| 47 // SurfaceId corresponding to this HitTestData. | |
| 48 cc.mojom.SurfaceId surface_id_; | |
| 49 | |
| 50 // The list of sub-regions in this surface. | |
| 51 array<HitTestRegion> regions_; // in front to back z-order | |
| 52 }; | |
| OLD | NEW |