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

Side by Side Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 2344693002: Support WebPointerProperties in MouseEvent (Closed)
Patch Set: fixed osx build 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 break; 502 break;
503 } 503 }
504 } else { 504 } else {
505 button = WebMouseEvent::Button::NoButton; 505 button = WebMouseEvent::Button::NoButton;
506 } 506 }
507 movementX = event.movementX(); 507 movementX = event.movementX();
508 movementY = event.movementY(); 508 movementY = event.movementY();
509 clickCount = event.detail(); 509 clickCount = event.detail();
510 510
511 pointerType = WebPointerProperties::PointerType::Mouse; 511 pointerType = WebPointerProperties::PointerType::Mouse;
512 if (event.mouseEvent())
513 pointerType = event.mouseEvent()->pointerProperties().pointerType;
512 } 514 }
513 515
514 // Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mo use 516 // Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mo use
515 // with touch input for plugins that don't support touch input). 517 // with touch input for plugins that don't support touch input).
516 WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutIte m layoutItem, const TouchEvent& event) 518 WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutIte m layoutItem, const TouchEvent& event)
517 { 519 {
518 if (!event.touches()) 520 if (!event.touches())
519 return; 521 return;
520 if (event.touches()->length() != 1) { 522 if (event.touches()->length() != 1) {
521 if (event.touches()->length() || event.type() != EventTypeNames::touchen d || !event.changedTouches() || event.changedTouches()->length() != 1) 523 if (event.touches()->length() || event.type() != EventTypeNames::touchen d || !event.changedTouches() || event.changedTouches()->length() != 1)
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 break; 737 break;
736 case GestureSourceTouchscreen: 738 case GestureSourceTouchscreen:
737 sourceDevice = WebGestureDeviceTouchscreen; 739 sourceDevice = WebGestureDeviceTouchscreen;
738 break; 740 break;
739 case GestureSourceUninitialized: 741 case GestureSourceUninitialized:
740 NOTREACHED(); 742 NOTREACHED();
741 } 743 }
742 } 744 }
743 745
744 } // namespace blink 746 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/PlatformEvent.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698