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

Unified Diff: third_party/WebKit/public/platform/WebPointerProperties.h

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: Applying comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/tests/TouchActionTest.cpp ('k') | ui/events/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebPointerProperties.h
diff --git a/third_party/WebKit/public/platform/WebPointerProperties.h b/third_party/WebKit/public/platform/WebPointerProperties.h
index 4d59b17a1b14f3102e1a8a4598ebaf79fd3ab322..72d6086845149f2c17a62dfc775838a096aa1db9 100644
--- a/third_party/WebKit/public/platform/WebPointerProperties.h
+++ b/third_party/WebKit/public/platform/WebPointerProperties.h
@@ -5,6 +5,8 @@
#ifndef WebPointerProperties_h
#define WebPointerProperties_h
+#include <limits>
+
namespace blink {
// This class encapsulates the properties that are common between mouse and
@@ -17,7 +19,7 @@ public:
WebPointerProperties()
: button(ButtonNone)
, id(0)
- , force(0.f)
+ , force(std::numeric_limits<float>::quiet_NaN())
, tiltX(0)
, tiltY(0)
, pointerType(PointerType::Unknown)
@@ -42,6 +44,9 @@ public:
Button button;
int id;
+
+ // The valid range is [0,1], with NaN meaning pressure is not supported by
+ // the input device.
float force;
// Tilt of a pen stylus from surface normal as plane angles in degrees,
« no previous file with comments | « third_party/WebKit/Source/web/tests/TouchActionTest.cpp ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698