Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Issue 181723006: Handle mac trackpad zoom via GesturePinch events (Closed)

Created:
6 years, 9 months ago by Rick Byers
Modified:
6 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, miu+watch_chromium.org, jdduke (slow)
Visibility:
Public.

Description

Handle mac trackpad zoom via GesturePinch events Prior to this change, Mac handles pinch gestures directly in the UI layer (BrowserWindowController). Here we instead have the RenderWidgetHost send GesturePinchUpdate events, and when those events go unhandled WebContentsImpl implements the browser zoom behavior (similar to how it does already for ctrl+mousewheel events on other platforms). This lays the groundwork in the short term for giving the web page a chance to override the pinch behavior. Longer term this will enable us to hook into the pinch-zoom codepath used for touchscreen so that we can get a similar effect (instead of just browser-zoom - which probably isn't really what the user wants when pinching). The only observable behavior change in this CL is that pinching outside the content area (eg. in the tabstrip) no longer does anything. It's not clear what the pinch origin should be in such a case, and it probably doesn't really make sense to try to handle it (pinching is supposed to zoom whatever is under the cursor). This adds some basic unit test coverage for the pre-existing (but untested) logic for mapping pinch scales to zoom in/out actions. Depends on blink CL: https://src.chromium.org/viewvc/blink?view=rev&revision=168482 BUG=289887 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260452

Patch Set 1 #

Patch Set 2 : Finish hooking up to pinch #

Patch Set 3 : Added tests #

Total comments: 4

Patch Set 4 : jdduke CR feedback and fix win build errors #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -40 lines) Patch
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 1 chunk +0 lines, -35 lines 0 comments Download
M content/browser/renderer_host/input/gesture_event_queue.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 2 3 2 chunks +13 lines, -0 lines 1 comment Download
M content/browser/renderer_host/input/input_router_impl_unittest.cc View 1 2 2 chunks +17 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 2 chunks +15 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 2 chunks +40 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
Rick Byers
Hey Chris, Can you please take a look at this change? Mostly this just moves ...
6 years, 9 months ago (2014-03-26 21:01:58 UTC) #1
ccameron
On 2014/03/26 21:01:58, Rick Byers wrote: > Hey Chris, > Can you please take a ...
6 years, 9 months ago (2014-03-26 21:07:21 UTC) #2
ccameron
This lgtm (mod the rounding issues the Win bots hit). I'm not the person to ...
6 years, 9 months ago (2014-03-26 23:02:23 UTC) #3
jdduke (slow)
https://codereview.chromium.org/181723006/diff/40001/content/browser/renderer_host/input/gesture_event_queue.h File content/browser/renderer_host/input/gesture_event_queue.h (right): https://codereview.chromium.org/181723006/diff/40001/content/browser/renderer_host/input/gesture_event_queue.h#newcode73 content/browser/renderer_host/input/gesture_event_queue.h:73: bool ShouldForward(const GestureEventWithLatencyInfo&); I've had a refactoring patch, for ...
6 years, 9 months ago (2014-03-26 23:13:42 UTC) #4
Rick Byers
On 2014/03/26 23:02:23, ccameron1 wrote: > This lgtm (mod the rounding issues the Win bots ...
6 years, 9 months ago (2014-03-27 01:44:09 UTC) #5
jdduke (slow)
content/browser/renderer_host/input lgtm. https://codereview.chromium.org/181723006/diff/50001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/181723006/diff/50001/content/browser/renderer_host/input/input_router_impl.cc#newcode423 content/browser/renderer_host/input/input_router_impl.cc:423: // Trackpad pinch gestures are not yet ...
6 years, 9 months ago (2014-03-27 02:08:01 UTC) #6
Rick Byers
On 2014/03/27 02:08:01, jdduke wrote: > content/browser/renderer_host/input lgtm. > > https://codereview.chromium.org/181723006/diff/50001/content/browser/renderer_host/input/input_router_impl.cc > File content/browser/renderer_host/input/input_router_impl.cc (right): ...
6 years, 9 months ago (2014-03-27 02:20:02 UTC) #7
Rick Byers
+jochen for OWNERS of content/browser/web_contents/ and rubber stamp for deletions from chrome/browser/ui/cocoa/
6 years, 9 months ago (2014-03-27 02:21:33 UTC) #8
jochen (gone - plz use gerrit)
lgtm
6 years, 9 months ago (2014-03-27 14:24:24 UTC) #9
Rick Byers
The CQ bit was checked by rbyers@chromium.org
6 years, 9 months ago (2014-03-27 14:31:18 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/181723006/50001
6 years, 9 months ago (2014-03-27 14:31:33 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-27 14:54:58 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_clang_dbg
6 years, 8 months ago (2014-03-27 14:54:58 UTC) #13
Rick Byers
The CQ bit was checked by rbyers@chromium.org
6 years, 8 months ago (2014-03-27 15:37:54 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/181723006/50001
6 years, 8 months ago (2014-03-27 15:38:52 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-27 15:55:28 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_clang_dbg
6 years, 8 months ago (2014-03-27 15:55:28 UTC) #17
Rick Byers
The CQ bit was checked by rbyers@chromium.org
6 years, 8 months ago (2014-03-27 23:10:44 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/181723006/50001
6 years, 8 months ago (2014-03-27 23:12:36 UTC) #19
Rick Byers
The CQ bit was unchecked by rbyers@chromium.org
6 years, 8 months ago (2014-03-28 21:28:54 UTC) #20
Rick Byers
The CQ bit was checked by rbyers@chromium.org
6 years, 8 months ago (2014-03-28 21:29:03 UTC) #21
cmp
The CQ bit was unchecked by cmp@chromium.org
6 years, 8 months ago (2014-03-30 17:00:14 UTC) #22
cmp
The CQ bit was checked by cmp@chromium.org
6 years, 8 months ago (2014-03-30 17:02:26 UTC) #23
cmp
The CQ bit was unchecked by cmp@chromium.org
6 years, 8 months ago (2014-03-30 17:03:46 UTC) #24
cmp
The CQ bit was checked by cmp@chromium.org
6 years, 8 months ago (2014-03-30 17:07:26 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/181723006/50001
6 years, 8 months ago (2014-03-30 17:08:01 UTC) #26
commit-bot: I haz the power
6 years, 8 months ago (2014-03-30 17:37:36 UTC) #27
Message was sent while issue was closed.
Change committed as 260452

Powered by Google App Engine
This is Rietveld 408576698