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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2182693003: Filter GestureFlingStarts with Vx=Vy=0 in RenderWidgetHostViewChildFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 } 1309 }
1310 } 1310 }
1311 1311
1312 if (overscroll_controller_) 1312 if (overscroll_controller_)
1313 consumed |= overscroll_controller_->WillHandleEvent(input_event); 1313 consumed |= overscroll_controller_->WillHandleEvent(input_event);
1314 1314
1315 // Touch events should always propagate to the renderer. 1315 // Touch events should always propagate to the renderer.
1316 if (WebTouchEvent::isTouchEventType(input_event.type)) 1316 if (WebTouchEvent::isTouchEventType(input_event.type))
1317 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 1317 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
1318 1318
1319 // Reporting consumed for a fling suggests that there's now an *active* fling 1319 if (consumed && input_event.type == blink::WebInputEvent::GestureFlingStart) {
1320 // that requires both animation and a fling-end notification. However, the 1320 // Here we indicate that there was no consumer for this event, as
1321 // OverscrollController consumes a fling to stop its propagation; it doesn't 1321 // otherwise the fling animation system will try to run an animation
1322 // actually tick a fling animation. Report no consumer to convey this. 1322 // and will also expect a notification when the fling ends. Since
1323 if (consumed && input_event.type == blink::WebInputEvent::GestureFlingStart) 1323 // CrOS just uses the GestureFlingStart with zero-velocity as a means
1324 // of indicating that touchpad scroll has ended, we don't actually want
1325 // a fling animation. Note: Similar code exists in
1326 // RenderWidgetHostViewChildFrame::FilterInputEvent()
1324 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 1327 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
1328 }
1325 1329
1326 return consumed ? INPUT_EVENT_ACK_STATE_CONSUMED 1330 return consumed ? INPUT_EVENT_ACK_STATE_CONSUMED
1327 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 1331 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
1328 } 1332 }
1329 1333
1330 BrowserAccessibilityManager* 1334 BrowserAccessibilityManager*
1331 RenderWidgetHostViewAura::CreateBrowserAccessibilityManager( 1335 RenderWidgetHostViewAura::CreateBrowserAccessibilityManager(
1332 BrowserAccessibilityDelegate* delegate, bool for_root_frame) { 1336 BrowserAccessibilityDelegate* delegate, bool for_root_frame) {
1333 BrowserAccessibilityManager* manager = NULL; 1337 BrowserAccessibilityManager* manager = NULL;
1334 #if defined(OS_WIN) 1338 #if defined(OS_WIN)
(...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after
3037 3041
3038 //////////////////////////////////////////////////////////////////////////////// 3042 ////////////////////////////////////////////////////////////////////////////////
3039 // RenderWidgetHostViewBase, public: 3043 // RenderWidgetHostViewBase, public:
3040 3044
3041 // static 3045 // static
3042 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 3046 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
3043 GetScreenInfoForWindow(results, NULL); 3047 GetScreenInfoForWindow(results, NULL);
3044 } 3048 }
3045 3049
3046 } // namespace content 3050 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698