Bug 309538 Autoscroll indicator should show possible scrolling directions

r=db48x, sr=neil, icons by neil


git-svn-id: svn://10.0.0.236/trunk@205880 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cst%andrew.cmu.edu 2006-07-29 05:44:36 +00:00
parent 7fe4db7649
commit 1bc765af7e

View File

@ -605,9 +605,22 @@ function startScrolling(event)
document.documentElement.appendChild(gAutoScrollPopup);
}
gScrollingView = event.originalTarget.ownerDocument.defaultView;
var scrollingDir;
if (gScrollingView.scrollMaxX > 0) {
gAutoScrollPopup.setAttribute("scrolldir", gScrollingView.scrollMaxY > 0 ? "NSEW" : "EW");
}
else if (gScrollingView.scrollMaxY > 0) {
gAutoScrollPopup.setAttribute("scrolldir", "NS");
}
else {
gScrollingView = null; // abort scrolling
return;
}
document.popupNode = null;
gAutoScrollPopup.showPopup(document.documentElement, event.screenX, event.screenY,
"popup", null, null);
"popup", null, null);
gIgnoreMouseEvents = true;
gStartX = event.screenX;
gStartY = event.screenY;
@ -617,7 +630,6 @@ function startScrolling(event)
addEventListener('mouseup', handleMouseUpDown, true);
addEventListener('mousedown', handleMouseUpDown, true);
gAutoScrollTimer = setInterval(autoScrollLoop, 10);
gScrollingView = event.originalTarget.ownerDocument.defaultView;
}
function handleMouseMove(event)