Skip to content

Commit

Permalink
[Mac] Partial revert of r94122 to have three-finger gestures not resp…
Browse files Browse the repository at this point in the history
…ect the direction preference.

BUG=90342
TEST=Turn on natural scrolling. Swiping three-finger LTR goes forward; RTL goes backward. Two-finger swiping does the inverse. Subtle, yes?

Review URL: http://codereview.chromium.org/7553017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95091 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rsesek@chromium.org committed Aug 2, 2011
1 parent 6be312d commit 1c78d78
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions chrome/browser/ui/cocoa/browser_window_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1677,13 +1677,6 @@ - (void)swipeWithEvent:(NSEvent*)event {
CGFloat deltaX = [event deltaX];
CGFloat deltaY = [event deltaY];

// On Lion, the user can choose to use a "natural" scroll direction with
// inverted axes.
if (gesture_utils::IsScrollDirectionInverted()) {
deltaX *= -1;
deltaY *= -1;
}

// Map forwards and backwards to history; left is positive, right is negative.
unsigned int command = 0;
if (deltaX > 0.5) {
Expand All @@ -1692,7 +1685,7 @@ - (void)swipeWithEvent:(NSEvent*)event {
command = IDC_FORWARD;
} else if (deltaY > 0.5) {
// TODO(pinkerton): figure out page-up, http://crbug.com/16305
} else if ([event deltaY] < -0.5) {
} else if (deltaY < -0.5) {
// TODO(pinkerton): figure out page-down, http://crbug.com/16305
browser_->ExecuteCommand(IDC_TABPOSE);
}
Expand Down

0 comments on commit 1c78d78

Please sign in to comment.