From a1be17c1cea81ebb1e8b131a662c698d78f3f7f2 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 4 Jun 2018 13:17:38 +0200 Subject: Issue #303 Part 1: Move basilisk files from /browser to /application/basilisk --- .../components/customizableui/content/panelUI.xml | 509 +++++++++++++++++++++ 1 file changed, 509 insertions(+) create mode 100644 application/basilisk/components/customizableui/content/panelUI.xml (limited to 'application/basilisk/components/customizableui/content/panelUI.xml') diff --git a/application/basilisk/components/customizableui/content/panelUI.xml b/application/basilisk/components/customizableui/content/panelUI.xml new file mode 100644 index 000000000..6893bd8ff --- /dev/null +++ b/application/basilisk/components/customizableui/content/panelUI.xml @@ -0,0 +1,509 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "clickCapturer"); + + + document.getAnonymousElementByAttribute(this, "anonid", "viewContainer"); + + + document.getAnonymousElementByAttribute(this, "anonid", "mainViewContainer"); + + + document.getAnonymousElementByAttribute(this, "anonid", "subViews"); + + + document.getAnonymousElementByAttribute(this, "anonid", "viewStack"); + + + this.parentNode; + + + null + null + 0 + null + false + false + + + + + + + + + return this._ignoreMutations; + + + + + + + return this.__transitioning; + + + + + + + + + + + + + + + + + + + + val === false); + } catch (e) { + Components.utils.reportError(e); + cancel = true; + } + } + + if (cancel) { + return; + } + + this._currentSubView = viewNode; + + // Now we have to transition the panel. There are a few parts to this: + // + // 1) The main view content gets shifted so that the center of the anchor + // node is at the left-most edge of the panel. + // 2) The subview deck slides in so that it takes up almost all of the + // panel. + // 3) If the subview is taller then the main panel contents, then the panel + // must grow to meet that new height. Otherwise, it must shrink. + // + // All three of these actions make use of CSS transformations, so they + // should all occur simultaneously. + this.setAttribute("viewtype", "subview"); + this._shiftMainView(aAnchor); + + this._mainViewHeight = this._viewStack.clientHeight; + + let newHeight = this._heightOfSubview(viewNode, this._subViews); + this._setViewContainerHeight(newHeight); + + this._subViewObserver.observe(viewNode, { + attributes: true, + characterData: true, + childList: true, + subtree: true + }); + }.bind(this)); + ]]> + + + + + { + container.removeEventListener("transitionend", onTransitionEnd); + this._transitioning = false; + }; + + container.addEventListener("transitionend", onTransitionEnd); + container.style.height = `${aHeight}px`; + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + if (height != getComputedStyle(this).height || --count == 0) { + clearInterval(interval); + this.style.removeProperty("max-height"); + } + }, 0); + ]]> + + + + + + 0) { + elementCS = win.getComputedStyle(element); + } + } + if (elementCS) { + // Include margins - but not borders or paddings because they + // were dealt with above. + height += parseFloat(elementCS.marginTop) + parseFloat(elementCS.marginBottom); + } + return height; + } + let win = aSubview.ownerDocument.defaultView; + let body = aSubview.querySelector(".panel-subview-body"); + let height = getFullHeight(body || aSubview); + if (body) { + let header = aSubview.querySelector(".panel-subview-header"); + let footer = aSubview.querySelector(".panel-subview-footer"); + height += (header ? getFullHeight(header) : 0) + + (footer ? getFullHeight(footer) : 0); + } + if (aContainerToCheck) { + let containerCS = win.getComputedStyle(aContainerToCheck); + height += parseFloat(containerCS.paddingTop) + parseFloat(containerCS.paddingBottom); + } + return Math.ceil(height); + ]]> + + + + + + + + + + + + + -- cgit v1.2.3