michael@0: michael@0: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: document.getAnonymousElementByAttribute(this, "class", michael@0: "menupopup-drop-indicator-bar"); michael@0: michael@0: michael@0: michael@0: document.getAnonymousElementByAttribute(this, "class", michael@0: "popup-internal-box"); michael@0: michael@0: michael@0: michael@0: PlacesUIUtils.getViewForNode(this); michael@0: michael@0: michael@0: michael@0: michael@0: = firstChildTop || michael@0: target.boxObject.y <= lastChildBottom; michael@0: michael@0: // Hide the dropmarker if current node is not a Places node. michael@0: return !(target && target._placesNode && betweenMarkers); michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: elt.boxObject.screenY + michael@0: elt.boxObject.height / 2) michael@0: elt = elt.nextSibling; michael@0: newMarginTop = elt ? elt.boxObject.screenY - sbo.screenY : michael@0: sbo.height; michael@0: } michael@0: else if (scrollDir == 1) michael@0: newMarginTop = sbo.height; michael@0: michael@0: // Set the new marginTop based on arrowscrollbox. michael@0: newMarginTop += sbo.y - this._scrollBox.boxObject.y; michael@0: this._indicatorBar.firstChild.style.marginTop = newMarginTop + "px"; michael@0: this._indicatorBar.hidden = false; michael@0: michael@0: event.preventDefault(); michael@0: event.stopPropagation(); michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: 0) { michael@0: arrowbox.pack = "end"; michael@0: } else { michael@0: arrowbox.pack = "start"; michael@0: } michael@0: arrowbox.style.transform = "translate(0, " + -offset + "px)"; michael@0: michael@0: // The assigned side stays the same regardless of direction. michael@0: var isRTL = (window.getComputedStyle(this).direction == "rtl"); michael@0: michael@0: if (position.indexOf("start_") == 0) { michael@0: container.dir = "reverse"; michael@0: this.setAttribute("side", isRTL ? "left" : "right"); michael@0: } michael@0: else { michael@0: container.dir = ""; michael@0: this.setAttribute("side", isRTL ? "right" : "left"); michael@0: } michael@0: } michael@0: else if (position.indexOf("before_") == 0 || position.indexOf("after_") == 0) { michael@0: container.orient = ""; michael@0: arrowbox.orient = ""; michael@0: if (position.indexOf("_end") > 0) { michael@0: arrowbox.pack = "end"; michael@0: } else { michael@0: arrowbox.pack = "start"; michael@0: } michael@0: arrowbox.style.transform = "translate(" + -offset + "px, 0)"; michael@0: michael@0: if (position.indexOf("before_") == 0) { michael@0: container.dir = "reverse"; michael@0: this.setAttribute("side", "bottom"); michael@0: } michael@0: else { michael@0: container.dir = ""; michael@0: this.setAttribute("side", "top"); michael@0: } michael@0: } michael@0: michael@0: arrow.hidden = false; michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: 0; michael@0: this.setAttribute("disablepointereventsfortransition", disablePointerEvents); michael@0: } else { michael@0: disablePointerEvents = this.getAttribute("disablepointereventsfortransition") == "true"; michael@0: } michael@0: if (!disablePointerEvents) { michael@0: this.style.removeProperty("pointer-events"); michael@0: } michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: