From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../resources/content/autocomplete.css | 46 + .../resources/content/autocomplete.xml | 1646 ++++++++++++++++++++ 2 files changed, 1692 insertions(+) create mode 100644 xpfe/components/autocomplete/resources/content/autocomplete.css create mode 100644 xpfe/components/autocomplete/resources/content/autocomplete.xml (limited to 'xpfe/components/autocomplete/resources/content') diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.css b/xpfe/components/autocomplete/resources/content/autocomplete.css new file mode 100644 index 000000000..6c67bad2e --- /dev/null +++ b/xpfe/components/autocomplete/resources/content/autocomplete.css @@ -0,0 +1,46 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + +.autocomplete-result-popupset { + width: 0 !important; +} + +.autocomplete-result-popup { + display: -moz-popup !important; +} + +/* the C++ implementation of widgets is too eager to make popups visible. + this causes problems (bug 120155 and others), thus this workaround: */ +.autocomplete-result-popup[hidden="true"] { + visibility: hidden; +} + +.autocomplete-tree { + -moz-user-focus: ignore; +} + +.autocomplete-history-dropmarker { + display: none; +} + +.autocomplete-history-dropmarker[enablehistory="true"] { + display: -moz-box; +} + +/* The following rule is here to fix bug 96899 (and now 117952). + Somehow trees create a situation + in which a popupset flows itself as if its popup child is directly within it + instead of the placeholder child that should actually be inside the popupset. + This is a stopgap measure, and it does not address the real bug. */ +popupset { + max-width: 0px; + width: 0px; + min-width: 0%; + min-height: 0%; +} + +treecolpicker { + display: none; +} diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml new file mode 100644 index 000000000..93b6dfdb0 --- /dev/null +++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml @@ -0,0 +1,1646 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + true + + + false + + + + + + + ({}) + ({}) + ({}) + null + 0 + false + false + false + false + false + false + null + "" + false + null + false + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 && !results.errorDescription) + return name; + } + return null; + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 && + !results.errorDescription && results.defaultIndex != -1) + { + val = results.getValueAt(results.defaultIndex); + this.setTextValue(val); + this.mDefaultMatchFilled = true; + this.mNeedToFinish = false; + break; + } + } + + if (this.mNeedToFinish) { + // if a search is happening at this juncture, bail out of this function + // and let the search finish, and tell it to come back here when it's done + if (this.isSearching) { + this.mFinishAfterSearch = true; + this.mFireAfterSearch = aFireTextCommand; + return; + } + + this.mNeedToFinish = false; + var defaultSession = this.getDefaultSession(); + if (defaultSession) + { + // preselect the first one + var first = this.getSessionValueAt(defaultSession, 0); + this.setTextValue(first); + this.mDefaultMatchFilled = true; + } + } + } + + this.stopLookup(); + + this.closePopup(); + } + + this.mNeedToComplete = false; + this.clearTimer(); + + if (aFireTextCommand) + this._fireEvent("textentered", this.userAction, aTriggeringEvent); + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > " + resultValue); + this.mInputElt.setSelectionRange(entry.length, this.value.length); + } else { + var postIndex = resultValue.indexOf(this.value); + if (postIndex >= 0) { + var startPt = this.value.length; + this.setTextValue(this.value + + resultValue.substr(startPt+postIndex)); + this.mInputElt.setSelectionRange(startPt, this.value.length); + } + } + } + this.mNeedToComplete = true; + this.ignoreInputEvent = false; + this.mDefaultMatchFilled = true; + } + } + ]]> + + + + + + + = this.minResultsForPopup || + this.mFailureItems)) { + var w = this.boxObject.width; + if (w != this.popup.boxObject.width) + this.popup.setAttribute("width", w); + this.popup.showPopup(this, -1, -1, "popup", "bottomleft", "topleft"); + this.mMenuOpen = true; + } + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + document.getBindingParent(this); + + + + document.getAnonymousElementByAttribute(this, "anonid", "tree"); + + + + document.getAnonymousElementByAttribute(this, "anonid", "treecols"); + + + + document.getAnonymousElementByAttribute(this, "anonid", "treebody"); + + + + null + + + + + + + + 0 + 0 + + + + + + + + + + + + + + this.selection.clearSelection(); + + + + + + + + + aMaxRow) + return aMaxRow; + if (aIndex < 0) + return 0; + return aIndex; + ]]> + + + + + + null + + + + + + + + if (!this.view || !this.selection.count) + return -1; + var start = {}, end = {}; + this.view.selection.getRangeAt(0, start, end); + return start.value; + + + if (this.view) { + this.selection.select(val); + if (val >= 0) { + this.view.selection.currentIndex = -1; + this.tree.treeBoxObject.ensureRowIsVisible(val); + } + } + return val; + + + + + + + + + 100 ? width : 100); + // Adjust the direction (which is not inherited) of the autocomplete + // popup list, based on the textbox direction. (Bug 707039) + this.style.direction = aElement.ownerDocument.defaultView + .getComputedStyle(aElement) + .direction; + this.popupBoxObject.setConsumeRollupEvent(aInput.consumeRollupEvent + ? PopupBoxObject.ROLLUP_CONSUME + : PopupBoxObject.ROLLUP_NO_CONSUME); + this.openPopup(aElement, "after_start", 0, 0, false, false); + if (this.state != "closed") + this.input = aInput; + } + ]]> + + + + + this.hidePopup(); + + + + + + if (this.view) + this.adjustHeight(); + this.tree.treeBoxObject.invalidate(); + + + + + + + + + + + + + if (this.textbox) + this.textbox.mMenuOpen = true; + + + + if (this.textbox) + this.textbox.mMenuOpen = false; + this.clearSelection(); + this.input = null; + + + + + + + document.getBindingParent(this); + + Date.now() + + + + + + + + 30) { + var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY); + if (rc != -1 && rc != this.popup.selectedIndex) + this.popup.selectedIndex = rc; + this.mLastMoveTime = Date.now(); + } + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3