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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/GestureEventFilter.java

Issue 2798733002: Block onScroll if input MotionEvents are null (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/GestureEventFilter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/GestureEventFilter.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/GestureEventFilter.java
index cfde807b5878a3d675208a9f8a865086f45ff508..aefd3fbc0db37920aff8cc19c68b39837ebb6066 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/GestureEventFilter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/GestureEventFilter.java
@@ -98,6 +98,8 @@ public class GestureEventFilter extends EventFilter {
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
+ if (e1 == null || e2 == null) return false;
Khushal 2017/04/04 22:10:10 Could we add a comment here that says this should
mdjones 2017/04/04 22:16:24 Done.
+
if (!mSeenFirstScrollEvent) {
// Remove the touch slop region from the first scroll event to avoid a
// jump.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698