# HG changeset patch # User Tomasz KoƂodziejski WIP --- toolkit/content/widgets/autocomplete.xml | 169 ++++++++++------------------- toolkit/themes/osx/global/autocomplete.css | 12 ++ 2 files changed, 67 insertions(+), 114 deletions(-) diff --git a/toolkit/content/widgets/autocomplete.xml b/toolkit/content/widgets/autocomplete.xml index ef056d4..9c95f4e 100644 --- a/toolkit/content/widgets/autocomplete.xml +++ b/toolkit/content/widgets/autocomplete.xml @@ -1200,83 +1200,100 @@ extends="chrome://global/content/bindings/popup.xml#popup"> onget="return this.mInput.controller;" onset="return val;"/> - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = 0) { let [,action, param] = url.match(/^moz-action:([^,]+),(.*)$/); this.setAttribute("actiontype", action); url = param; let desc = this._stringBundle.GetStringFromName("switchToTab"); @@ -1505,19 +1516,16 @@ extends="chrome://global/content/bindings/popup.xml#popup"> } else if (type == "keyword") { // Configure the extra box for keyword display this._extraBox.hidden = false; this._extraBox.childNodes[0].hidden = true; this._extraBox.childNodes[1].hidden = false; this._extraBox.pack = "start"; this._titleBox.flex = 0; - // Hide the ellipsis so it doesn't take up space. - this._titleOverflowEllipsis.hidden = true; - // Put the parameters next to the title if we have any let search = this.getAttribute("text"); let params = ""; let paramsIndex = search.indexOf(' '); if (paramsIndex != -1) params = search.substr(paramsIndex + 1); // Emphasize the keyword parameters @@ -1544,86 +1552,19 @@ extends="chrome://global/content/bindings/popup.xml#popup"> if (!searchEngine) { this._setUpDescription(this._url, url); } else { let desc = this._stringBundle.formatStringFromName("searchWithEngine", [searchEngine], 1); // The search engine name, when present, is not emphasized. this._setUpDescription(this._url, desc, true); } - - // Set up overflow on a timeout because the contents of the box - // might not have a width yet even though we just changed them - setTimeout(this._setUpOverflow, 0, this._titleBox, this._titleOverflowEllipsis); - setTimeout(this._setUpOverflow, 0, this._urlBox, this._urlOverflowEllipsis); - ]]> - - - - - - - - 0) { - // Subtract a little less to account for subpixel rounding - widthDiff -= childWidth - .5; - - // Add to the tooltip if it's not hidden and has text - let childText = children[i].textContent; - if (childText) - tooltip.push(childText); - } - } - - // If the children take up more space than the parent.. overflow! - if (widthDiff < 0) { - // Re-show the ellipsis now that we know it's needed - aEllipsis.style.visibility = "visible"; - - // Separate text components with a ndash -- - aParentBox.tooltipText = tooltip.join(" \u2013 "); - } - ]]> - - - - - - - - - - - - - - - diff --git a/toolkit/themes/osx/global/autocomplete.css b/toolkit/themes/osx/global/autocomplete.css index 318af07..e671d41 100644 --- a/toolkit/themes/osx/global/autocomplete.css +++ b/toolkit/themes/osx/global/autocomplete.css @@ -82,16 +82,28 @@ treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) { .autocomplete-treebody::-moz-tree-image(treecolAutoCompleteValue) { max-width: 16px; height: 16px; } /* ::::: richlistbox autocomplete ::::: */ +.ac-title-box { + display: flex; +} + +html|*.ac-shrink { + white-space:nowrap; overflow:hidden; text-overflow:ellipsis +} + +.ac-no-shrink { + flex-shrink: 0; +} + .autocomplete-richlistbox { -moz-appearance: none; margin: 0; } .autocomplete-richlistitem[selected="true"] { background-color: Highlight; color: HighlightText;