Commit graph

52 commits

Author SHA1 Message Date
Karandeep
f19bf97d24 Bug 1855958 - Remove the experimental urlbar API (first patch). r=mak,extension-reviewers,desktop-theme-reviewers,robwu
ext-urlbar.js is unused but will be removed in a separate
patch to avoid test failures in condprof tests. Condprof tests may use
an outdated profile directory that still references ext-urlbar.js in
startupcache files, which triggers a test-only test failure in
mozilla::net::CheckForBrokenChromeURL.

Differential Revision: https://phabricator.services.mozilla.com/D199769
2024-02-05 17:04:37 +00:00
mcheang
076c4fb736 Bug 1667639 - Make keyword at the start of the string take precedence over restrict symbols at the end of the string. r=mak
This patch modifies PlacesUtils to cache the keywords and adds functionality to
find a keyword. The Tokenizer calls PlacesUtils to know if the first word
is a keyword and if the first word is a keyword, then the rest of the search
string will be treated as text and Tokenizer won't filter any other restrict
symbols.

Differential Revision: https://phabricator.services.mozilla.com/D198208
2024-01-19 01:13:39 +00:00
Dale Harvey
07c52626b4 Bug 1852442 - Remove delay for heuristic result. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D192462
2023-11-14 20:42:35 +00:00
Dão Gottwald
dd8ed34c17 Bug 1852055 - [Firefox Suggest Opt-in Experiment] Implement opt-in UI at the top of the results list. r=daleharvey,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D193198
2023-11-10 11:28:14 +00:00
Dale Harvey
b46d3f8bc7 Bug 1852848 - Implement recent searches provider. r=mak,fluent-reviewers,flod,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189104
2023-10-11 00:06:32 +00:00
Karandeep
1643d58b56 Bug 1842230 - URL bar suggested action for paste when clipboard contains valid URL. r=mak,flod
Differential Revision: https://phabricator.services.mozilla.com/D183747
2023-08-01 11:51:59 +00:00
Gregory Pappas
3eac12bbd7 Bug 1845311 - Use ChromeUtils.defineLazyGetter in more places r=arai,webdriver-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,joschmidt,robwu,issammani,bytesized,owlish,dao
Differential Revision: https://phabricator.services.mozilla.com/D184481
2023-07-26 16:28:11 +00:00
Mark Banner
182b6db303 Bug 1792824 - Convert ObjectUtils.jsm to an ES module. r=barret,necko-reviewers,devtools-reviewers,kershaw
Depends on D183308

Differential Revision: https://phabricator.services.mozilla.com/D183309
2023-07-12 08:07:23 +00:00
Marco Bonardo
1dbce16a75 Bug 1842381 - The address bar chunk timer is not firing early when all heuristic providers are done. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D183164
2023-07-11 08:27:37 +00:00
Marco Bonardo
8259e0e3d5 Bug 1816572 - Allow more time for Address Bar heuristic results to be returned. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D181128
2023-07-07 15:48:34 +00:00
Marco Bonardo
73e7350295 Bug 1827770 - Remove isPrivate argument from onEngagement() since it can be inferred. r=daleharvey
We can't use context.isPrivate because sometimes context is undefined.
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1841762 about that.

Differential Revision: https://phabricator.services.mozilla.com/D182772
2023-07-07 10:01:50 +00:00
Marco Bonardo
9804a5187b Bug 1827770 - Remove QueryContext.view and pass the controller to onEngagement() instead. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D182771
2023-07-07 10:01:50 +00:00
Butkovits Atila
1f7b14ac8e Backed out changeset 986f4f6398a4 (bug 1816572) for causing failures at browser_search_bookmarks.js. CLOSED TREE 2023-07-04 16:29:04 +03:00
Marco Bonardo
834caa9a69 Bug 1816572 - Allow more time for Address Bar heuristic results to be returned. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D181128
2023-07-04 09:28:46 +00:00
James Teow
6093cc7f6f Bug 1837239 - Remove the Preloaded Top URLs feature - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D180246
2023-06-13 18:27:12 +00:00
mcheang
50ce5c5c74 Bug 1648188 - Fix SearchService init failures so that the address bar can be used to search history and bookmarks. r=Standard8,mak
This patch refactors the SearchService private initialized variables and how
the SearchService stores its initialization status. These changes capture whether
the SearchService has succeeded, failed or hasn't finished initialization yet.

There are also changes made to UrlbarSearchUtils on handling when SearchService
has failed to initialize or when it hasn't finished initializing yet and we wait.
In the case where the SearchService has failed on initialization, We allow
the code to continue so that it can reach UrlbarProviderPlaces. Once we
are able to reach UrlbarProviderPlaces, we can make database calls for the user's
history and bookmarks. This allows the user to interact with the addressbar and
search their history and bookmarks even if SearchService has failed to initialize.

Differential Revision: https://phabricator.services.mozilla.com/D176936
2023-05-30 18:34:51 +00:00
Karandeep
ef201a9f0e Bug 1806120 - Pass down window handle to provider. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D178436
2023-05-24 14:19:01 +00:00
Drew Willcoxon
a3b0a1fd4c Bug 1827762 - Replace UrlbarProvider.pickResult() and blockResult() with onEngagement() r=mak
This removes `UrlbarProvider.pickResult()` and `blockResult()` in favor of
handling picks and dismissals through `onEngagement()`. A number of providers
use those two methods, so this revision touches a lot of files.

Handling dismissals through `onEngagement()` means `UrlbarInput.pickResult()`
can no longer tell whether a result is successfully dismissed, so it can't
remove the result anymore. (Maybe `onEngagement()` could return some value
indicating it dismissed the result, but I don't want to go down that road.)
Instead, I split `UrlbarController.handleDeleteEntry()` into two methods: a
public one that removes the result and notifies listeners, and a private one
that handles dismissing the selected result internally in
UrlbarController. Providers that have dismissable results should now implement
`onEngagement()` and call `controller.removeResult()`.

I made some other improvements to engagement handling. There's still room for
more but this patch is big enough already.

Other notable changes:

Include the engaged result in engagement notifications so providers have easy
access to it and can respond to clicks and dismissals more easily. That also
lets us stop passing `selIndex` and `provider` to `engagementEvent.record()`
since now it can compute those from the passed-in result.

Add the concept of `isSessionOngoing` to engagement notifications so providers
can tell whether an engagement ended the search session. Right now, providers
like quick suggest that record a bunch of provider-specific legacy telemetry
assume that `onEngagement()` ends the session, but that's no longer true.

Unify result buttons and result menu commands by setting
`element.dataset.command` on buttons (hopefully we can remove buttons soon, at
least the ones that aren't tip buttons)

Make sure we always notify providers on engagement even on dismissals or
when skipping legacy telemetry

Move dismissal of restyled search suggestions and history results from
`UrlbarController.handleDeleteEntry()` to the Places provider

Move dismissal of form history results from
`UrlbarController.handleDeleteEntry()` to the search suggestions provider

In the Places provider, remove the unused `_addSearchEngineMatch()` method. Also
remove the code in the "searchengine" case that creates a non-search-history
result. This code is unreached because the only time the provider creates a
"searchengine" match it also sets `isSearchHistory` to true.

In `UrlbarTestUtils.promiseAutocompleteResultPopup()`, change the default value
of the `fireInputEvent` param from false to true. This is necessary because
without a starting input event, the start event info in `engagementEvent` will
be null, so when `engagementEvent.record()` is called at the end of the
engagement, it will bail, and providers will not be notified of the engagement.
IMO true is a better default value anyway because input events will typically be
fired when the user performs a search.

Differential Revision: https://phabricator.services.mozilla.com/D174941
2023-04-13 06:03:33 +00:00
Daisuke Akatsuka
046a601a7f Bug 1820453: Introduce unsortedResults to the query r=adw
Differential Revision: https://phabricator.services.mozilla.com/D171673
2023-03-08 02:30:33 +00:00
Drew Willcoxon
fb333ff0d6 Bug 1814732 - Move weather suggestions to their own provider. r=daisuke
This moves weather suggestions from the quick suggest provider to their own
provider. This will make it easier to implement weather suggestions that are
triggered by keyword instead of being shown on zero-prefix.

It does the following:

* Copies UrlbarProviderQuickSuggest.sys.mjs to UrlbarProviderWeather.sys.mjs
* Removes everything weather-related from UrlbarProviderQuickSuggest.sys.mjs
* Removes everything not weather-related from UrlbarProviderWeather.sys.mjs
* Makes some simplifications to the new provider since it doesn't need to
  support quick suggest suggestions
* Removes `result.payload.isWeather` since now we can use `result.providerName`
* This does *not* change any telemetry

Differential Revision: https://phabricator.services.mozilla.com/D168738
2023-02-07 02:26:54 +00:00
Daisuke Akatsuka
924d4f7fdf Bug 1791657: Show page title if it is in places. r=adw,mak
Depends on D159243

Differential Revision: https://phabricator.services.mozilla.com/D157891
2023-01-24 22:35:15 +00:00
Gregory Pappas
773f9799d9 Bug 1779400 - Let omnibox API work in private windows r=mak
Differential Revision: https://phabricator.services.mozilla.com/D166681
2023-01-13 10:55:59 +00:00
Marco Bonardo
4a9e98461a Bug 1805702 - Log engagement event regardless of recording being enabled. r=daisuke
Logs engagement telemetry for debug purposes, regardless of it being reported
upstream.
Also changes a couple other logs to make browser.urlbar.logLevel = "Info"
more readable and usable.

Differential Revision: https://phabricator.services.mozilla.com/D164701
2022-12-15 08:59:22 +00:00
Hanna Jones
53eab72e81 Bug 1794823 - port site specific search from pine to central r=daleharvey
Some random thoughts:
* This is a minimal implementation - there were plans to expand this with autocomplete support that we never got around to
* I built this just from reading docs + poking around in the urlbar code, so there might be a more desireable way to do all of this
* We've gone back and forth between calling this "contextual search" and "site specific search," we should probably pick a name and stick to it
* There were never any design specs for this so the UI/UX was based off of existing urlbar results as they appeared in Flowstate
* There were some open questions around how we treat installing opensearch engines, since how they are handled here seems to differ from how we use them elsewhere
* I don't remember the reasoning for showing this result last in the urlbar, we may want to move it elsewhere

Differential Revision: https://phabricator.services.mozilla.com/D159052
2022-11-25 15:17:08 +00:00
Drew Willcoxon
7470c4e778 Bug 1800810 - Always record visible quick suggest results in engagement telemetry. r=dao
This is a follow up to D161866 and effectively reverts and replaces it with a
different approach. Please see bug 1800810 for background. In short, engagement
telemetry should be based on the result that's visible in the view, not on the
result the provider added last.

D161866 fixed the case where the last-added result is in the view but hidden.
There's another case we need to handle, when the last-added result is not in the
view at all. That can happen when you type something and hit enter really
quickly, before the view can update. I was able to trigger it several times.
When that happens, there are two possibilities:

* No quick suggest result is visible in the view. `result.rowIndex` is its
  initial value of -1, so we record an engagement for a result that is not
  visible and that doesn't have a valid index.

* A quick suggest result from a previous query is visible in the view. Here
  again, `result.rowIndex` is -1 so we record an engagement for a result that is
  not visible and that doesn't have a valid index, and we miss recording an
  engagement for the result that's actually visible.

Right now it's not easy to fix this inside the provider because providers don't
know anything about the view(s). I could record this telemetry in the view but
that's not its role. I think it makes sense to include the view in the query
context, so that's what this does. I added `view.visibleResults` to make getting
the visible results easy.

Daisuke's new Glean telemetry in D160193 uses `context.results`, which has this
same problem of not being based on actually visible results. We'll need to use
`context.view.visibleResults` there too, and there may be other existing cases
as well.

Depends on D161866

Differential Revision: https://phabricator.services.mozilla.com/D162182
2022-11-16 21:47:55 +00:00
trickypr
939b06a162 Bug 1510561 - Part 7: Apply plugin:mozilla/require-jsdoc to browser/components/urlbar. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159472
2022-10-24 13:32:38 +00:00
trickypr
ae73626d5e Bug 1510561 - Part 6: Apply plugin:mozilla/valid-jsdoc to browser/components/urlbar. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159471
2022-10-24 13:32:37 +00:00
Mark Banner
a9ba6e830d Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 21:47:50 +00:00
Marian-Vasile Laza
130adc5d9a Backed out changeset 0679274d6ed5 (bug 1792398) for causing bc failures on browser_sendQuery.js. CLOSED TREE 2022-09-26 22:53:00 +03:00
Mark Banner
3e99025d45 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 18:51:57 +00:00
Narcis Beleuzu
6c2d0d8cea Backed out changeset 849faf753208 (bug 1792398) for bc failures on browser_sendQuery.js . CLOSED TREE 2022-09-26 20:44:40 +03:00
Mark Banner
05dcda5a7f Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 16:51:10 +00:00
Mark Banner
12ee099a88 Bug 1780347 - Switch from using importESModule to standard imports for XPCOMUtils in converted system modules. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D152253
2022-07-26 15:11:31 +00:00
Mark Banner
cb83826195 Bug 1780017 - Load Urlbar providers via importESModule. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152058
2022-07-26 15:11:30 +00:00
Mark Banner
8a275d4d92 Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-26 15:11:30 +00:00
Mark Banner
3c1831d6fb Bug 1780017 - Migrate browser/components/urlbar to ESM. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152056
2022-07-26 15:11:29 +00:00
smolnar
dc4f2d6a41 Backed out 5 changesets (bug 1780017, bug 1780347) for causing bc failures in browser/base/content/test/performance/browser_preferences_usage.js CLOSED TREE
Backed out changeset 86c3a9142535 (bug 1780347)
Backed out changeset 35abe35417a0 (bug 1780017)
Backed out changeset f448f044f028 (bug 1780017)
Backed out changeset a400cbe83084 (bug 1780017)
Backed out changeset 0a23c9e27f01 (bug 1780017)
2022-07-25 21:00:07 +03:00
Mark Banner
4272200762 Bug 1780347 - Switch from using importESModule to standard imports for XPCOMUtils in converted system modules. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D152253
2022-07-25 12:46:49 +00:00
Mark Banner
a80d76567a Bug 1780017 - Load Urlbar providers via importESModule. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152058
2022-07-25 12:46:48 +00:00
Mark Banner
539b5dac0d Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-25 12:46:48 +00:00
Mark Banner
4a76c34f68 Bug 1780017 - Migrate browser/components/urlbar to ESM. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152056
2022-07-25 12:46:47 +00:00
smolnar
102b779608 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03:00
Mark Banner
2f65c79816 Bug 1780347 - Switch from using importESModule to standard imports for XPCOMUtils in converted system modules. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D152253
2022-07-20 15:50:43 +00:00
Mark Banner
f4166bdb0f Bug 1780017 - Load Urlbar providers via importESModule. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152058
2022-07-20 15:50:42 +00:00
Mark Banner
fd37e0e9da Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-20 15:50:42 +00:00
Mark Banner
9562a5e4fd Bug 1780017 - Migrate browser/components/urlbar to ESM. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152056
2022-07-20 15:50:41 +00:00
Iulian Moraru
1108246986 Backed out 7 changesets (bug 1779982, bug 1780017) for causing multiple failures. CLOSED TREE
Backed out changeset f33a58aa2f3f (bug 1780017)
Backed out changeset e21c85d61b91 (bug 1780017)
Backed out changeset 213ee5578e7c (bug 1780017)
Backed out changeset ea9b3bf42ea1 (bug 1780017)
Backed out changeset d2d8530f3c4d (bug 1779982)
Backed out changeset 088e5148c307 (bug 1779982)
Backed out changeset 267e08f3868a (bug 1779982)
2022-07-20 15:44:53 +03:00
Iulian Moraru
3c09fc13df Backed out 3 changesets (bug 1780074, bug 1780347) for causing multiple failures. CLOSED TREE
Backed out changeset ee4c4d34816c (bug 1780347)
Backed out changeset a13d3939b98a (bug 1780074)
Backed out changeset 3bc739f7de43 (bug 1780074)
2022-07-20 14:57:48 +03:00
Mark Banner
17e34b4715 Bug 1780347 - Switch from using importESModule to standard imports for XPCOMUtils in converted system modules. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D152253
2022-07-20 10:36:53 +00:00
Mark Banner
826d0099c0 Bug 1780017 - Load Urlbar providers via importESModule. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152058
2022-07-20 10:36:51 +00:00