Bug 1303874 - clear the dictionary for the current find window only upon restart of the iterator, not each reset. r=jaws

MozReview-Commit-ID: Cq9bI5XEp1y

--HG--
extra : rebase_source : c81aa6362ddf9ba522a79ad26974661b0e6974b2
This commit is contained in:
Mike de Boer 2016-09-22 10:52:22 +02:00
parent 50f3b3fa7f
commit 060b04bdef
2 changed files with 7 additions and 6 deletions

View File

@ -233,12 +233,12 @@ FinderHighlighter.prototype = {
this._found = true;
},
onIteratorReset() {
onIteratorReset() {},
onIteratorRestart() {
this.clear(this.finder._getWindow());
},
onIteratorRestart() {},
onIteratorStart(params) {
let window = this.finder._getWindow();
let dict = this.getForWindow(window);
@ -511,8 +511,9 @@ FinderHighlighter.prototype = {
onHighlightAllChange(highlightAll) {
this._highlightAll = highlightAll;
if (!highlightAll) {
this.clear();
this._scheduleRepaintOfMask(this.finder._getWindow());
let window = this.finder._getWindow();
this.clear(window);
this._scheduleRepaintOfMask(window);
}
},

View File

@ -358,7 +358,7 @@ add_task(function* testHighlightAllToggle() {
// For posterity, let's switch back.
expectedResult = {
rectCount: 2,
rectCount: 1,
insertCalls: [1, 3],
removeCalls: [0, 1]
};