Backed out changeset 299138aaaecb (bug 1388331) for causing browser_urlbar_keyed_search_reflows.js failures.

This commit is contained in:
Ryan VanderMeulen 2017-08-30 21:04:30 -04:00
parent 087b46a0b9
commit 94ba01b62f
2 changed files with 4 additions and 6 deletions

View File

@ -67,7 +67,7 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
"_invalidate@chrome://global/content/bindings/autocomplete.xml",
"invalidate@chrome://global/content/bindings/autocomplete.xml"
],
times: 330, // This number should only ever go down - never up.
times: 390, // This number should only ever go down - never up.
},
{
@ -119,7 +119,7 @@ const EXPECTED_REFLOWS_SECOND_OPEN = [
"_invalidate@chrome://global/content/bindings/autocomplete.xml",
"invalidate@chrome://global/content/bindings/autocomplete.xml"
],
times: 384, // This number should only ever go down - never up.
times: 444, // This number should only ever go down - never up.
},
// Bug 1384256

View File

@ -1089,9 +1089,8 @@ Search.prototype = {
// If we do not have enough results, and our match type is
// MATCH_BOUNDARY_ANYWHERE, search again with MATCH_ANYWHERE to get more
// results.
let count = this._counts[MATCHTYPE.GENERAL] + this._counts[MATCHTYPE.HEURISTIC];
if (this._matchBehavior == MATCH_BOUNDARY_ANYWHERE &&
count < Prefs.get("maxRichResults")) {
this._counts[MATCHTYPE.GENERAL] < Prefs.get("maxRichResults")) {
this._matchBehavior = MATCH_ANYWHERE;
for (let [query, params] of [ this._adaptiveQuery,
this._searchQuery ]) {
@ -1747,8 +1746,7 @@ Search.prototype = {
this._addMatch(match);
// If the search has been canceled by the user or by _addMatch, or we
// fetched enough results, we can stop the underlying Sqlite query.
let count = this._counts[MATCHTYPE.GENERAL] + this._counts[MATCHTYPE.HEURISTIC];
if (!this.pending || count >= Prefs.get("maxRichResults"))
if (!this.pending || this._counts[MATCHTYPE.GENERAL] == Prefs.get("maxRichResults"))
cancel();
},