Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: components/viz/hit_test/public/interfaces/hit_test_data.mojom

Issue 2908783002: WIP Hittest Component.
Patch Set: reviewer comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/viz/hit_test/public/interfaces/hit_test_data.mojom
diff --git a/components/viz/hit_test/public/interfaces/hit_test_data.mojom b/components/viz/hit_test/public/interfaces/hit_test_data.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..d422634c3b4e3e07d2a32670f3c413e51dd82dd3
--- /dev/null
+++ b/components/viz/hit_test/public/interfaces/hit_test_data.mojom
@@ -0,0 +1,57 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module viz.hit_test.mojom;
+
+import "cc/ipc/surface_id.mojom";
+import "ui/gfx/geometry/mojo/geometry.mojom";
+import "ui/gfx/mojo/transform.mojom";
+
+enum HitTestRegionFlags {
+
+ // Defines the bounds of the surface ( embedder ).
+ HIT_TEST_BOUNDS = 0,
+
+ // Region maps to this surface ( me ).
rjkroege 2017/06/07 21:19:06 It would make sense to me that HIT_TEST_MINE | HIT
gklassen 2017/06/12 16:30:41 The current implementation is using HIT_TEST_MINE
+ HIT_TEST_MINE,
+
+ // Region maps to child surface ( OOPIF ).
+ HIT_TEST_CHILD_SURFACE,
+
+ // Irregular boundary - send HitTestRequest to resolve.
+ HIT_TEST_ASK,
+
+ // No touch event handler exists - no need to send touch events.
+ HIT_TEST_NO_TOUCH_EVENT_HANDLER,
+
+ // Region ignored for hit testing ( eg. hover:none ).
+ HIT_TEST_IGNORE
+};
+
+struct HitTestRegion {
+
+ // Flags to indicate the type of HitTestRegion.
+ HitTestRegionFlags flags_;
+
+ // SurfaceId for the HIT_TEST_CHILD_SURFACE
rjkroege 2017/06/07 21:19:07 If HIT_TEST_CHILD_SURFACE is set, this is not empt
gklassen 2017/06/12 16:30:41 Good call. I have added Validation methods to DCH
+ cc.mojom.SurfaceId surface_id_;
+
+ // The rect of the region in the current surface coordinate space
+ gfx.mojom.Rect rect_;
+
+ // The transform applied to the child region.
+ gfx.mojom.Transform transform_;
+};
+
+struct HitTestData {
+
+ // SurfaceId corresponding to this HitTestData.
+ cc.mojom.SurfaceId surface_id_;
+
+ // The clipping bounds of the surface.
+ gfx.mojom.Rect bounds_;
+
+ // The list of sub-regions in this surface.
+ array<HitTestRegion> regions_; // in front to back z-order
+};

Powered by Google App Engine
This is Rietveld 408576698