Commit graph

1019 commits

Author SHA1 Message Date
Drew Willcoxon
e679f2cf3f Bug 1693126 - Add telemetry for when users disable Quick Suggest. r=harry,nanj
This adds event telemetry that's recorded when the
`browser.urlbar.suggest.quicksuggest` pref is toggled. This pref corresponds to
the checkbox in about:preferences#search labeled "Show suggested and sponsored
results in the address bar".

I used `contextservices.quicksuggest` as the event telemetry category name to be
similar to the `contextual.services.quicksuggest.*` scalars. Event names are
limited to 30 chars, so it couldn't be exactly the same.

This is based on my earlier revision for scalar telemetry in D106173.

Depends on D106173

Differential Revision: https://phabricator.services.mozilla.com/D106248
2021-02-25 02:52:04 +00:00
Drew Willcoxon
da5fd2c2bb Bug 1693927 - Record keyed scalar telemetry for impressions and clicks on Quick Suggest results. r=harry,nanj
This adds three new keyed scalars:

* `contextual.services.quicksuggest.impression`: Incremented when a Quick
  Suggest result is shown in an address bar engagement where the user picks any
  result.
* `contextual.services.quicksuggest.click`: Incremented when the user picks a
  Quick Suggest result (not including the help button).
* `contextual.services.quicksuggest.help``: Incremented when the user picks the
  onboarding help button in a Quick Suggest result.

The changes to telemetry.rst and Scalars.yaml have more details.

I modified `TelemetryEvent.typeFromElement()` to return `"help"` for clicks on
the help button so that the quick suggest provider can tell whether the main
part of the result was picked or the help button. I left `"tiphelp"` for tip
help buttons in case anything depends on that.

Depends on D106060

Differential Revision: https://phabricator.services.mozilla.com/D106173
2021-02-25 02:52:04 +00:00
Dale Harvey
f847143c25 Bug 1680464 - Show Firefox Suggestions in private mode when enabled r=adw
Differential Revision: https://phabricator.services.mozilla.com/D106196
2021-02-24 21:51:51 +00:00
Csoregi Natalia
e50ad13694 Backed out 2 changesets (bug 1693927, bug 1693126) for failures on browser_urlbar_telemetry_quicksuggest.js. CLOSED TREE
Backed out changeset 681c90aa832e (bug 1693126)
Backed out changeset 7525ec04b82a (bug 1693927)
2021-02-24 22:00:43 +02:00
Drew Willcoxon
8b20784ab6 Bug 1693126 - Add telemetry for when users disable Quick Suggest. r=harry,nanj
This adds event telemetry that's recorded when the
`browser.urlbar.suggest.quicksuggest` pref is toggled. This pref corresponds to
the checkbox in about:preferences#search labeled "Show suggested and sponsored
results in the address bar".

I used `contextservices.quicksuggest` as the event telemetry category name to be
similar to the `contextual.services.quicksuggest.*` scalars. Event names are
limited to 30 chars, so it couldn't be exactly the same.

This is based on my earlier revision for scalar telemetry in D106173.

Depends on D106173

Differential Revision: https://phabricator.services.mozilla.com/D106248
2021-02-24 19:13:50 +00:00
Drew Willcoxon
0b23a69777 Bug 1693927 - Record keyed scalar telemetry for impressions and clicks on Quick Suggest results. r=harry,nanj
This adds three new keyed scalars:

* `contextual.services.quicksuggest.impression`: Incremented when a Quick
  Suggest result is shown in an address bar engagement where the user picks any
  result.
* `contextual.services.quicksuggest.click`: Incremented when the user picks a
  Quick Suggest result (not including the help button).
* `contextual.services.quicksuggest.help``: Incremented when the user picks the
  onboarding help button in a Quick Suggest result.

The changes to telemetry.rst and Scalars.yaml have more details.

I modified `TelemetryEvent.typeFromElement()` to return `"help"` for clicks on
the help button so that the quick suggest provider can tell whether the main
part of the result was picked or the help button. I left `"tiphelp"` for tip
help buttons in case anything depends on that.

Depends on D106060

Differential Revision: https://phabricator.services.mozilla.com/D106173
2021-02-24 18:01:37 +00:00
Nan Jiang
59c6a49f3a Bug 1693393 - add telemetry for sponsored TopSites in Urlbar r=dao,harry
Differential Revision: https://phabricator.services.mozilla.com/D105639
2021-02-24 16:57:27 +00:00
harry
27e7bad0be Bug 1691544 - Part 2 - Update focused-and-closed state for Proton. r=mak,desktop-theme-reviewers,dao
This patch mainly does three things:
1. Changes the necessary CSS to meet the Proton spec.
2. Removes several calls to UrlbarInput.startLayoutBreakout(), because the Urlbar no longer expands when the panel is not open.
3. Introduces a [suppress-focus-border] attribute. This attribute hides the 2px focus ring around the Urlbar. This ensures that we don't flash the focus ring when the user clicks a Urlbar that will autoOpen, seeing as the open Urlbar no longer has a border. It also hides the focus border after the user presses Esc, as specified in Figma.

Differential Revision: https://phabricator.services.mozilla.com/D105097
2021-02-24 16:02:40 +00:00
Masayuki Nakano
bc2a8bc131 Bug 1691622 - part 7: Merge synthesizeNativeMouseMove* with synthesizeNativeMouseEvent* r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105761
2021-02-24 01:27:09 +00:00
Masayuki Nakano
44ff291cb4 Bug 1691622 - part 6: Merge synthesizeNativeMouseClick* with synthesizeNativeMouseEvent* r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105760
2021-02-24 01:27:08 +00:00
Masayuki Nakano
0d0a504a13 Bug 1691622 - part 2: Merge synthesizeNativeMouseClickAtCenter with synthesizeNativeMouseClick r=smaug
With adding new feild to the `aParam`, `synthesizeNativeMouseClick` can
work as `synthesizenativeMouseClickAtCenter` too.  Therefore, we can get
rid of the redundant API.

Additionally, this patch makes `synthesizeNativeMouseClickWithAPZ` can
take the new field for consistency between them.

Differential Revision: https://phabricator.services.mozilla.com/D105756
2021-02-24 01:27:07 +00:00
Drew Willcoxon
b7a84320fc Bug 1694315 - Add queryContext and details parameters to UrlbarProvider.onEngagement(). r=harry
There are a couple of things that would make collecting engagement telemetry
like impressions and clicks a lot easier: having the query context and details
of the picked result. We need to collect this exact telemetry for the top sites
and quick suggest experiments. For quick suggest in particular, we need the
index of the quick suggest result for the impression telemetry. There's no good
way to get that right now because although the quick suggest is always last, the
index depends on the muxer and the number of final results.

Details of the picked result is easy because there's already a `details` object
with that info when the controller's telemetry event tells the providers manager
to notify providers of an engagement.

The query context is a little harder, but we can take it from the controller.
It's not guaranteed to be defined at the time that `onEngagement` is called for
`start`, so I tried to make that clear in the javadoc. Since it may not be
defined on `start`, `onEngagement` still needs the `isPrivate` param even though
the context also has an `isPrivate` property.

With this patch, we should be able to record clicks in providers without having
to call `pickResult` for every provider. `pickResult` would be the other obvious
place to record picks on results in providers.

Depends on D105815

Differential Revision: https://phabricator.services.mozilla.com/D106060
2021-02-23 17:43:33 +00:00
Drew Willcoxon
80e0f95944 Bug 1694237 - Properly discard duplicate suggestions in urlbar results. r=mak
This was a little more work than I first thought because fixing it uncovered
another problem: The recurse logic in the muxer isn't quite right. There are a
couple of problems actually:

1. By re-using the results from children that did not fill up, we skip updating
   `stateCopy` (and therefore `state`), which messes up subsequent buckets in
   the recursion because they're working with the wrong state.
2. By simply assigning `state = stateCopy` after handling children that didn't
   fill up, we're not really doing anything because at that point the function
   is done. The caller and subsequent buckets in the recursion won't see the
   updated state. We need to update `state` in place.

These problems were revealed in test_resultBuckets.js, which is pretty thorough.

To fix the actual problem that the bug is about (not deduping remote suggestions
and form history), we just need to keep a set of suggestions that the muxer has
seen so far, and then `_canAddResult` can discard dupe suggestions. This patch
adds `state.suggestions` for that, and it includes form history, remote
suggestions, and the heuristic query when it's a search result. This way the
relative ordering of form history vs. remote suggestions doesn't matter. We'll
dedupe whichever comes later.

A bunch of tasks in test_resultBuckets.js needed to be updated to account for
this because they were incorrectly not expecting dupes to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D106030
2021-02-23 17:17:31 +00:00
Drew Willcoxon
c9c969f3e6 Bug 1693178 - Show the Quick Suggest help/info button the first 5 times the user sees a Quick Suggest result. r=daleharvey
Depends on D105679

Differential Revision: https://phabricator.services.mozilla.com/D105815
2021-02-22 22:20:18 +00:00
Daisuke Akatsuka
fabdafe56d Bug 1185358: Update untrimmedValue even if pasted value is changed. r=adw
Depends on D105726

Differential Revision: https://phabricator.services.mozilla.com/D105727
2021-02-22 01:54:05 +00:00
Daisuke Akatsuka
feba0e3455 Bug 1185358: Replace any whitespace chars with space. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D105726
2021-02-22 01:54:05 +00:00
Drew Willcoxon
71bed01691 Bug 1693648 - Allow hardcoded title strings for help buttons. r=dao
It turns out we're going to hardcode user-facing strings for the Quick Suggest
experiment, so help buttons need to allow their `title` attribute to be set
directly. This patch leaves `data-l10n-id` support because ultimately that's
what we'll want to use for non-experiment features. I didn't bother only setting
one or the other if both exist because we're never going to use both at the same
time, and it's not worth the code IMO.

Depends on D105095

Differential Revision: https://phabricator.services.mozilla.com/D105679
2021-02-19 16:58:07 +00:00
Dale Harvey
81742620d2 Bug 1691776 - Implement a QuickSuggest Urlbar provider r=adw
Differential Revision: https://phabricator.services.mozilla.com/D104768
2021-02-19 06:43:46 +00:00
Dorel Luca
3393a60225 Backed out changeset 6140076d8aba (bug 1691776) for Browser-chrome failures in browser/components/urlbar/tests/browser/browser_quicksuggest.js. CLOSED TREE 2021-02-19 02:53:47 +02:00
Dale Harvey
ff3000edd1 Bug 1691776 - Implement a QuickSuggest Urlbar provider r=adw
Differential Revision: https://phabricator.services.mozilla.com/D104768
2021-02-18 23:22:44 +00:00
Drew Willcoxon
f7cda9a0be Bug 1692526 - Allow results to include a help/info button. r=dao
This supports a new `helpUrl` payload property on all results. It causes results
in the view to have a help button that can be selected and picked independently
of the main part of the result. When picked, the help button loads the
`helpUrl`. It looks and acts the same as the help buttons we already have for
tip results.

The help button should be flush with the trailing edge of the result row, and it
should be selectable independently from the main part of the result. To achieve
that without disrupting things too much, I create the button inside of
`.urlbarView-row` but outside of `.urlbarView-row-inner`. The "main" part of the
row is `.urlbarView-row-inner`. I made `.urlbarView-row` have `display: flex` so
the the inner part can have `flex: 1` so it can fill up the entire row except
for the help button.

This also reworks view selection a little so that for each row, we look for
selectable elements in the row instead of assuming that the row itself is
selectable. That also lets us remove a couple of special cases for tip and
dynamic results.

Differential Revision: https://phabricator.services.mozilla.com/D105095
2021-02-18 18:00:22 +00:00
Daisuke Akatsuka
f4358ad192 Bug 1678618: Apply page-removed event. r=mak
Depends on D101114

Differential Revision: https://phabricator.services.mozilla.com/D101115
2021-02-15 08:04:15 +00:00
Csoregi Natalia
b32d4ca055 Backed out 4 changesets (bug 1678618) for node failures. CLOSED TREE
Backed out changeset e714440f6c0d (bug 1678618)
Backed out changeset ae83fda183dd (bug 1678618)
Backed out changeset bef0ea72ded8 (bug 1678618)
Backed out changeset ec96259a3f81 (bug 1678618)
2021-02-15 05:49:54 +02:00
Daisuke Akatsuka
687e052ffb Bug 1678618: Apply page-removed event. r=mak
Depends on D101114

Differential Revision: https://phabricator.services.mozilla.com/D101115
2021-02-15 02:47:38 +00:00
Gijs Kruitbosch
23c1d25676 Bug 1685313 - fix tests to pass with either the new or old window modal dialogs, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D104703
2021-02-12 22:41:54 +00:00
Drew Willcoxon
f0b51d5d79 Bug 1691855 - Fix intermittent TV failure in browser/components/urlbar/tests/unit/test_resultBuckets.js. r=mak
The problem is that the test creates and registers many providers but never
unregisters them. Usually that's not a problem since test providers have random
names and test query contexts are created with the `providers` option. But
sometimes two different providers end up with the same name because
`Math.random() * 100000` ends up being the same. Therefore a context can end up
with two (duplicate) providers when there should be only one, which means
`context.results` ends up with two copies of each result.

This patch makes several changes:

* test_resultBuckets.js now unregisters providers.
* Stop using `Math.random()` as the basis for making random test provider
  names. Instead, use UUIDs.
* Add a `registerCleanupFunction` in head.js for unregistering test providers
  (even though that wouldn't have fixed this bug).
* Make `registerBasicTestProvider` return the provider instead of its name so
  that the provider can be passed to
  `UrlbarProvidersManager.unregisterProvider()`.

Differential Revision: https://phabricator.services.mozilla.com/D104929
2021-02-12 16:23:52 +00:00
Andreea Pavel
c9c6e3158d Backed out 3 changesets (bug 1685313) for failing test_prompt.html on a CLOSED TREE
Backed out changeset 7bdcbdc2d57f (bug 1685313)
Backed out changeset 319bc4d7bc0d (bug 1685313)
Backed out changeset 713de42fe3b4 (bug 1685313)
2021-02-12 06:50:58 +02:00
Gijs Kruitbosch
3a51301262 Bug 1685313 - fix tests to pass with either the new or old window modal dialogs, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D104703
2021-02-11 23:57:58 +00:00
Mark Banner
269a6fbae9 Bug 1690750 - Simplify OpenSearchEngine to only allow loading engines from protocols where users can load them from. r=mak
The urls where an OpenSearch engine can be loaded from are already limited in LinkHandlerChild. This is cleaning up and simplifying what the OpenSearchEngine allows, and as a result allows the load path handling to be greatly simplified.

The test changes are due to no longer allowing chrome or file protocols. For future, we probably want to move away from OpenSearch for most of these, but the changes will make it easier to find the places to update.

Differential Revision: https://phabricator.services.mozilla.com/D104010
2021-02-10 18:12:08 +00:00
Drew Willcoxon
faaf1bbc04 Bug 1676469 - Convert matchBuckets to a granular list of result groups and rewrite the muxer to use it. r=preferences-reviewers,mak,harry
Summary of changes:

* Replace the `matchBuckets` pref with `resultBuckets`.
* `resultBuckets` stores a JSON'ed root result bucket object. See the big
  javadoc above `makeResultBuckets` in UrlbarPrefs for details.
* Convert existing result groups to more granular groups. This lets us remove
  the heuristic-ordering logic in the muxer. It also lets us fix a subtle
  inconsistency with regard to remote suggestions and form history; see the
  removal of the two comments that start with "Note that the second form history
  result appears after the remote suggestions" and "Note that the remote
  suggestions appear in between the two form history results" in
  test_search_suggestions.js.
* Unlike `matchBuckets`, `resultBuckets` stores *all* buckets, including the
  heuristic at the beginning. Modify the muxer so that it discards heuristic
  results that are not the first result.

Depends on D103137

Differential Revision: https://phabricator.services.mozilla.com/D99281
2021-02-09 21:53:38 +00:00
Marco Bonardo
cdeebb521d Bug 1678323 - Ctrl+L, Tab stopped working with browser.toolbars.keyboard_navigation=false. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D104212
2021-02-09 10:50:33 +00:00
Cosmin Sabou
4302435c6a Backed out changeset 9f5e51b38c2c (bug 1678323) for causing frequent failures in Bug 1691389 and Bug 1652531. 2021-02-08 19:08:13 +02:00
Marco Bonardo
d3c456716b Bug 1678323 - Ctrl+L, Tab stopped working with browser.toolbars.keyboard_navigation=false. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D104212
2021-02-08 11:07:57 +00:00
harry
094ac488ae Bug 1655403 - Add a test for Bug 1653436. r=mak
This test fails on https://hg.mozilla.org/mozilla-central/rev/138e7b575614cbfc1e45576a15825f51cb6e6614, which still suffered from bug 1653436.

Differential Revision: https://phabricator.services.mozilla.com/D104108
2021-02-05 16:50:28 +00:00
harry
bbeee51ee1 Bug 1685734 - Add telemetry for tab-to-search result impressions. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103075
2021-02-04 19:53:40 +00:00
harry
2d0b656483 Bug 1686330 - Add telemetry for tab-to-search result impressions, per-engine. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103074
2021-02-04 19:53:37 +00:00
Daisuke Akatsuka
5f8799da1b Bug 1689055: Avoid autofilling during IME composition. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103614
2021-02-04 00:15:37 +00:00
Narcis Beleuzu
e2df42fcf3 Backed out 2 changesets (bug 1686330, bug 1685734) for bc failures on browser_urlbar_telemetry_tabtosearch.js
Backed out changeset 50a8c2a5f4e8 (bug 1685734)
Backed out changeset b129d712e3bc (bug 1686330)
2021-02-01 17:52:34 +02:00
harry
56f79705b3 Bug 1685734 - Add telemetry for tab-to-search result impressions. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103075
2021-01-28 15:44:22 +00:00
harry
30bec28da4 Bug 1686330 - Add telemetry for tab-to-search result impressions, per-engine. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103074
2021-01-27 17:23:35 +00:00
harry
ec25717219 Bug 1675558 - Remove emptySearchBehavior setter from browser_searchMode_preview.js. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D103383
2021-01-28 23:13:42 +00:00
Drew Willcoxon
75c1e7b412 Bug 1688786 - Add a browser.urlbar.showSearchSuggestionsFirst pref. r=mak,preferences-reviewers
Introduce a new `browser.urlbar.showSearchSuggestionsFirst` boolean pref that
determines whether search suggestions are shown before general results.

This keeps the `matchBuckets` pref. I could have removed it since the only thing
we're using it for right now is to tell whether suggestions are shown first. The
reason I didn't remove it is because ultimately we do want a `matchBuckets` or
`resultBuckets` pref so we can experiment with different results compositions
using simple pref-flip studies. Hopefully bug 1676469 will land soon and we'll
replace `matchBuckets` with `resultBuckets`, but in the meantime I think we
should keep `matchBuckets` around.

This also removes some `browser.urlbar.matchBuckets` assignments in tests that
don't actually depend on it. For tests that do depend on it, I changed them so
they set `showSearchSuggestionsFirst` now.

Differential Revision: https://phabricator.services.mozilla.com/D103137
2021-01-28 23:23:16 +00:00
Kris Maglione
e6237071e6 Bug 1685801: Part 6 - Move some front-end code from BrowserUtils to a separate module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101486
2021-01-28 20:58:43 +00:00
Mihai Alexandru Michis
040e2ea5d0 Backed out 12 changesets (bug 1685801) for causing bc failures in browser_ctrlTab.js
CLOSED TREE

Backed out changeset 021924b62f13 (bug 1685801)
Backed out changeset 38cc10101c1f (bug 1685801)
Backed out changeset 9ab9574ac72a (bug 1685801)
Backed out changeset 1a7f259cc2ec (bug 1685801)
Backed out changeset b267b19a7f6e (bug 1685801)
Backed out changeset 7dfcf0257487 (bug 1685801)
Backed out changeset ee0d0169b079 (bug 1685801)
Backed out changeset 0c358ee51951 (bug 1685801)
Backed out changeset 338ab91af557 (bug 1685801)
Backed out changeset a49415007aaf (bug 1685801)
Backed out changeset b91098299143 (bug 1685801)
Backed out changeset edf6209861a8 (bug 1685801)
2021-01-28 22:55:11 +02:00
Kris Maglione
69c936d646 Bug 1685801: Part 6 - Move some front-end code from BrowserUtils to a separate module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101486
2021-01-28 05:25:03 +00:00
Butkovits Atila
7decdccbdc Backed out 12 changesets (bug 1685801) for causing failures on browser_fission_maxOrigins.js. CLOSED TREE
Backed out changeset 0d7153110519 (bug 1685801)
Backed out changeset 5175062925c7 (bug 1685801)
Backed out changeset 2c1250e786f0 (bug 1685801)
Backed out changeset 0ce3c773ba74 (bug 1685801)
Backed out changeset 9d51c6e24dee (bug 1685801)
Backed out changeset 3f4dc6349441 (bug 1685801)
Backed out changeset a80de9abb9f8 (bug 1685801)
Backed out changeset 30786893a5e7 (bug 1685801)
Backed out changeset 8007b12d6e32 (bug 1685801)
Backed out changeset fa814f4b7125 (bug 1685801)
Backed out changeset 14e4e47ee99f (bug 1685801)
Backed out changeset d9f1feba9454 (bug 1685801)
2021-01-28 07:15:59 +02:00
Kris Maglione
5b2b2517a2 Bug 1685801: Part 6 - Move some front-end code from BrowserUtils to a separate module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101486
2021-01-28 03:32:43 +00:00
harry
1ae7268be1 Bug 1590880 - Reenable tabMatchesInAwesomebar on Fission Linux. r=adw
Looks like this test was fixed by changes to the address bar and/or Fission over the last 14 months.

Differential Revision: https://phabricator.services.mozilla.com/D103180
2021-01-27 19:56:53 +00:00
Bogdan Tara
840c882171 Backed out changeset 5c2127a7d44e (bug 1688000) for gecko decision task complaining about browser.ini CLOSED TREE 2021-01-27 00:01:01 +02:00
harry
7d5db4dea9 Bug 1688000 - Add experimental suggestionsEnabled WebExtension API. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D102645
2021-01-22 19:17:05 +00:00
Magnus Melin
e4574c7ab0 Bug 1524836 - Move new HTML about:config page from browser to toolkit. r=fluent-reviewers,preferences-reviewers,geckoview-reviewers,Gijs,agi
Unbitrot and change strategy for geckoview: now map about:config directly in nsAboutRecirector.cpp

Differential Revision: https://phabricator.services.mozilla.com/D25938
2021-01-26 00:27:56 +00:00
amy churchwell
c2301076d0 Bug 1685991 - Change default value of IME composition pref and add it to Nightly Experiments. r=harry,fluent-reviewers,preferences-reviewers,Gijs,flod
Differential Revision: https://phabricator.services.mozilla.com/D102347
2021-01-25 21:02:20 +00:00
Marco Bonardo
8c5544a801 Bug 1687767 - Don't highlight url heuristic results without autocompleted parts. r=harry
Avoid the cost of highligthing unvisited heuristic url results, since the whole
string would just be copied over and highlighted, paying an unnecessary cost.
Note, here we could go with an HIGHLIGHT.ALL mode, to retain the current behavior,
but highlighting the full url just makes it less readable, and we're not adding
anything to it, so highligting the typed part is not useful regardless.

Also don't try to autofill very long strings, it's expensive and not useful,
since the autofilled part would be out of screen anyway.

Differential Revision: https://phabricator.services.mozilla.com/D102485
2021-01-21 11:21:58 +00:00
Marco Bonardo
aea161cca9 Bug 1672507 - History results are not shown in search mode when they are set to come before search suggestions. r=harry
When the user unchecks the "Show search suggestions before history results" pref,
we change browser.urlbar.matchBuckets to general:5;suggestions:Infinity.
When the code inverted the buckets, it put Infinity suggestions before general
results, pushing them away.
That pref could also be modified by the users or an experiment, so we can't just
set a suggestions limit from the default value (4 at this time).
The safest solution seems to be to get the results, then transplant suggestions
at the top, that allows to keep the matchBuckets defined number of general
results and fill remaining space above them with suggestions.

Differential Revision: https://phabricator.services.mozilla.com/D102346
2021-01-20 09:56:39 +00:00
harry
e34a178297 Bug 1686811 - Call pickResult even when shouldNavigate payload property is set. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D101823
2021-01-15 15:30:44 +00:00
amy churchwell
6d965e2143 Bug 1665066 - Remove payload.keywordOffer in favor of payload.providesSearchMode. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D101414
2021-01-14 18:45:25 +00:00
Marco Bonardo
6f7b5671f5 Bug 1681697 - Private window offers broken switch-to-tab option for top sites. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D101646
2021-01-15 14:23:14 +00:00
Butkovits Atila
16ef47ffcb Backed out changeset a9646f8eaea8 (bug 1686811) for causing failures on browser_tabToSearch.js. 2021-01-15 12:49:11 +02:00
harry
cfbefc1bec Bug 1686767 - Unhide urlbar.extension.enabled pref and add experimental APIs to set it. r=adw
Having browser.urlbar.extension.enabled be a hidden pref was causing issues with the new experimental APIs and their tests. Both the APIs and their tests first read the value of the pref before modifying it so it can later be restored to its default value. The default value of a hidden pref is undefined, which was causing errors. It's not a particularly sensitive pref, so I think unhiding it is preferable to finding a workaround to get the APIs/tests working with hidden prefs.

Differential Revision: https://phabricator.services.mozilla.com/D101799
2021-01-14 23:44:04 +00:00
harry
a94aefd245 Bug 1686811 - Call pickResult even when shouldNavigate payload property is set. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D101823
2021-01-14 23:08:58 +00:00
Narcis Beleuzu
d1017d448c Backed out changeset 663e0df951c7 (bug 1686767) for bustages on browser.ini . CLOSED TREE 2021-01-15 00:28:17 +02:00
harry
1940012423 Bug 1686767 - Unhide urlbar.extension.enabled pref and add experimental APIs to set it. r=adw
Having browser.urlbar.extension.enabled be a hidden pref was causing issues with the new experimental APIs and their tests. Both the APIs and their tests first read the value of the pref before modifying it so it can later be restored to its default value. The default value of a hidden pref is undefined, which was causing errors. It's not a particularly sensitive pref, so I think unhiding it is preferable to finding a workaround to get the APIs/tests working with hidden prefs.

Differential Revision: https://phabricator.services.mozilla.com/D101799
2021-01-14 21:49:02 +00:00
harry
50286f3f68 Bug 1686127 - Support text highlighting in dynamic results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D101412
2021-01-12 19:53:15 +00:00
Dale Harvey
0c5ce1b439 Bug 1685619 - Add shouldNavigate property to dynamic urlbar results r=harry
Differential Revision: https://phabricator.services.mozilla.com/D101230
2021-01-12 17:05:40 +00:00
Alexis Beingessner
b1d3b28ef7 Bug 1683730 - disabled tests failing with tsan full shutdown. r=decoder
Seems like all timeouts at various levels.

Differential Revision: https://phabricator.services.mozilla.com/D100269
2021-01-08 20:08:29 +00:00
harry
57e4db1090 Bug 1680022 - Add idMap property to getViewUpdate and prohibit dynamic results from setting their own IDs. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D100402
2020-12-24 04:44:09 +00:00
Marco Bonardo
726ab31493 Bug 1682434 - Limit textruns and substring matching for search suggestions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D99955
2020-12-21 20:56:29 +00:00
Marco Bonardo
fa500549fe Bug 1682434 - Don't store long strings in search history. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D99954
2020-12-21 21:02:54 +00:00
Dorel Luca
e37e8dabfe Backed out 2 changesets (bug 1682434) for Browser-chrome in browser/components/search/test/browser/browser_contentSearchUI.js. CLOSED TREE
Backed out changeset 4fb5a850c536 (bug 1682434)
Backed out changeset 8ffb755b259c (bug 1682434)
2020-12-18 19:53:59 +02:00
Marco Bonardo
3aaaff0efc Bug 1682434 - Limit textruns and substring matching for search suggestions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D99955
2020-12-18 14:27:52 +00:00
Marco Bonardo
7cec5c8073 Bug 1682434 - Don't store long strings in search history. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D99954
2020-12-18 14:27:18 +00:00
Marco Bonardo
b6b5c24f76 Bug 1665049 - Remove browser.urlbar.update2. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99487
2020-12-18 10:01:24 +00:00
Marco Bonardo
63f7262ffb Bug 1665049 - Remove browser.urlbar.update2.oneOffsRefresh. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99793
2020-12-18 09:58:17 +00:00
Marco Bonardo
26dfd39dc6 Bug 1665049 - Remove browser.urlbar.update2.restyleBrowsingHistoryAsSearch. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99486
2020-12-18 09:56:11 +00:00
smolnar
d1d6af0ee7 Backed out 4 changesets (bug 1665049) for causing bustages in browser.ini CLOSED TREE
Backed out changeset fd06f6552ad0 (bug 1665049)
Backed out changeset 156a323cd31a (bug 1665049)
Backed out changeset 011f54945acb (bug 1665049)
Backed out changeset 028644c366d5 (bug 1665049)
2020-12-18 11:45:30 +02:00
Marco Bonardo
947f7da190 Bug 1665049 - Remove browser.urlbar.update2. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99487
2020-12-18 09:26:35 +00:00
Marco Bonardo
3e2f9d5ad0 Bug 1665049 - Remove browser.urlbar.update2.oneOffsRefresh. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99793
2020-12-18 09:26:35 +00:00
Marco Bonardo
dcb080fd98 Bug 1665049 - Remove browser.urlbar.update2.restyleBrowsingHistoryAsSearch. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99486
2020-12-18 09:26:35 +00:00
Molly Howell
40e58b1257 Bug 1553982 Part 5 - Add a test for the update lock and make existing tests support it. r=bytesized,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D95630
2020-12-10 22:13:25 +00:00
kanishk509
3eca37d628 Bug 1654217 - Make getEngineByAlias async. r=Standard8,preferences-reviewers,nanj
Differential Revision: https://phabricator.services.mozilla.com/D96729
2020-12-11 21:41:17 +00:00
Marco Bonardo
a2e75ddb50 Bug 1678138 - Add a Preferences toggle for tab-to-search results. r=harry,fluent-reviewers,preferences-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D99393
2020-12-11 11:05:43 +00:00
Marco Bonardo
0148f5315e Bug 1681512 - Unchecking a search engine should also disable tab-to-search for it. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99370
2020-12-10 17:56:38 +00:00
harry
7a9f5d261c Bug 1681513 - Stop Accel+K from removing existing search strings. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D99287
2020-12-10 10:22:37 +00:00
Mark Banner
5bfe12a2c4 Bug 1680735 - Rename SearchTelemetry to SearchSERPTelemetry. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D98791
2020-12-08 20:42:15 +00:00
Mark Banner
5cf95b6b27 Bug 1680735 - Move search specific telemetry out of BrowserUsageTelemetry.jsm into a new module. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D98753
2020-12-08 20:42:03 +00:00
Marco Bonardo
9e23ca3976 Bug 1673971 - Add a pref to show search suggestions during IME composition in the address bar. r=adw
Depends on D98768

Differential Revision: https://phabricator.services.mozilla.com/D98860
2020-12-07 21:50:28 +00:00
Drew Willcoxon
14225c1014 Bug 1678765 - Fix broken "Search with" action text for heuristic results that are restyled to look like search results. r=harry
This was a little harder than it seemed like it should be because we show/hide
the title separator in two places, in `UrlbarView.updateRow` and in the CSS.
This patch gets rid of the show/hide in `updateRow`, so now we show/hide only in
the CSS. The decision to show/hide in `updateRow` was based on whether the
result has action text (`actionSetter`) or is a URL (`setURL`). We already had a
`has-url` attribute that corresponds directly to `setURL`, so adding a similar
`has-action` attribute that corresponds to `actionSetter` lets us show/hide only
in the CSS.

The second part of this patch is to actually fix the bug. For that, the existing
`show-action-text` attribute does part of what we want in the CSS: It forces the
action to be shown when a one-off is selected and there's no selected row. In
addition to that, we need to show the action when both a restyled search and a
one-off are selected, so this adds a new `restyled-search` attribute. We need
both attributes because we do not want to show the action for a restyled search
when some other row plus a one-off are selected (to match the current behavior).

Depends on D97843

Differential Revision: https://phabricator.services.mozilla.com/D98429
2020-12-07 22:43:02 +00:00
Bogdan Tara
ade4d82c59 Backed out changeset 98c3e6255c58 (bug 1597600) for browser_installssl.js failures CLOSED TREE 2020-12-07 21:01:50 +02:00
R. Martinho Fernandes
c99fe51d2d Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2020-12-07 17:10:52 +00:00
Daisuke Akatsuka
66c172fe1a Bug 1679641: Not nullify _keyDownEnterDeferred, if it was rejected on keydown. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D98561
2020-12-07 10:45:17 +00:00
Cristina Coroiu
1843375acb Backed out 6 changesets (bug 1553982) for breaking updates on Linux (bug 1680935) a=backout
Backed out changeset 78dce99516dd (bug 1553982)
Backed out changeset 40d67c6dfdf3 (bug 1553982)
Backed out changeset 71742fced1ba (bug 1553982)
Backed out changeset 9dcf78cd576f (bug 1553982)
Backed out changeset 01d41760db29 (bug 1553982)
Backed out changeset 5040354e75c2 (bug 1553982)
2020-12-07 11:35:41 +02:00
Daisuke Akatsuka
b4ec5e858f Bug 1638215: Use https for canonization the URL. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D97942
2020-12-07 01:54:05 +00:00
Marco Bonardo
19e9e7b349 Bug 1673669 - Fix Address Bar IME composition interaction with Search Mode and the Event Bufferer. r=adw
Fix a race condition with Korean IME, where it may submit delayed text after
Enter has been handled. The patch delays events if composition is still ongoing
and avoids using the selected element or the last resultForValue if it's not
yet complete by the time we submit the text.
Unfortunately this cannot be tested automatically in mochitests because it
depends on a native behavior of the IME that synthesize methods can't reproduce.

Additionally this fixes Bug 1679697 by ensuring Search Mode is not dismissed
by IME and the urlbar value is proper when confirming Tab-to-search.
This part comes with tests.

Differential Revision: https://phabricator.services.mozilla.com/D98768
2020-12-06 15:30:18 +00:00
Razvan Maries
ee021779b5 Backed out changeset a507222dac63 (bug 1678765) for perma failures on browser_oneOffs_searchSuggestions.js. CLOSED TREE 2020-12-04 06:02:22 +02:00
Drew Willcoxon
c33bf2e704 Bug 1678765 - Fix broken "Search with" action text for heuristic results that are restyled to look like search results. r=harry
This was a little harder than it seemed like it should be because we show/hide
the title separator in two places, in `UrlbarView.updateRow` and in the CSS.
This patch gets rid of the show/hide in `updateRow`, so now we show/hide only in
the CSS. The decision to show/hide in `updateRow` was based on whether the
result has action text (`actionSetter`) or is a URL (`setURL`). We already had a
`has-url` attribute that corresponds directly to `setURL`, so adding a similar
`has-action` attribute that corresponds to `actionSetter` lets us show/hide only
in the CSS.

The second part of this patch is to actually fix the bug. For that, the existing
`show-action-text` attribute does what we want in the CSS; the only problem is
that we currently set it only when there's no selected row, but we need to also
set it when there's no selected row but a one-off is selected. We have a similar
block -- the one with a comment about restyling the heuristic to look like a
search result -- so I removed the block that currently sets/removes the
attribute and moved the set/removal there. I also renamed the attribute
`restyled-search` to better semantically describe what's happening, but if you
disagree I can restore the old name.

Depends on D97843

Differential Revision: https://phabricator.services.mozilla.com/D98429
2020-12-04 02:54:55 +00:00
Molly Howell
6206b305ec Bug 1553982 Part 5 - Add a test for the update semaphore and make existing tests support it. r=bytesized,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D95630
2020-12-03 21:52:10 +00:00
Razvan Maries
539965b94b Backed out 6 changesets (bug 1553982) for build bustages on stat.h. CLOSED TREE
Backed out changeset a207ff8ae135 (bug 1553982)
Backed out changeset bfea27666adf (bug 1553982)
Backed out changeset 1299e017328e (bug 1553982)
Backed out changeset e9e14538b7ff (bug 1553982)
Backed out changeset 63f834f25945 (bug 1553982)
Backed out changeset 91bc72bf7a1b (bug 1553982)
2020-12-03 22:40:42 +02:00
Molly Howell
7ac68286ba Bug 1553982 Part 5 - Add a test for the update semaphore and make existing tests support it. r=bytesized,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D95630
2020-12-03 20:11:24 +00:00
Narcis Beleuzu
07361535cd Backed out changeset f59efe5a5ef8 (bug 1638215) for bc failures on browser_tabDrop.js. CLOSED TREE 2020-12-03 17:25:28 +02:00
Daisuke Akatsuka
e5a9f1aeee Bug 1638215: Use https for canonization the URL. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D97942
2020-12-03 11:21:36 +00:00