Bug 598331 - Fix pinch zoom regression [r=mfinkle]

This commit is contained in:
Matt Brubeck 2010-11-10 21:00:09 -08:00
parent 63d0c42e73
commit 801956e22a
2 changed files with 8 additions and 8 deletions

View File

@ -197,7 +197,7 @@ var Browser = {
let keySender = new ContentCustomKeySender(Elements.browsers);
let mouseModule = new MouseModule();
let gestureModule = new GestureModule();
let gestureModule = new GestureModule(Elements.browsers);
let scrollWheelModule = new ScrollwheelModule(Elements.browsers);
ContentTouchHandler.init();

View File

@ -981,12 +981,12 @@ ScrollwheelModule.prototype = {
// chrome-only, we must listen for the simple gesture events during
// the capturing phase and call stopPropagation on every event.
function GestureModule() {
window.addEventListener("MozSwipeGesture", this, true);
window.addEventListener("MozMagnifyGestureStart", this, true);
window.addEventListener("MozMagnifyGestureUpdate", this, true);
window.addEventListener("MozMagnifyGesture", this, true);
window.addEventListener("CancelTouchSequence", this, true);
function GestureModule(aElement) {
aElement.addEventListener("MozSwipeGesture", this, true);
aElement.addEventListener("MozMagnifyGestureStart", this, true);
aElement.addEventListener("MozMagnifyGestureUpdate", this, true);
aElement.addEventListener("MozMagnifyGesture", this, true);
aElement.addEventListener("CancelTouchSequence", this, true);
}
GestureModule.prototype = {
@ -1072,7 +1072,7 @@ GestureModule.prototype = {
event.initEvent("CancelTouchSequence", true, true);
let success = aEvent.target.dispatchEvent(event);
if (!success || (aEvent.target instanceof XULElement) || !Browser.selectedTab.allowZoom)
if (!success || !Browser.selectedTab.allowZoom)
return;
// create the AnimatedZoom object for fast arbitrary zooming