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

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

Issue 2726623002: Fixed two-finger pan filtering with 'touch-action: pan-x pan-y'. (Closed)
Patch Set: Dave's comments. Created 3 years, 9 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/event.h" 10 #include "ui/events/event.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 result.data.tap.tapCount = 1; 110 result.data.tap.tapCount = 1;
111 result.data.tap.width = 10; 111 result.data.tap.width = 10;
112 result.data.tap.height = 10; 112 result.data.tap.height = 10;
113 } 113 }
114 return result; 114 return result;
115 } 115 }
116 116
117 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollBegin( 117 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollBegin(
118 float dx_hint, 118 float dx_hint,
119 float dy_hint, 119 float dy_hint,
120 blink::WebGestureDevice source_device) { 120 blink::WebGestureDevice source_device,
121 int pointer_count) {
121 WebGestureEvent result = 122 WebGestureEvent result =
122 Build(WebInputEvent::GestureScrollBegin, source_device); 123 Build(WebInputEvent::GestureScrollBegin, source_device);
123 result.data.scrollBegin.deltaXHint = dx_hint; 124 result.data.scrollBegin.deltaXHint = dx_hint;
124 result.data.scrollBegin.deltaYHint = dy_hint; 125 result.data.scrollBegin.deltaYHint = dy_hint;
126 result.data.scrollBegin.pointerCount = pointer_count;
125 return result; 127 return result;
126 } 128 }
127 129
128 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollUpdate( 130 WebGestureEvent SyntheticWebGestureEventBuilder::BuildScrollUpdate(
129 float dx, 131 float dx,
130 float dy, 132 float dy,
131 int modifiers, 133 int modifiers,
132 blink::WebGestureDevice source_device) { 134 blink::WebGestureDevice source_device) {
133 WebGestureEvent result = 135 WebGestureEvent result =
134 Build(WebInputEvent::GestureScrollUpdate, source_device, modifiers); 136 Build(WebInputEvent::GestureScrollUpdate, source_device, modifiers);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 251
250 int SyntheticWebTouchEvent::FirstFreeIndex() { 252 int SyntheticWebTouchEvent::FirstFreeIndex() {
251 for (size_t i = 0; i < kTouchesLengthCap; ++i) { 253 for (size_t i = 0; i < kTouchesLengthCap; ++i) {
252 if (touches[i].state == WebTouchPoint::StateUndefined) 254 if (touches[i].state == WebTouchPoint::StateUndefined)
253 return i; 255 return i;
254 } 256 }
255 return -1; 257 return -1;
256 } 258 }
257 259
258 } // namespace content 260 } // 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