diff --git a/mozilla/toolkit/content/jar.mn b/mozilla/toolkit/content/jar.mn index 5a7578e04f8..1485620ba9c 100644 --- a/mozilla/toolkit/content/jar.mn +++ b/mozilla/toolkit/content/jar.mn @@ -72,9 +72,6 @@ toolkit.jar: *+ content/global/bindings/tree.xml (widgets/tree.xml) *+ content/global/bindings/wizard.xml (widgets/wizard.xml) *+ content/global/bindings/findbar.xml (widgets/findbar.xml) - content/global/bindings/autoscroll_all.png (widgets/autoscroll_all.png) - content/global/bindings/autoscroll_h.png (widgets/autoscroll_h.png) - content/global/bindings/autoscroll_v.png (widgets/autoscroll_v.png) #ifdef XP_MACOSX * content/global/macWindowMenu.js (macWindowMenu.js) #endif diff --git a/mozilla/toolkit/content/widgets/browser.xml b/mozilla/toolkit/content/widgets/browser.xml index 2fc747cc6d3..e0a0f474fab 100644 --- a/mozilla/toolkit/content/widgets/browser.xml +++ b/mozilla/toolkit/content/widgets/browser.xml @@ -23,6 +23,8 @@ - Contributor(s): - Peter Annema (Original Author of ) - Peter Parente + - Christopher Thomas + - Michael Ventnor - - Alternatively, the contents of this file may be used under the terms of - either the GNU General Public License Version 2 or later (the "GPL"), or @@ -459,8 +461,8 @@ if (!tabBrowser || tabBrowser.mCurrentBrowser == this) this.fastFind.setDocShell(this.docShell); - if (this._isScrolling) - this.stopScroll(); + if (this._scrollingView) + this._autoScrollPopup.hidePopup(); ]]> @@ -670,40 +672,82 @@ 3 10 - null - false - null - false + null + null null null null null + null + + + + 0) { + this._autoScrollPopup.setAttribute("scrolldir", this._scrollingView.scrollMaxY > 0 ? "NSEW" : "EW"); + } + else if (this._scrollingView.scrollMaxY > 0) { + this._autoScrollPopup.setAttribute("scrolldir", "NS"); + } + else { + this._scrollingView = null; // abort scrolling + return; + } + + document.popupNode = null; + this._autoScrollPopup.showPopup(document.documentElement, + event.screenX, + event.screenY, + "popup", null, null); + this._ignoreMouseEvents = true; + this._startX = event.screenX; + this._startY = event.screenY; + this._screenX = event.screenX; + this._screenY = event.screenY; + + window.addEventListener("mousemove", this, true); + window.addEventListener("mousedown", this, true); + window.addEventListener("mouseup", this, true); + window.addEventListener("contextmenu", this, true); + + this._autoScrollTimer = setInterval(function(self) { self.autoScrollLoop(); }, + 20, this); + ]]> + + + @@ -743,75 +787,38 @@ ]]> - - - - 0) scrollType--; - if (this._clientFrameDoc.defaultView.scrollMaxX > 0) scrollType++; - - var imageWidth = 28; - var imageHeight = 28; - - // marker - var el = this._clientFrameDoc.createElementNS("http://www.w3.org/1999/xhtml", "img"); - - el.src = scrollImages[scrollType]; - el.style.position = "fixed"; - el.style.left = left - imageWidth / 2 + "px"; - el.style.top = top - imageHeight / 2 + "px"; - el.style.width = imageWidth + "px"; - el.style.height = imageHeight + "px"; - el.style.cursor = scrollCursor[scrollType]; - el.style.zIndex = 2147483647; //Max Int - el.style.borderStyle = "none"; - el.style.padding = "0"; - el.style.margin = "0"; - - this._clientFrameDoc.documentElement.appendChild(el); - - this._autoScrollMarkerImage = el; - ]]> - - - - - - this._AUTOSCROLL_SNAP || x < -this._AUTOSCROLL_SNAP) || - (y > this._AUTOSCROLL_SNAP || y < -this._AUTOSCROLL_SNAP)) - this._snapOn = false; - } - ]]> - - this._AUTOSCROLL_SNAP || x < -this._AUTOSCROLL_SNAP) || + (y > this._AUTOSCROLL_SNAP || y < -this._AUTOSCROLL_SNAP)) + this._ignoreMouseEvents = false; + break; + } + case "mouseup": + case "mousedown": + case "contextmenu": { + if (!this._ignoreMouseEvents) + this._autoScrollPopup.hidePopup(); + this._ignoreMouseEvents = false; + break; + } + case "popuphidden": { this.stopScroll(); + break; + } + } } ]]> @@ -865,34 +872,15 @@ } ]]> - + - - - diff --git a/mozilla/toolkit/themes/gnomestripe/global/global.css b/mozilla/toolkit/themes/gnomestripe/global/global.css index 21000b76bc7..95fe441b759 100644 --- a/mozilla/toolkit/themes/gnomestripe/global/global.css +++ b/mozilla/toolkit/themes/gnomestripe/global/global.css @@ -185,3 +185,25 @@ sidebarheader > label { .toolbar-focustarget { -moz-user-focus: ignore !important; } + +/* :::::: autoscroll popup ::::: */ + +#autoscroller { + height: 28px; + width: 28px; + border: none; + margin: -14px; + padding: 0; + background-position: center top; + background-image: url("chrome://global/skin/icons/autoscroll.png"); + background-color: transparent; + -moz-appearance: none; +} + +#autoscroller[scrolldir="NS"] { + background-position: center center; +} + +#autoscroller[scrolldir="EW"] { + background-position: center bottom; +} diff --git a/mozilla/toolkit/themes/gnomestripe/global/popup.css b/mozilla/toolkit/themes/gnomestripe/global/popup.css index 2facca3dbc2..a6f5187c301 100644 --- a/mozilla/toolkit/themes/gnomestripe/global/popup.css +++ b/mozilla/toolkit/themes/gnomestripe/global/popup.css @@ -45,7 +45,7 @@ /* ::::: menupopup ::::: */ menupopup, popup { - -moz-appearance: menupopup !important; + -moz-appearance: menupopup; min-width: 1px; } diff --git a/mozilla/toolkit/themes/pinstripe/global/global.css b/mozilla/toolkit/themes/pinstripe/global/global.css index 2757eaa8463..d8ad8c020a6 100644 --- a/mozilla/toolkit/themes/pinstripe/global/global.css +++ b/mozilla/toolkit/themes/pinstripe/global/global.css @@ -234,3 +234,23 @@ browser { border-top: 1px solid #bebebe; } +/* :::::: autoscroll popup ::::: */ + +#autoscroller { + height: 28px; + width: 28px; + border: none; + margin: -14px; + padding: 0; + background-image: url("chrome://global/skin/icons/autoscroll.png"); + background-color: transparent; + -moz-appearance: none; +} + +#autoscroller[scrolldir="NS"] { + background-position: left center; +} + +#autoscroller[scrolldir="EW"] { + background-position: left bottom; +} diff --git a/mozilla/toolkit/themes/pinstripe/global/icons/autoscroll.png b/mozilla/toolkit/themes/pinstripe/global/icons/autoscroll.png new file mode 100644 index 00000000000..e460930a9e7 Binary files /dev/null and b/mozilla/toolkit/themes/pinstripe/global/icons/autoscroll.png differ diff --git a/mozilla/toolkit/themes/pinstripe/global/jar.mn b/mozilla/toolkit/themes/pinstripe/global/jar.mn index 5ed187d33c2..d74c5768378 100644 --- a/mozilla/toolkit/themes/pinstripe/global/jar.mn +++ b/mozilla/toolkit/themes/pinstripe/global/jar.mn @@ -112,6 +112,7 @@ classic.jar: + skin/classic/global/icons/alert-message.gif (icons/alert-message.gif) + skin/classic/global/icons/alert-question.gif (icons/alert-question.gif) + skin/classic/global/icons/autocomplete-dropmarker.png (icons/autocomplete-dropmarker.png) ++ skin/classic/global/icons/autoscroll.png (icons/autoscroll.png) + skin/classic/global/icons/chevron.png (icons/chevron.png) + skin/classic/global/icons/close.gif (icons/close.gif) + skin/classic/global/icons/closetab-active.png (icons/closetab-active.png) diff --git a/mozilla/toolkit/themes/winstripe/global/global.css b/mozilla/toolkit/themes/winstripe/global/global.css index ad0920a2d01..b297ffcfbf0 100644 --- a/mozilla/toolkit/themes/winstripe/global/global.css +++ b/mozilla/toolkit/themes/winstripe/global/global.css @@ -184,3 +184,35 @@ sidebarheader > label { .toolbar-focustarget { -moz-user-focus: ignore !important; } + +/* :::::: autoscroll popup ::::: */ + +#autoscroller { + height: 28px; + width: 28px; + border: none; + margin: -14px; + padding: 0; + background-image: url("chrome://global/skin/icons/autoscroll.png"); + background-color: transparent; +%ifdef XP_WIN + background-position: right top; +%endif + -moz-appearance: none; +} + +#autoscroller[scrolldir="NS"] { +%ifdef XP_WIN + background-position: right center; +%else + background-position: left center; +%endif +} + +#autoscroller[scrolldir="EW"] { +%ifdef XP_WIN + background-position: right bottom; +%else + background-position: left bottom; +%endif +} diff --git a/mozilla/toolkit/themes/winstripe/global/icons/autoscroll.png b/mozilla/toolkit/themes/winstripe/global/icons/autoscroll.png new file mode 100644 index 00000000000..e460930a9e7 Binary files /dev/null and b/mozilla/toolkit/themes/winstripe/global/icons/autoscroll.png differ diff --git a/mozilla/toolkit/themes/winstripe/global/jar.mn b/mozilla/toolkit/themes/winstripe/global/jar.mn index 8abb1ddc30c..5349288454d 100644 --- a/mozilla/toolkit/themes/winstripe/global/jar.mn +++ b/mozilla/toolkit/themes/winstripe/global/jar.mn @@ -74,6 +74,7 @@ classic.jar: skin/classic/global/icons/autocomplete-dropmark-bkgnd.png (icons/autocomplete-dropmark-bkgnd.png) skin/classic/global/icons/autocomplete-dropmark-bkgnd-mid-top.png (icons/autocomplete-dropmark-bkgnd-mid-top.png) skin/classic/global/icons/autocomplete-dropmark-bkgnd-mid-bottom.png (icons/autocomplete-dropmark-bkgnd-mid-bottom.png) + skin/classic/global/icons/autoscroll.png (icons/autoscroll.png) skin/classic/global/icons/Close.gif (icons/Close.gif) skin/classic/global/icons/close.png (icons/close.png) skin/classic/global/icons/alltabs.png (icons/alltabs.png)