[api-minor] Add support, in PDFFindController, for mixing phrase/word searches (issue 7442)

*Please note:* This patch only extends the `PDFFindController` implementation itself to support this functionality, however it's *purposely* not exposed in the default viewer.

This replaces the previous `phraseSearch`-parameter, and a `query`-string will now always be interpreted as a phrase-search.
To enable searching for individual words, the `query`-parameter must instead consist of an Array of strings. This way it's now also possible to combine phrase/word searches, with a `query`-parameter looking something like `["Lorem ipsum", "foo", "bar"]` which will search for the phrase "Lorem ipsum" *and* the words "foo" respectively "bar".
This commit is contained in:
Jonas Jenwald 2023-04-02 18:40:35 +02:00
parent 4d8a60b435
commit 0e19c3a120
6 changed files with 95 additions and 48 deletions

View file

@ -222,7 +222,6 @@ class MozL10n {
source: window,
type: type.substring(findLen),
query: detail.query,
phraseSearch: true,
caseSensitive: !!detail.caseSensitive,
entireWord: !!detail.entireWord,
highlightAll: !!detail.highlightAll,