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

Unified Diff: samples/swarm/swarm_ui_lib/touch/TouchHandler.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 | « samples/swarm/swarm_ui_lib/touch/Scroller.dart ('k') | samples/swarm/swarm_ui_lib/util/StringUtils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/touch/TouchHandler.dart
diff --git a/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart b/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart
index 389aec7c05095327d6de9aedef65d71ec879b71b..c1ce2364dd2ec6c30b02946cfd8deeeea40bb2b8 100644
--- a/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart
+++ b/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart
@@ -233,7 +233,7 @@ class TouchHandler {
void _onEnd(int timeStamp, [TouchEvent e = null]) {
_touching = false;
_touchable.onTouchEnd();
- if (!_tracking || _draggable === null) {
+ if (!_tracking || _draggable == null) {
return;
}
Touch touch = _getLastTouch();
@@ -246,7 +246,7 @@ class TouchHandler {
_recentTouchesX = _removeOldTouches(_recentTouchesX, timeStamp);
_recentTouchesY = _removeOldTouches(_recentTouchesY, timeStamp);
_draggable.onDragEnd();
- if (e !== null) {
+ if (e != null) {
e.preventDefault();
}
ClickBuster.preventGhostClick(_startTouchX, _startTouchY);
@@ -258,7 +258,7 @@ class TouchHandler {
* Touch move handler.
*/
void _onMove(TouchEvent e) {
- if (!_tracking || _draggable === null) {
+ if (!_tracking || _draggable == null) {
return;
}
final touch = e.touches[0];
@@ -310,7 +310,7 @@ class TouchHandler {
return;
}
_touching = true;
- if (!_touchable.onTouchStart(e) || _draggable === null) {
+ if (!_touchable.onTouchStart(e) || _draggable == null) {
return;
}
final touch = e.touches[0];
@@ -370,9 +370,7 @@ class TouchHandler {
}
// TODO(jacobr): why doesn't bool implement the xor operator directly?
- static bool _xor(bool a, bool b) {
- return (a === true || b === true) && !(a === true && b === true);
- }
+ static bool _xor(bool a, bool b) => a != b;
/**
* Reset the touchable element.
« no previous file with comments | « samples/swarm/swarm_ui_lib/touch/Scroller.dart ('k') | samples/swarm/swarm_ui_lib/util/StringUtils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698