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

Side by Side Diff: ui/events/blink/blink_event_util.cc

Issue 2126323002: Add support for touch-action: pinch-zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add exception for mac Created 4 years, 2 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 | « third_party/WebKit/public/platform/WebInputEvent.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // MSVC++ requires this to be set before any other includes to get M_PI. 5 // MSVC++ requires this to be set before any other includes to get M_PI.
6 #define _USE_MATH_DEFINES 6 #define _USE_MATH_DEFINES
7 7
8 #include "ui/events/blink/blink_event_util.h" 8 #include "ui/events/blink/blink_event_util.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 gesture.data.longPress.height = details.bounding_box_f().height(); 290 gesture.data.longPress.height = details.bounding_box_f().height();
291 break; 291 break;
292 case ET_GESTURE_TWO_FINGER_TAP: 292 case ET_GESTURE_TWO_FINGER_TAP:
293 gesture.type = blink::WebInputEvent::GestureTwoFingerTap; 293 gesture.type = blink::WebInputEvent::GestureTwoFingerTap;
294 gesture.data.twoFingerTap.firstFingerWidth = details.first_finger_width(); 294 gesture.data.twoFingerTap.firstFingerWidth = details.first_finger_width();
295 gesture.data.twoFingerTap.firstFingerHeight = 295 gesture.data.twoFingerTap.firstFingerHeight =
296 details.first_finger_height(); 296 details.first_finger_height();
297 break; 297 break;
298 case ET_GESTURE_SCROLL_BEGIN: 298 case ET_GESTURE_SCROLL_BEGIN:
299 gesture.type = WebInputEvent::GestureScrollBegin; 299 gesture.type = WebInputEvent::GestureScrollBegin;
300 gesture.data.scrollBegin.pointerCount = details.touch_points();
300 gesture.data.scrollBegin.deltaXHint = details.scroll_x_hint(); 301 gesture.data.scrollBegin.deltaXHint = details.scroll_x_hint();
301 gesture.data.scrollBegin.deltaYHint = details.scroll_y_hint(); 302 gesture.data.scrollBegin.deltaYHint = details.scroll_y_hint();
302 break; 303 break;
303 case ET_GESTURE_SCROLL_UPDATE: 304 case ET_GESTURE_SCROLL_UPDATE:
304 gesture.type = WebInputEvent::GestureScrollUpdate; 305 gesture.type = WebInputEvent::GestureScrollUpdate;
305 gesture.data.scrollUpdate.deltaX = details.scroll_x(); 306 gesture.data.scrollUpdate.deltaX = details.scroll_x();
306 gesture.data.scrollUpdate.deltaY = details.scroll_y(); 307 gesture.data.scrollUpdate.deltaY = details.scroll_y();
307 gesture.data.scrollUpdate.previousUpdateInSequencePrevented = 308 gesture.data.scrollUpdate.previousUpdateInSequencePrevented =
308 details.previous_scroll_update_in_sequence_prevented(); 309 details.previous_scroll_update_in_sequence_prevented();
309 break; 310 break;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 return blink::WebInputEvent::IsRight; 519 return blink::WebInputEvent::IsRight;
519 case DomKeyLocation::NUMPAD: 520 case DomKeyLocation::NUMPAD:
520 return blink::WebInputEvent::IsKeyPad; 521 return blink::WebInputEvent::IsKeyPad;
521 case DomKeyLocation::STANDARD: 522 case DomKeyLocation::STANDARD:
522 break; 523 break;
523 } 524 }
524 return static_cast<blink::WebInputEvent::Modifiers>(0); 525 return static_cast<blink::WebInputEvent::Modifiers>(0);
525 } 526 }
526 527
527 } // namespace ui 528 } // namespace ui
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebInputEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698