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

Unified Diff: components/test_runner/event_sender.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: Remove a typo 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
Index: components/test_runner/event_sender.cc
diff --git a/components/test_runner/event_sender.cc b/components/test_runner/event_sender.cc
index ffbd5569b4dbd572e8e6ee55360337945614ecb2..2bbf4def7219e18dc2008f55f7eafd4d24c5f14a 100644
--- a/components/test_runner/event_sender.cc
+++ b/components/test_runner/event_sender.cc
@@ -1889,6 +1889,10 @@ void EventSender::AddTouchPoint(float x, float y, gin::Arguments* args) {
InitPointerProperties(args, &touch_point, &touch_point.radiusX,
&touch_point.radiusY);
+ // Set the touch point pressure to zero if it was not set by the caller
+ if (isnan(touch_point.force))
+ touch_point.force = 0.0;
+
touch_points_.push_back(touch_point);
}

Powered by Google App Engine
This is Rietveld 408576698