Bug 1478800 - Fix find-in-page display flags; r?droeh
Make the display flags actually work.
MozReview-Commit-ID: 1fw9Oa0IaGc
--- a/mobile/android/modules/geckoview/GeckoViewContent.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewContent.jsm
@@ -255,16 +255,22 @@ class GeckoViewContent extends GeckoView
// Only send response if we have a result. `found` and `wrapped` are
// both false only when we haven't received a result yet.
if (this.response.found || this.response.wrapped) {
debug `onMatchesCountResult: ${this.response}`;
aCallback.onSuccess(this.response);
aCallback = undefined;
}
},
+
+ onCurrentSelection() {
+ },
+
+ onHighlightFinished() {
+ },
};
finder.caseSensitive = !!aData.matchCase;
finder.entireWord = !!aData.wholeWord;
if (aCallback) {
finder.addResultListener(this._finderListener);
}
@@ -298,26 +304,23 @@ class GeckoViewContent extends GeckoView
let finder;
try {
finder = this.browser.finder;
} catch (e) {
return;
}
this._matchDisplayOptions = aData;
+ finder.onModalHighlightChange(!!aData.dimPage);
finder.onHighlightAllChange(!!aData.highlightAll);
- finder.onModalHighlightChange(!!aData.dimPage);
if (!finder.searchString) {
return;
}
- if (!aData.highlightAll && !aData.dimPage && !aData.drawOutline) {
- finder.highlighter.highlight(false);
+ if (!aData.highlightAll && !aData.dimPage) {
+ finder.highlight(false);
return;
}
const linksOnly = this._finderListener &&
this._finderListener.response.linksOnly;
- finder.highlighter.highlight(true,
- finder.searchString,
- linksOnly,
- !!aData.drawOutline);
+ finder.highlight(true, finder.searchString, linksOnly, !!aData.drawOutline);
}
}