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

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: doc 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..5353df4ad6d7b08ae01dc7d0adee01e66122659c 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,10 @@ public class GestureEventFilter extends EventFilter {
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
+ // This should ideally never happen but is used as a workaround for a larger
+ // problem. See https://crbug.com/656603
+ if (e1 == null || e2 == null) return false;
+
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