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

Unified Diff: ui/android/java/src/org/chromium/ui/base/TouchDevice.java

Issue 806693008: Media queries: excluded non-pointing devices from pointer/hover (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FIXME to TODO Created 6 years 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 | ui/base/touch/touch_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/TouchDevice.java
diff --git a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java b/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
index 38edf900d88a94c61cd1b1edf1fafb550f842950..889edf467ac5f7ca612e68a8c109516442375d3a 100644
--- a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
+++ b/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
@@ -66,14 +66,14 @@ public class TouchDevice {
pointerTypesVal |= PointerType.FINE;
} else if (hasSource(sources, InputDevice.SOURCE_TOUCHSCREEN)) {
pointerTypesVal |= PointerType.COARSE;
- } else {
- // The remaining InputDevice sources:
- // SOURCE_DPAD, SOURCE_GAMEPAD, SOURCE_JOYSTICK, SOURCE_KEYBOARD,
- // SOURCE_TOUCH_NAVIGATION, SOURCE_UNKNOWN
- pointerTypesVal |= PointerType.NONE;
}
+ // Remaining InputDevice sources: SOURCE_DPAD, SOURCE_GAMEPAD, SOURCE_JOYSTICK,
+ // SOURCE_KEYBOARD, SOURCE_TOUCH_NAVIGATION, SOURCE_UNKNOWN
}
+ if (pointerTypesVal == 0)
+ pointerTypesVal = PointerType.NONE;
+
return pointerTypesVal;
}
@@ -94,14 +94,14 @@ public class TouchDevice {
} else if (hasSource(sources, InputDevice.SOURCE_STYLUS)
|| hasSource(sources, InputDevice.SOURCE_TOUCHSCREEN)) {
hoverTypesVal |= HoverType.ON_DEMAND;
- } else {
- // The remaining InputDevice sources:
- // SOURCE_DPAD, SOURCE_GAMEPAD, SOURCE_JOYSTICK,
- // SOURCE_KEYBOARD, SOURCE_TOUCH_NAVIGATION, SOURCE_UNKNOWN
- hoverTypesVal |= HoverType.NONE;
}
+ // Remaining InputDevice sources: SOURCE_DPAD, SOURCE_GAMEPAD, SOURCE_JOYSTICK,
+ // SOURCE_KEYBOARD, SOURCE_TOUCH_NAVIGATION, SOURCE_UNKNOWN
}
+ if (hoverTypesVal == 0)
+ hoverTypesVal = HoverType.NONE;
+
return hoverTypesVal;
}
« no previous file with comments | « no previous file | ui/base/touch/touch_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698