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

Unified Diff: ui/views/cocoa/bridged_content_view.mm

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/x/events_x.cc ('k') | ui/views/controls/scroll_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_content_view.mm
diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm
index 625cb43c9498ed66f63e6742c7595db5f00ed6b2..d9989ce572017384d6ad2df62d3d32c0bb600960 100644
--- a/ui/views/cocoa/bridged_content_view.mm
+++ b/ui/views/cocoa/bridged_content_view.mm
@@ -712,12 +712,16 @@ ui::KeyEvent GetCharacterEventFromNSEvent(NSEvent* event) {
[self handleKeyEvent:&event];
}
+- (BOOL)wantsScrollEventsForSwipeTrackingOnAxis:(NSEventGestureAxis)axis {
+ return YES;
+}
+
- (void)scrollWheel:(NSEvent*)theEvent {
if (!hostedView_)
return;
- ui::MouseWheelEvent event(theEvent);
- hostedView_->GetWidget()->OnMouseEvent(&event);
+ ui::ScrollEvent event(theEvent);
+ hostedView_->GetWidget()->OnScrollEvent(&event);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/events/x/events_x.cc ('k') | ui/views/controls/scroll_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698