Mac: Make pinch less sensitive
commit908e43770ab94c7d5bcc97f0cbbea9e676a9ba6c
authorccameron <ccameron@chromium.org>
Wed, 29 Apr 2015 23:40:03 +0000 (29 16:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 29 Apr 2015 23:40:42 +0000 (29 23:40 +0000)
tree48ccbb700b4756467c15cf267cbcc3953e7641f4
parent5125cfbdf5bfef2e90f7657a881d573d444aa8f7
Mac: Make pinch less sensitive

Require a cumulative 40% zoom before forwarding a pinch to the renderer.
For the discrete browser zoom pre-M42, we required 60% (this code was
removed in  https://codereview.chromium.org/899283004).

If a zoom gesture (which crossed the 40% line) has occurred in the last
second, do not require the 40% threshold (since this is likely an effort
to re-zoom in).

Of note is that these percentages are additive (the sum of the
magnification factors), not multiplicative (the product of 1 plus the
magnification factors). This is to be consistent with the previous
zoom threshold code.

Also limit the maximum pinch-zoom level to 3x, since the full 4x is
rarely useful.

BUG=478981

Review URL: https://codereview.chromium.org/1110253002

Cr-Commit-Position: refs/heads/master@{#327619}
content/DEPS
content/browser/renderer_host/render_widget_host_view_mac.h
content/browser/renderer_host/render_widget_host_view_mac.mm
content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
content/content_tests.gypi
content/public/common/web_preferences.cc