DescriptionHandle touch events containing touches not previously reported to blink
Chromium has a couple optimizations which suppress sending touch events
to the renderer (for example, when they're at a place or time known not
to contain touch event handlers). Our security fix in
http://crbug.com/148567 assumed we'd always see every touchstart event,
so if we got an event which had a point we'd never seen we'd
effectively ignore the event completely.
Touch events do their hit-test on touchstart, and every TouchEvent
contains a touches array for all active touches. So if we're going
to skip sending some touchstart events, we need to define how those
active touch points show up in the events for other points. This
problem is similar to how touches should show up for fingers that
are down on iframes outside the bounds of the document receiving
touch events. I think it's important that we include such touches
(otherwise an app could mis-recognize a two-finger gesture as a
single finger one), but their 'target' should be irrelevant since
we know it wasn't capable of receiving the touch events. So here
I just set the target to the document. This also updates the
cross-iframe case, we were previously hiding such points completely.
I've split the main loop across points into two stages (each with
their own loop). First we do any necessary hit tests, including
establishing the active touch sequence document if it wasn't
previously determined. Then we create all the Touch objects,
where we may rely on the active touch sequence document determined
by some later point.
This CL also contains a number of overdue cleanups to account for the
fact that we now only need to hit-test on touchstart, and that there's
only ever a single document receiving touch events at any time.
Also rather than use a funky ID+1 key for our touch target HashMap,
just use the ID but ensure HashMap supports 0-value keys by using
UnsignedWithZeroKeyHashTraits.
BUG=363321
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173245
Patch Set 1 #
Total comments: 4
Patch Set 2 : rjkroege cr #Messages
Total messages: 11 (0 generated)
|