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

Unified Diff: samples/swarm/swarm_ui_lib/touch/Scroller.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/Momentum.dart ('k') | samples/swarm/swarm_ui_lib/touch/TouchHandler.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/Scroller.dart
diff --git a/samples/swarm/swarm_ui_lib/touch/Scroller.dart b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
index df049a27dac8374e08107829c6999870ef0eb6e7..d3e41f615be8866294703b75a8096cb1fd8e9467 100644
--- a/samples/swarm/swarm_ui_lib/touch/Scroller.dart
+++ b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
@@ -144,7 +144,7 @@ class Scroller implements Draggable, MomentumDelegate {
_lookupContentSizeDelegate = lookupContentSizeDelegate,
_element = scrollableElem,
_frame = scrollableElem.parent,
- _scrollTechnique = scrollTechnique !== null
+ _scrollTechnique = scrollTechnique != null
? scrollTechnique : ScrollerScrollTechnique.TRANSFORM_3D,
_minPoint = new Coordinate(0, 0),
_maxPoint = new Coordinate(0, 0),
@@ -240,35 +240,35 @@ class Scroller implements Draggable, MomentumDelegate {
}
EventListenerList get onScrollerStart {
- if (_onScrollerStart === null) {
+ if (_onScrollerStart == null) {
_onScrollerStart = new SimpleEventListenerList();
}
return _onScrollerStart;
}
EventListenerList get onScrollerEnd {
- if (_onScrollerEnd === null) {
+ if (_onScrollerEnd == null) {
_onScrollerEnd = new SimpleEventListenerList();
}
return _onScrollerEnd;
}
EventListenerList get onScrollerDragEnd {
- if (_onScrollerDragEnd === null) {
+ if (_onScrollerDragEnd == null) {
_onScrollerDragEnd = new SimpleEventListenerList();
}
return _onScrollerDragEnd;
}
EventListenerList get onContentMoved {
- if (_onContentMoved === null) {
+ if (_onContentMoved == null) {
_onContentMoved = new SimpleEventListenerList();
}
return _onContentMoved;
}
EventListenerList get onDecelStart {
- if (_onDecelStart === null) {
+ if (_onDecelStart == null) {
_onDecelStart = new SimpleEventListenerList();
}
return _onDecelStart;
@@ -280,7 +280,7 @@ class Scroller implements Draggable, MomentumDelegate {
* notifications from this scroller.
*/
void addScrollListener(ScrollListener listener) {
- if (_scrollWatcher === null) {
+ if (_scrollWatcher == null) {
_scrollWatcher = new ScrollWatcher(this);
_scrollWatcher.initialize();
}
@@ -310,7 +310,7 @@ class Scroller implements Draggable, MomentumDelegate {
*/
Coordinate get currentTarget {
Coordinate end = _momentum.destination;
- if (end === null) {
+ if (end == null) {
end = _contentOffset;
}
return end;
@@ -392,7 +392,7 @@ class Scroller implements Draggable, MomentumDelegate {
* Returns the percent of the page scrolled horizontally.
*/
num getHorizontalScrollPercent([num x = null]) {
- x = x !== null ? x : _contentOffset.x;
+ x = x != null ? x : _contentOffset.x;
return (x - _minPoint.x) / (_maxPoint.x - _minPoint.x);
}
@@ -412,7 +412,7 @@ class Scroller implements Draggable, MomentumDelegate {
* none is provided then the content's current y offset will be used.
*/
num getVerticalScrollPercent([num y = null]) {
- y = y !== null ? y : _contentOffset.y;
+ y = y != null ? y : _contentOffset.y;
return (y - _minPoint.y) / Math.max(1, _maxPoint.y - _minPoint.y);
}
@@ -542,7 +542,7 @@ class Scroller implements Draggable, MomentumDelegate {
*/
void _resize(Callback callback) {
window.requestLayoutFrame(() {
- if (_lookupContentSizeDelegate !== null) {
+ if (_lookupContentSizeDelegate != null) {
_contentSize = _lookupContentSizeDelegate();
} else {
_contentSize = new Size(_element.scrollWidth, _element.scrollHeight);
« no previous file with comments | « samples/swarm/swarm_ui_lib/touch/Momentum.dart ('k') | samples/swarm/swarm_ui_lib/touch/TouchHandler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698