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

Side by Side Diff: content/common/input/synthetic_web_input_event_builders.cc

Issue 1971273002: Touch Action could cause wheel gestures to be filtered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make test separate Created 4 years, 7 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
« no previous file with comments | « content/common/input/synthetic_web_input_event_builders.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/common/input/synthetic_web_input_event_builders.h" 5 #include "content/common/input/synthetic_web_input_event_builders.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/input/web_touch_event_traits.h" 8 #include "content/common/input/web_touch_event_traits.h"
9 #include "ui/events/base_event_utils.h" 9 #include "ui/events/base_event_utils.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 type == WebInputEvent::GestureDoubleTap) { 111 type == WebInputEvent::GestureDoubleTap) {
112 result.data.tap.tapCount = 1; 112 result.data.tap.tapCount = 1;
113 result.data.tap.width = 10; 113 result.data.tap.width = 10;
114 result.data.tap.height = 10; 114 result.data.tap.height = 10;
115 } 115 }
116 return result; 116 return result;
117 } 117 }
118 118
119 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollBegin( 119 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollBegin(
120 float dx_hint, 120 float dx_hint,
121 float dy_hint) { 121 float dy_hint,
122 WebGestureEvent result = Build(WebInputEvent::GestureScrollBegin, 122 blink::WebGestureDevice source_device) {
123 blink::WebGestureDeviceTouchscreen); 123 WebGestureEvent result =
124 Build(WebInputEvent::GestureScrollBegin, source_device);
124 result.data.scrollBegin.deltaXHint = dx_hint; 125 result.data.scrollBegin.deltaXHint = dx_hint;
125 result.data.scrollBegin.deltaYHint = dy_hint; 126 result.data.scrollBegin.deltaYHint = dy_hint;
126 return result; 127 return result;
127 } 128 }
128 129
129 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollUpdate( 130 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollUpdate(
130 float dx, 131 float dx,
131 float dy, 132 float dy,
132 int modifiers, 133 int modifiers,
133 blink::WebGestureDevice source_device) { 134 blink::WebGestureDevice source_device) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 touches[index].state = WebTouchPoint::StateCancelled; 235 touches[index].state = WebTouchPoint::StateCancelled;
235 WebTouchEventTraits::ResetType( 236 WebTouchEventTraits::ResetType(
236 WebInputEvent::TouchCancel, timeStampSeconds, this); 237 WebInputEvent::TouchCancel, timeStampSeconds, this);
237 } 238 }
238 239
239 void SyntheticWebTouchEvent::SetTimestamp(base::TimeDelta timestamp) { 240 void SyntheticWebTouchEvent::SetTimestamp(base::TimeDelta timestamp) {
240 timeStampSeconds = timestamp.InSecondsF(); 241 timeStampSeconds = timestamp.InSecondsF();
241 } 242 }
242 243
243 } // namespace content 244 } // namespace content
OLDNEW
« no previous file with comments | « content/common/input/synthetic_web_input_event_builders.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698