%findBarDTD; ]> null null null null null null ({}) null false null Components.classes['@mozilla.org/preferences-service;1'] .getService(Components.interfaces.nsIPrefBranch); Components.classes['@mozilla.org/atom-service;1'] .getService(Components.interfaces.nsIAtomService); null // see bug 63370 for details this._mStrBundle = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService) .createBundle("chrome://global/locale/browser.properties"); } return this._mStrBundle; ]]> null 1 null false false null null null false 0) this.sessionHistory.PurgeHistory(purge); ]]> 10 null null null null null null null false 8) { // need high color for transparency // Exclude second-rate platforms this._autoScrollPopup.setAttribute("transparent", !/BeOS|OS\/2/.test(navigator.appVersion)); // Enable translucency on Windows and Mac this._autoScrollPopup.setAttribute("translucent", /Win|Mac/.test(navigator.platform)); } // this is a list of overflow property values that allow scrolling const scrollingAllowed = ['scroll', 'auto']; // go upward in the DOM and find any parent element that has a overflow // area and can therefore be scrolled for (this._scrollable = event.originalTarget; this._scrollable; this._scrollable = this._scrollable.parentNode) { // do not use overflow based autoscroll for and // Elements or non-html elements such as svg or Document nodes // also make sure to skip select elements that are not multiline if (!(this._scrollable instanceof HTMLElement) || ((this._scrollable instanceof HTMLSelectElement) && !this._scrollable.multiple)) { continue; } var overflowx = this._scrollable.ownerDocument.defaultView .getComputedStyle(this._scrollable, '') .getPropertyValue('overflow-x'); var overflowy = this._scrollable.ownerDocument.defaultView .getComputedStyle(this._scrollable, '') .getPropertyValue('overflow-y'); // we already discarded non-multiline selects so allow vertical // scroll for multiline ones directly without checking for a // overflow property var scrollVert = this._scrollable.scrollTopMax && (this._scrollable instanceof HTMLSelectElement || scrollingAllowed.indexOf(overflowy) >= 0); // do not allow horizontal scrolling for select elements, it leads // to visual artifacts and is not the expected behavior anyway if (!(this._scrollable instanceof HTMLSelectElement) && this._scrollable.scrollLeftMax && scrollingAllowed.indexOf(overflowx) >= 0) { this._autoScrollPopup.setAttribute("scrolldir", scrollVert ? "NSEW" : "EW"); break; } else if (scrollVert) { this._autoScrollPopup.setAttribute("scrolldir", "NS"); break; } } if (!this._scrollable) { this._scrollable = event.originalTarget.ownerDocument.defaultView; if (this._scrollable.scrollMaxX > 0) { this._autoScrollPopup.setAttribute("scrolldir", this._scrollable.scrollMaxY > 0 ? "NSEW" : "EW"); } else if (this._scrollable.scrollMaxY > 0) { this._autoScrollPopup.setAttribute("scrolldir", "NS"); } else { this._scrollable = null; // abort scrolling return; } } 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; this._scrollErrorX = 0; this._scrollErrorY = 0; this._lastFrame = window.mozAnimationStartTime; window.addEventListener("mousemove", this, true); window.addEventListener("mousedown", this, true); window.addEventListener("mouseup", this, true); window.addEventListener("contextmenu", this, true); window.addEventListener("keydown", this, true); window.addEventListener("keypress", this, true); window.addEventListener("keyup", this, true); window.mozRequestAnimationFrame(this); ]]> 0) return Math.floor(num); return Math.ceil(num); ]]> 1) return val * Math.sqrt(val) - 1; if (val < -1) return val * Math.sqrt(-val) + 1; return 0; ]]> 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._autoScrollPopup.removeEventListener("popuphidden", this, true); this.stopScroll(); break; } case "keydown": { if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) { // the escape key will be processed by // nsXULPopupManager::KeyDown and the panel will be closed. // So, don't consume the key event here. break; } // don't break here. we need to eat keydown events. } case "keypress": case "keyup": { // All keyevents should be eaten here during autoscrolling. aEvent.stopPropagation(); aEvent.preventDefault(); break; } } } ]]>