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

Issue 654976 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Change WebContentsObserver::DidGetInteraction to send TouchStart instead of GestureStart

Project Member Reported by dominickn@chromium.org, Oct 12 2016

Issue description

When input touch events have preventDefault() called on them, synthetic GestureStart* events are not generated. This means that input signals will not be sent to WebContentsObserver::DidGetUserInteraction as that method is only sent GestureStart events.

Instead, the observer method should be sent TouchStart* events, which will always fire on taps and scrolling even if they are preventDefault'ed and capture by the web application.

This bug manifests itself as pages not earning site engagement from user input when they should be earning it.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26940224a3ebb4b7a8f4e632953d57f720301a17

commit 26940224a3ebb4b7a8f4e632953d57f720301a17
Author: dominickn <dominickn@chromium.org>
Date: Thu Oct 13 01:39:25 2016

Make WebContentsObserver::DidGetUserInteraction fire on TouchStart instead of GestureTapBegin.

GestureTapBegin is a synthetic event generated by the input system. If
a website captures a touch event and calls preventDefault() on it, the
GestureTapBegin event will not be generated.

This is problematic for site engagement, which is a primary consumer of
the DidGetUserInteraction API. Touch events which are captured by sites
cannot earn engagement because the event is never passed through.

This CL addresses the issue by changing DidGetUserInteraction to fire on
TouchStart events rather than GestureTapBegin. This has negligible
performance impact, and no real behavioural impact on the current API
consumers. Unit tests for methods based on DidGetUserInteraction are
updated to never send GestureTapBegin, and instead send TouchStart in
its place.

BUG= 654976 

Review-Url: https://codereview.chromium.org/2411143003
Cr-Commit-Position: refs/heads/master@{#424932}

[modify] https://crrev.com/26940224a3ebb4b7a8f4e632953d57f720301a17/chrome/browser/download/download_request_limiter_unittest.cc
[modify] https://crrev.com/26940224a3ebb4b7a8f4e632953d57f720301a17/chrome/browser/engagement/site_engagement_helper.cc
[modify] https://crrev.com/26940224a3ebb4b7a8f4e632953d57f720301a17/chrome/browser/engagement/site_engagement_helper_unittest.cc
[modify] https://crrev.com/26940224a3ebb4b7a8f4e632953d57f720301a17/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/26940224a3ebb4b7a8f4e632953d57f720301a17/content/public/browser/web_contents_observer.h

Status: Fixed (was: Assigned)

Sign in to add a comment