document.getAnonymousElementByAttribute(this, "anonid", "scrollbox"); document.getAnonymousElementByAttribute(this, "anonid", "scrollbutton-up"); document.getAnonymousElementByAttribute(this, "anonid", "scrollbutton-down"); null null null null null return true; = this.duration ? 1 : 1 - Math.pow(1 - timePassed / this.duration, 2); this.scrollbox.scrollPosition = this.startPos + (this.distance * pos); if (pos == 1) this.scrollbox._stopSmoothScroll(); else window.mozRequestAnimationFrame(); } })]]> 0 ? rect[end] + 1 : rect[start] - 1; var nextElement = this._elementFromPoint(x, index); if (!nextElement) return; var targetElement; if (this._isRTLScrollbox) index *= -1; while (index < 0 && nextElement) { if (this._canScrollToElement(nextElement)) targetElement = nextElement; nextElement = nextElement.previousSibling; index++; } while (index > 0 && nextElement) { if (this._canScrollToElement(nextElement)) targetElement = nextElement; nextElement = nextElement.nextSibling; index--; } if (!targetElement) return; this.ensureElementIsVisible(targetElement, aSmoothScroll); ]]> elements[high].getBoundingClientRect()[end]) return null; var mid, rect; while (low <= high) { mid = Math.floor((low + high) / 2); rect = elements[mid].getBoundingClientRect(); if (rect[start] > aX) high = mid - 1; else if (rect[end] < aX) low = mid + 1; else return elements[mid]; } // There's no element at the requested coordinate, but the algorithm // from above yields an element next to it, in a random direction. // The desired scrolling direction leads to the correct element. if (!aPhysicalScrollDir) return null; if (aPhysicalScrollDir < 0 && rect[start] > aX) mid = Math.max(mid - 1, 0); else if (aPhysicalScrollDir > 0 && rect[end] < aX) mid = Math.min(mid + 1, elements.length - 1); return elements[mid]; ]]> 0 [null, null] 1) this._prevMouseScrolls.shift(); this._prevMouseScrolls.push(isVertical); } event.stopPropagation(); ]]> 0 150 3) return; var scrollBack = (aEvent.originalTarget == this._scrollButtonUp); var scrollLeftOrUp = this._isRTLScrollbox ? !scrollBack : scrollBack; var targetElement; if (aEvent.detail == 2) { // scroll by the size of the scrollbox let [start, end] = this._startEndProps; let x; if (scrollLeftOrUp) x = this.scrollClientRect[start] - this.scrollClientSize; else x = this.scrollClientRect[end] + this.scrollClientSize; targetElement = this._elementFromPoint(x, scrollLeftOrUp ? -1 : 1); // the next partly-hidden element will become fully visible, // so don't scroll too far if (targetElement) targetElement = scrollBack ? targetElement.nextSibling : targetElement.previousSibling; } if (!targetElement) { // scroll to the first resp. last element let elements = this._getScrollableElements(); targetElement = scrollBack ? elements[0] : elements[elements.length - 1]; } this.ensureElementIsVisible(targetElement); ]]>