summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-23 03:45:36 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-23 03:45:36 +0000
commit55b4f27b45cf6a09f0f29222efef8f561a0733c7 (patch)
treeb716148625e4756b608b9e4e9d81776d06f86f09
parentd348bc08555c474346221922843e979a7944c927 (diff)
downloadchromium_src-55b4f27b45cf6a09f0f29222efef8f561a0733c7.zip
chromium_src-55b4f27b45cf6a09f0f29222efef8f561a0733c7.tar.gz
chromium_src-55b4f27b45cf6a09f0f29222efef8f561a0733c7.tar.bz2
Don't forward scroll gestures to the renderer -- they confuse
the threaded compositor, and the non-threaded compositor and non-composited renderer work (in particular, with the rubber-band effect) without them. BUG=162797 TEST=Test scrolling with trackpad and scroll wheel, and rubber-banding with trackpad. Review URL: https://chromiumcodereview.appspot.com/11941026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178235 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.h3
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm40
2 files changed, 1 insertions, 42 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 7b307a5..5af7263 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -132,8 +132,7 @@ class RenderWidgetHostViewMacEditCommandHelper;
// Whether the previous mouse event was ignored due to hitTest check.
BOOL mouseEventWasIgnored_;
- // Event monitors for gesture-end and scroll wheel end events.
- id endGestureMonitor_;
+ // Event monitor for scroll wheel end event.
id endWheelMonitor_;
// OpenGL Support:
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index d9e69b2..0417558 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -73,7 +73,6 @@ using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory;
using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
-using WebKit::WebGestureEvent;
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
@@ -1849,45 +1848,6 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
renderWidgetHostView_->ForwardMouseEvent(event);
}
-- (void)shortCircuitEndGestureWithEvent:(NSEvent*)event {
- DCHECK(base::mac::IsOSLionOrLater());
-
- if ([event subtype] != kIOHIDEventTypeScroll)
- return;
-
- if (renderWidgetHostView_->render_widget_host_) {
- WebGestureEvent webEvent = WebInputEventFactory::gestureEvent(event, self);
- renderWidgetHostView_->render_widget_host_->ForwardGestureEvent(webEvent);
- }
-
- if (endGestureMonitor_) {
- [NSEvent removeMonitor:endGestureMonitor_];
- endGestureMonitor_ = nil;
- }
-}
-
-- (void)beginGestureWithEvent:(NSEvent*)event {
- if (base::mac::IsOSLionOrLater() &&
- [event subtype] == kIOHIDEventTypeScroll &&
- renderWidgetHostView_->render_widget_host_) {
- WebGestureEvent webEvent = WebInputEventFactory::gestureEvent(event, self);
- renderWidgetHostView_->render_widget_host_->ForwardGestureEvent(webEvent);
-
- // Use an NSEvent monitor to get the gesture-end event. This is done in
- // order to get the gesture-end, even if the view is not visible, which is
- // not the case with -endGestureWithEvent:. An example scenario where this
- // may happen is switching tabs while a gesture is in progress.
- if (!endGestureMonitor_) {
- endGestureMonitor_ =
- [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskEndGesture
- handler:^(NSEvent* blockEvent) {
- [self shortCircuitEndGestureWithEvent:blockEvent];
- return blockEvent;
- }];
- }
- }
-}
-
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent {
// |performKeyEquivalent:| is sent to all views of a window, not only down the
// responder chain (cf. "Handling Key Equivalents" in