mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 903294 - Work - NewUI - Hide entire "Your Results" section when there are no autocomplete results. r=mbrubeck
--HG-- extra : rebase_source : 71860ebe8e5aa0d84c294133427f148b5eb4006d
This commit is contained in:
parent
7377a58c51
commit
526b57dd3c
@ -485,7 +485,7 @@
|
||||
|
||||
<binding id="urlbar-autocomplete">
|
||||
<content orient="horizontal">
|
||||
<xul:vbox id="results-vbox" flex="1">
|
||||
<xul:vbox id="results-vbox" anonid="results-container" flex="1">
|
||||
<xul:label class="meta-section-title" value="&autocompleteResultsHeader.label;"/>
|
||||
<richgrid id="results-richgrid" rows="3" deferlayout="true" anonid="results" seltype="single" flex="1"/>
|
||||
</xul:vbox>
|
||||
@ -590,7 +590,10 @@
|
||||
<!-- Updating grid content -->
|
||||
|
||||
<field name="_grid">null</field>
|
||||
|
||||
<field name="_results" readonly="true">document.getAnonymousElementByAttribute(this, 'anonid', 'results');</field>
|
||||
<field name="_resultsContainer" readonly="true">document.getAnonymousElementByAttribute(this, 'anonid', 'results-container');</field>
|
||||
|
||||
<field name="_searches" readonly="true">document.getAnonymousElementByAttribute(this, 'anonid', 'searches');</field>
|
||||
|
||||
<property name="_otherGrid" readonly="true">
|
||||
@ -636,6 +639,13 @@
|
||||
if (!this.input)
|
||||
return;
|
||||
|
||||
let haveNoResults = (this.matchCount == 0);
|
||||
this._resultsContainer.hidden = haveNoResults;
|
||||
|
||||
if (haveNoResults) {
|
||||
return;
|
||||
}
|
||||
|
||||
let controller = this.input.controller;
|
||||
let lastMatch = this.matchCount - 1;
|
||||
let iterCount = Math.max(this._results.itemCount, this.matchCount);
|
||||
|
Loading…
Reference in New Issue
Block a user