diff -r 244fcb70db93 chrome/content/bindings.xml --- a/chrome/content/bindings.xml Wed Nov 04 17:34:37 2009 -0500 +++ b/chrome/content/bindings.xml Thu Nov 05 19:18:07 2009 +0100 @@ -46,17 +46,17 @@ - + @@ -654,17 +654,17 @@ - + @@ -888,16 +888,119 @@ func.call(this, event); } ]]> + + + + + + + + + + + + + + 0 + 0 + + 0 + 0 + 0 + + + + + 0) ? window.innerWidth - (rect.width - rect.left) : 0; + this._hscroller.left = rect.width - offset - 8; + this._vscroller.top = rect.height - 8; + + this._height = Math.max(50 * ( (rect.height / h.value) * 8), 20); + this._width = Math.max(50 * ( (rect.width / w.value) * 8), 20); + + this._hscroller.height = this._height; + this._vscroller.width = this._width; + this._hidden = false; + + // XXX dirty + let [leftvis,rightvis] = Browser.computeSidebarVisibility(); + if (leftvis > 0.02 || rightvis > 0.02 || (rect.width == w.value)) + this._vscroller.hidden = true; + } + + let sX = {}, sY = {}; + this.scrollBoxObject.getPosition(sX, sY); + + let newHeight = (this._containerH - this._height) / ((this._pannableH - this._containerH) / Math.max(sY.value, 1)); + this._hscroller.top= Math.min(Math.max(1, newHeight), this._containerH - this._height - 1); + + if (!this._vscroller.hidden) { + let newWidth = (this._containerW - this._width) / ((this._pannableW - this._containerW) / Math.max(sX.value, 1)); + this._vscroller.left= Math.min(Math.max(1, newWidth), this._containerW - this._width - 1); + } + + let self = this; + clearTimeout(this._timeout); + this._timeout = setTimeout(function() { self._hidden = true;}, 200); + ]]> + + + + 0 + 0 + + 0 + + document.getAnonymousElementByAttribute(this, "anonid", "hscroller"); + document.getAnonymousElementByAttribute(this, "anonid", "vscroller"); + + + + document.getAnonymousElementByAttribute(this, "anonid", "scrollbox"); + + + + + + + null + + + + + + + diff -r 244fcb70db93 chrome/content/browser.css --- a/chrome/content/browser.css Wed Nov 04 17:34:37 2009 -0500 +++ b/chrome/content/browser.css Thu Nov 05 19:18:07 2009 +0100 @@ -89,16 +89,21 @@ menulist { -moz-binding: url("chrome://browser/content/bindings.xml#menulist"); } #select-list > option { -moz-binding: url("chrome://browser/content/bindings.xml#chrome-select-option"); } /* richlist defaults ------------------------------------------------------- */ +[pannable="true"] > scrollbox, +scrollbox[pannable="true"] { + -moz-binding: url("chrome://browser/content/bindings.xml#scrollbox"); +} + richlistitem { -moz-binding: url("chrome://browser/content/bindings.xml#richlistitem"); } richlistitem[typeName="local"] { -moz-binding: url("chrome://browser/content/bindings/extensions.xml#extension-local"); } diff -r 244fcb70db93 chrome/content/browser.xul --- a/chrome/content/browser.xul Wed Nov 04 17:34:37 2009 -0500 +++ b/chrome/content/browser.xul Thu Nov 05 19:18:07 2009 +0100 @@ -231,17 +231,17 @@ - + - +