Add protection against repeated click events
crrev.com/c/1140307 introduced protection against double clicks: It disallowed clicks when they happen shortly after a view is shown. This prevents unintentional double clicks but doesn't protect users when they are tricked into repeatedly clicking at the same location. In this scenario, double click protection is only good for the double click interval on that platform (e.g. 500 ms on Windows). After that, subsequential clicks are still accepted. This CL adds an additional check to prevent repetitive clicks happening with short intervals. As an example, if a dialog is shown at t0 (assuming a 500 ms double click interval): - A click at t0 + 200 ms is ignored by the double click protection - A subsequent click at t0 + 600 ms is ignored by this protection - Another click at t0 + 1150 ms is accepted Change-Id: I501c00aeda46bcbd434323f21c4b8433d04d2038 Bug: 63773 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686858 Commit-Queue: Mustafa Emre Acer <meacer@chromium.org> Reviewed-by:Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#675798}
Showing
Please register or sign in to comment