Bug 864706 - Fix calls to CrossSlide.Handle's cancel to provide event param. r=jimm

This commit is contained in:
Sam Foster 2013-04-23 16:13:51 +01:00
parent 521a452088
commit a733efd7fa

View File

@ -145,7 +145,7 @@ CrossSlideHandler.prototype = {
} }
}, },
cancel: function(){ cancel: function(aEvent){
this._fireProgressEvent("cancelled", aEvent); this._fireProgressEvent("cancelled", aEvent);
this.drag = null; this.drag = null;
}, },
@ -183,7 +183,7 @@ CrossSlideHandler.prototype = {
if (aEvent.touches.length!==1) { if (aEvent.touches.length!==1) {
// cancel if another touch point gets involved // cancel if another touch point gets involved
return this.cancel(); return this.cancel(aEvent);
} }
let startPt = this.drag.origin; let startPt = this.drag.origin;
@ -202,7 +202,7 @@ CrossSlideHandler.prototype = {
if (-1 == newState) { if (-1 == newState) {
// out of bounds, cancel the event always // out of bounds, cancel the event always
return this.cancel(); return this.cancel(aEvent);
} }
let isWithinCone = withinCone(crossAxisDistance, scrollAxisDistance); let isWithinCone = withinCone(crossAxisDistance, scrollAxisDistance);
@ -213,7 +213,7 @@ CrossSlideHandler.prototype = {
if (currState >= CrossSlidingState.SELECTING && !isWithinCone) { if (currState >= CrossSlidingState.SELECTING && !isWithinCone) {
// we're committed to a cross-slide gesture, // we're committed to a cross-slide gesture,
// so going out of bounds at this point means aborting // so going out of bounds at this point means aborting
return this.cancel(); return this.cancel(aEvent);
} }
if (currState > newState) { if (currState > newState) {
@ -232,7 +232,7 @@ CrossSlideHandler.prototype = {
aEvent.stopPropagation(); aEvent.stopPropagation();
if (this.drag.state < CrossSlidingState.SELECTING) { if (this.drag.state < CrossSlidingState.SELECTING) {
return this.cancel(); return this.cancel(aEvent);
} }
this._fireProgressEvent("completed", aEvent); this._fireProgressEvent("completed", aEvent);