reInit is unsafe as it completely removes the existing data before reloading. If something interrupts the process that can cause dataloss.
_maybeReloadEngines is safer as it does changes progressively, it also now handles removing engines, which it didn't before.
Depends on D88023
Differential Revision: https://phabricator.services.mozilla.com/D88272
This makes FOG self-contained and no longer reliant on Telemetry for init.
We may need to adjust the timeout of the startup idle task to init earlier,
or adjust the pre-init buffer to allow us to init later.
For now of course all of this is moot because no one's using this for anything.
Differential Revision: https://phabricator.services.mozilla.com/D87276
Summary of major changes:
* Bookmarks, history, and tabs restriction chars now enter search mode. I added
a method to UrlbarProviderHeuristicFallback to return a result with a keyword
when one of these is used.
* This fixes other bugs like recognizing aliases that are entered at the
beginning of non-empty search strings, and not quasi-re-entering search mode
when search mode is already entered and you type another alias.
* The heuristic now determines whether we enter search mode, similar to how it
also determines whether we autofill. When the heuristic has a keyword but no
keyword offer, and the keyword is one of the recognized search mode keywords,
then we enter search mode, cancel the current query, and start a new query
with the remainder of the search string after the keyword.
* I slightly changed how we detect an alias, but only when update2 is
enabled. Now, an alias must be followed by a space; otherwise, the alias is
not recognized and instead just remains part of the seach string. Because if
we don't do that, then you end up in a strange situation after typing an alias
but before pressing space: The heuristic says "Search with <engine with the
alias>", but we haven't entered search mode yet because you haven't typed a
space yet. This is true for both @aliaes and non-@aliases.
* A consequence of the previous point is that we can still autofill @aliases
with a trailing space, which IMO is important. Then, once the user types any
char (space or not), we immediately enter search mode with the query being
whatever char they typed. This is less important after bug 1658605 landed, but
it's still good to have.
* Previously, `UrlbarView.onQueryResults` called UrlbarInput in order to
autofill after the first result is received. This is circuitous becaue the
input already has an `onFirstResult` method, which I now use to enter search
mode when appropriate. So I moved the autofill call from UrlbarView to
`UrlbarInput.onFirstResult`.
* As I mentioned, I improved some test framework and simplified some related
product (non-test) code. For example:
* I removed `UrlbarUtils.KEYWORD_OFFER.NONE` in favor of just leaving
`keywordOffer` as `undefined`.
* `tailOffsetIndex` can now be `undefined` if it's not relevant.
* I removed empty-string `icon` properties from payloads in favor of
`undefined`.
* In tests, I ignore `undefined` but present properties in payloads so they
don't count when comparing payloads with `deepEqual`.
* We weren't previously comparing `result.source` and `result.type` in
xpcshell tests, and that's important IMO, so I added checks for those and
updated tests.
* `isSearchHistory` is redundant, so I removed it. For form history, we
should be checking `result.source == HISTORY` and `result.type == SEARCH`.
* A bunch of tests needed to be updated for this new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D87944
Summary of changes:
1. Adds an `entry` property to the searchMode object to tag how search mode was entered.
2. Introduces `urlbar.searchmode.*` scalars. These scalars are suffixed with an entry point into search mode, for example `urlbar.searchmode.oneoff`, or `urlbar.searchmode.topsites_urlbar`. Those entry points tell us how search mode is entered most often. The keys for these scalars are strings describing what kind of search mode was entered. In most cases, this will be the name of a search engine, like "Google", or "DuckDuckGo". It may also be one of "history", "bookmarks", or "tabs". We only collect the names of engines that are bundled with Firefox. If the user enters search mode with an engine they installed themselves, we record "other" as the key.
3. Adds a urlbar-searchmode SAP to SEARCH_COUNTS.
4. Adds a browser.engagement.navigation.urlbar_searchmode probe.
5. Adds a urlbar_searchmode SAP to the navigation.search event.
Differential Revision: https://phabricator.services.mozilla.com/D87510
This also updates the behavior of the allowDuplicates check:
Instead of only checking if the top dialog is a duplicate, it will now check the whole stack and
skip the dialog open if a duplicate URL is found.
This fixes an issue where callers could alternate between dialogs to bypass the check.
Differential Revision: https://phabricator.services.mozilla.com/D88422
Expand the decoder doctor browser chrome test to check that notifications
trigger the expected UI behaviour when sent from cross origin iframes.
Differential Revision: https://phabricator.services.mozilla.com/D88651
Port handling of DecoderDoctor notifications for fission. This is done by moving
the observing of 'decoder-doctor-notification' from browser-media.js to fission
friendly actors.
As browser-media.js had only code related to this patch left it is removed along
with references to it. Same with ContentObservers.js.
Differential Revision: https://phabricator.services.mozilla.com/D88322
This adds an Obsolete section to the doc. I overused the word "obsolete" in
order to make it hard for your eyes to skip over just an "Obsolete" section
heading as you're skimming this page for info.
Also, `SELECTED_RESULT_TYPES` by itself wasn't clear, so I changed it to
`UrlbarUtils.SELECTED_RESULT_TYPES` and added a link that shouldn't be broken by
future changes.
Differential Revision: https://phabricator.services.mozilla.com/D88675
reInit is unsafe as it completely removes the existing data before reloading. If something interrupts the process that can cause dataloss.
_maybeReloadEngines is safer as it does changes progressively, it also now handles removing engines, which it didn't before.
Depends on D88023
Differential Revision: https://phabricator.services.mozilla.com/D88272
If the browser window is minimized, it's unlikely that a preloaded browser will
be useful in the near future. This change skips creating one in such a case.
This avoids an issue in the graphics layer where about:newtab content marks
itself as `renderLayers = true`, and will try to composite content in windows
which are not compositing (because they are hidden).
As an additional level of safety, we also check the preloaded browser's owner
window's minimized state just before setting `renderLayers`, in case it may have
changed after the preloaded browser was created.
Differential Revision: https://phabricator.services.mozilla.com/D85955