New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 785015 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 672311



Sign in to add a comment

Merge Multiple Hit-test Regions For One Window

Project Member Reported by riajiang@chromium.org, Nov 14 2017

Issue description

In both pre-aggregated and post-aggregated hit-test data, we can have multiple hit-test regions for one window, with different hit-test flags and hit-test rects. At this stage, we have two different event sources: mouse and touch; in the future, we could have more sources, e.g. stylus. Each of these event sources can use different rect for hit-test. E.g. StatusAreaWidget, ShelfWidget and BrowserFrame all have two hit-test regions right now, one for mouse events and one for touch events. We are sending more information than we have to and having multiple hit-test regions for one window is confusing.
Furthermore, as part of “Add Window Hierarchy in Pre-aggregated Hit-test Data”, HitTestRegion will have an additional child_count field, which is going to make this even more confusing. Say window A has one child window B, and B has two hit-test regions for mouse events and touch events respectively; B also has one child window C. Now the pre-aggregated hit-test data looks like this:

A: flags (mouse + touch + some other flags), frame_sink_id, local_surface_id, rect (for both mouse and touch), transform, child_count (?)
	B1: flags (mouse + some other flags), frame_sink_id, local_surface_id, rect (for mouse), transform, child_count (?)
	B2: flags (touch + some other flags), frame_sink_id, local_surface_id, rect (for touch), transform, child_count (?)
		C: flags (mouse + touch + some other flags), frame_sink_id, local_surface_id, rect (for both mouse and touch), transform, child_count (0)

It’s clear that C should have child_count 0, and maybe B2 should just have child_count 1. However, it’s not clear what should be the child_count for B1 and A. B1 technically only has one child, which is C, but we do have two more hit-test regions after that; if we count B1 as having 2 children - but B2 is not a child of B1 and we shouldn’t have to enter into B1’s rect to check if events should go to B2 instead and applying transform twice is obviously wrong. A is in a slightly better situation since B1 and B2 are kind of both A’s children, but strictly speaking A should only have two child windows. Note that we do want to include all regions in the child_count (i.e. A should have child_count 3 in this case) because if we have decided that an event location is not in A’s rect, we want to use the child_count to skip ahead to another window that’s at the same level as A.

proposal: https://docs.google.com/a/google.com/document/d/1MUyG1Xf5-QtBFaVHTGbha5YMFY18rsZ0H7I-KO4clQs/edit?usp=sharing


 
Status: WontFix (was: Started)
more details in the doc

Sign in to add a comment