Back out cec9b916defe (bug 690739) because of Tzoom regression

This commit is contained in:
Matt Brubeck 2011-10-01 09:24:59 -07:00
parent 6f07f0eace
commit 5f8c10092b

View File

@ -1362,16 +1362,17 @@ Browser.MainDragger.prototype = {
this._panToolbars = !isTablet;
this._grabSidebar = false;
this._canGrabSidebar = false;
// In landscape portrait mode, swiping from the left margin drags the tab sidebar.
if (isTablet && !Util.isPortrait()) {
let grabSidebarMargin = TabsPopup.visible ? 30 : 5;
// Don't actually grab until we see whether the swipe is horizontal in dragMove.
this._canGrabSidebar = ((Util.localeDir == Util.LOCALE_DIR_LTR)
this._grabSidebar = ((Util.localeDir == Util.LOCALE_DIR_LTR)
? (clientX - bcr.left < 30)
: (bcr.right - clientX < 30));
}
if (this._grabSidebar)
Browser.grabSidebar();
if (this._sidebarTimeout) {
clearTimeout(this._sidebarTimeout);
this._sidebarTimeout = null;
@ -1383,7 +1384,6 @@ Browser.MainDragger.prototype = {
Browser.ungrabSidebar();
return;
}
if (this._contentView && this._contentView._updateCacheViewport)
this._contentView._updateCacheViewport();
this._contentView = null;
@ -1392,10 +1392,6 @@ Browser.MainDragger.prototype = {
},
dragMove: function dragMove(dx, dy, scroller, aIsKinetic) {
if (this._canGrabSidebar && !this._grabSidebar && dx) {
this._grabSidebar = true;
Browser.grabSidebar();
}
if (this._grabSidebar) {
Browser.slideSidebarBy(dx);
return;