Bug 915328 - Metro front-end fixes for cross slide with async panning [r=sfoster]

This commit is contained in:
Matt Brubeck 2013-10-02 18:03:05 -07:00
parent 64a77f6a3f
commit c501c2ae3e
3 changed files with 11 additions and 4 deletions

View File

@ -524,9 +524,6 @@
this._xslideHandler = new CrossSlide.Handler(this, {
REARRANGESTART: this.crossSlideBoundary
});
this.addEventListener("touchstart", this._xslideHandler, false);
this.addEventListener("touchmove", this._xslideHandler, false);
this.addEventListener("touchend", this._xslideHandler, false);
}
// XXX This event was never actually implemented (bug 223411).

View File

@ -101,6 +101,11 @@ function CrossSlideHandler(aNode, aThresholds) {
for(let key in aThresholds)
this.thresholds[key] = aThresholds[key];
}
aNode.addEventListener("touchstart", this, false);
aNode.addEventListener("touchmove", this, false);
aNode.addEventListener("touchend", this, false);
aNode.addEventListener("touchcancel", this, false);
aNode.ownerDocument.defaultView.addEventListener("scroll", this, false);
}
CrossSlideHandler.prototype = {
@ -135,6 +140,10 @@ CrossSlideHandler.prototype = {
case "touchmove":
this._onTouchMove(aEvent);
break;
case "scroll":
case "touchcancel":
this.cancel(aEvent);
break;
case "touchend":
this._onTouchEnd(aEvent);
break;

View File

@ -43,7 +43,8 @@ pref("gfx.axis.fling_friction", "0.002");
pref("gfx.axis.fling_stopped_threshold", "0.2");
// 0 = free, 1 = standard, 2 = sticky
pref("apzc.axis_lock_mode", 1);
pref("apzc.axis_lock_mode", 2);
pref("apzc.cross_slide.enabled", true);
// Enable Microsoft TSF support by default for imes.
pref("intl.enable_tsf_support", true);