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

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

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the tests Created 4 years, 10 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/web_input_event_aura.h" 5 #include "content/browser/renderer_host/web_input_event_aura.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/browser/renderer_host/input/web_input_event_util.h" 8 #include "content/browser/renderer_host/input/web_input_event_util.h"
9 #include "content/browser/renderer_host/ui_events_helper.h" 9 #include "content/browser/renderer_host/ui_events_helper.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 NOTIMPLEMENTED() << "Received unexpected event: " << event.type(); 398 NOTIMPLEMENTED() << "Received unexpected event: " << event.type();
399 break; 399 break;
400 } 400 }
401 401
402 webkit_event.tiltX = roundf(event.pointer_details().tilt_x()); 402 webkit_event.tiltX = roundf(event.pointer_details().tilt_x());
403 webkit_event.tiltY = roundf(event.pointer_details().tilt_y()); 403 webkit_event.tiltY = roundf(event.pointer_details().tilt_y());
404 webkit_event.force = event.pointer_details().force(); 404 webkit_event.force = event.pointer_details().force();
405 webkit_event.pointerType = 405 webkit_event.pointerType =
406 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type()); 406 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type());
407 407
408
sadrul 2016/01/29 16:30:43 Undo this change.
Navid Zolghadr 2016/02/01 15:41:33 Done.
408 return webkit_event; 409 return webkit_event;
409 } 410 }
410 411
411 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( 412 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
412 const ui::MouseWheelEvent& event) { 413 const ui::MouseWheelEvent& event) {
413 blink::WebMouseWheelEvent webkit_event; 414 blink::WebMouseWheelEvent webkit_event;
414 415
415 webkit_event.type = blink::WebInputEvent::MouseWheel; 416 webkit_event.type = blink::WebInputEvent::MouseWheel;
416 webkit_event.button = blink::WebMouseEvent::ButtonNone; 417 webkit_event.button = blink::WebMouseEvent::ButtonNone;
417 webkit_event.modifiers = ui::EventFlagsToWebEventModifiers(event.flags()); 418 webkit_event.modifiers = ui::EventFlagsToWebEventModifiers(event.flags());
(...skipping 13 matching lines...) Expand all
431 webkit_event.tiltX = roundf(event.pointer_details().tilt_x()); 432 webkit_event.tiltX = roundf(event.pointer_details().tilt_x());
432 webkit_event.tiltY = roundf(event.pointer_details().tilt_y()); 433 webkit_event.tiltY = roundf(event.pointer_details().tilt_y());
433 webkit_event.force = event.pointer_details().force(); 434 webkit_event.force = event.pointer_details().force();
434 webkit_event.pointerType = 435 webkit_event.pointerType =
435 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type()); 436 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type());
436 437
437 return webkit_event; 438 return webkit_event;
438 } 439 }
439 440
440 } // namespace content 441 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698