mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 309538 Autoscroll indicator should show possible scrolling directions
r=db48x, sr=neil, icons by neil
This commit is contained in:
parent
59cb3a5e99
commit
397bd3e22b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user