Commit graph

21 commits

Author SHA1 Message Date
Drew Willcoxon
ee7630f333 Bug 1524718 - Replace context.autofillValue with result.autofill, and autofill results when they're selected. r=mak
We should replace the context.autofillValue property with a result.autofill property. When the view selects results, it already notifies the input about it by calling input.setValueFromResult(). So we can modify setValueFromResult to check for the presence of result.autofill and thereby get autofill "for free".

result.autofill is an object: { value, selectionStart, selectionEnd }

This is going to help me implement bug 1521702.

One potentially cool thing about doing autofill this way is that any result can now trigger autofill, not only the heuristic result, and do it easily. Of course the user isn't typing when they select a non-heuristic result, so it's probably not fair to call that "autofill", but the result can trigger the selection aspect of autofill. As one example, that might be interesting for search suggestions: Type "foo", key down to the "foobar" suggestion, and the "bar" substring is automatically selected.

Differential Revision: https://phabricator.services.mozilla.com/D18618

--HG--
extra : moz-landing-system : lando
2019-02-07 00:30:04 +00:00
Narcis Beleuzu
8adc1fee1a Backed out changeset f89acdbfa432 (bug 1524718) for bc failures on browser_urlbar_locationchange_urlbar_edit_dos.js. CLOSED TREE 2019-02-06 19:42:16 +02:00
Drew Willcoxon
6ab2c13cf4 Bug 1524718 - Replace context.autofillValue with result.autofill, and autofill results when they're selected. r=mak
We should replace the context.autofillValue property with a result.autofill property. When the view selects results, it already notifies the input about it by calling input.setValueFromResult(). So we can modify setValueFromResult to check for the presence of result.autofill and thereby get autofill "for free". (The one place where the view doesn't call input.setValueFromResult() when a result is selected is when it selects the preselected result, so this patch adds that.)

result.autofill is an object: { value, selectionStart, selectionEnd }

This is going to help me implement bug 1521702.

One potentially cool thing about doing autofill this way is that any result can now trigger autofill, not only the heuristic result, and do it easily. Of course the user isn't typing when they select a non-heuristic result, so it's probably not fair to call that "autofill", but the result can trigger the selection aspect of autofill. As one example, that might be interesting for search suggestions: Type "foo", key down to the "foobar" suggestion, and the "bar" substring is automatically selected.

Differential Revision: https://phabricator.services.mozilla.com/D18618

--HG--
extra : moz-landing-system : lando
2019-02-06 16:38:27 +00:00
Drew Willcoxon
bbe5c6a49c Bug 1522280 - Add autofill tests: controller tests. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17901

--HG--
extra : moz-landing-system : lando
2019-01-29 19:56:05 +00:00
Drew Willcoxon
5c43b240ea Bug 1523483 - Remove duplicate test function test_autocomplete_enabled in test_UrlbarController_unit.js. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D17898

--HG--
extra : moz-landing-system : lando
2019-01-29 19:31:15 +00:00
Cosmin Sabou
596e337c2d Backed out 2 changesets (bug 1523483, bug 1522280) for xpcshell failures on test_UrlbarController_unit.js
Backed out changeset 2859bb1963a1 (bug 1522280)
Backed out changeset 0aaeb345e02c (bug 1523483)
2019-01-29 19:23:11 +02:00
Drew Willcoxon
9d1c0a14be Bug 1522280 - Add autofill tests: controller tests. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17901

--HG--
extra : moz-landing-system : lando
2019-01-29 16:31:19 +00:00
Drew Willcoxon
1fd06b9259 Bug 1523483 - Remove duplicate test function test_autocomplete_enabled in test_UrlbarController_unit.js. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D17898

--HG--
extra : moz-landing-system : lando
2019-01-29 16:26:52 +00:00
Mark Banner
06a254f13d Bug 1521492 - When the QuantumBar input receives a blur, ensure queries are stopped and the popup is closed. r=dao
Depends on D17352

Differential Revision: https://phabricator.services.mozilla.com/D17369

--HG--
extra : moz-landing-system : lando
2019-01-24 12:22:14 +00:00
Drew Willcoxon
78544a4304 Bug 1520907 - Rename QueryContext to UrlbarQueryContext. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17033

--HG--
rename : browser/components/urlbar/tests/unit/test_QueryContext.js => browser/components/urlbar/tests/unit/test_UrlbarQueryContext.js
extra : moz-landing-system : lando
2019-01-23 00:39:07 +00:00
Drew Willcoxon
874d24f142 Bug 1520368 - Clarify the queryContext.autofill property and add an enableAutofill property. r=mak
This patch is based on the patch in bug 1520342.

I made the UnifiedComplete provider manually check `context.enableAutofill` before setting `context.autofill`.  If we end up with other providers setting `autofill`, they'd have to be careful to check `enableAutofill` too.  Maybe it would be better to have a `context.autofill` getter that always returns false when `enableAutofill` is false, or a setter that forces it to be false in that case?  Anyway, I opted for a simple approach in this patch.

The patch also rearranges properties so that they're listed in alphabetical order.  Not really necessary, but I think it's easier to pick out properties that way, and it's a logical order for adding more properties.

Differential Revision: https://phabricator.services.mozilla.com/D16639

--HG--
extra : moz-landing-system : lando
2019-01-16 17:02:26 +00:00
Drew Willcoxon
2de99b21f5 Bug 1520342 - Fix autofill and autoFill inconsistency by standardizing on autofill (lowercase F). r=mak
Differential Revision: https://phabricator.services.mozilla.com/D16624

--HG--
extra : moz-landing-system : lando
2019-01-16 15:50:30 +00:00
Mark Banner
ff1a583b08 Bug 1515081 - Reimplement autocomplete result timing telemetry for the new quantumbar. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D15818

--HG--
extra : moz-landing-system : lando
2019-01-09 15:11:49 +00:00
Marco Bonardo
a929c4971c Bug 1502392 - Remove support for browser.urlbar.autocomplete.enabled. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D11245

--HG--
extra : moz-landing-system : lando
2018-11-08 09:59:27 +00:00
Mark Banner
0909ebdd11 Bug 1500483 - Clarify the type of window that should be passed to UrlbarController, and tidy usages of the window in the controller. r=mak
Depends on D9926

Differential Revision: https://phabricator.services.mozilla.com/D9927

--HG--
extra : moz-landing-system : lando
2018-10-29 10:23:31 +00:00
Mark Banner
8c24c2529b Bug 1498181 - Initial methods for handling result selection in the new address bar architecture. r=dao
The intent here is that the input/view deal with the handling of clicks/pressing enter, and the controller only deals with opening the required item.

Differential Revision: https://phabricator.services.mozilla.com/D8382

--HG--
extra : moz-landing-system : lando
2018-10-12 16:13:42 +00:00
Mark Banner
99dfef0b27 Bug 1494662 - Integrate the urlbar provider manager with the controller. r=dao
This picks up naming changes from the provider manager landing, and also makes starting a query be named consistently across the modules.

Differential Revision: https://phabricator.services.mozilla.com/D7297

--HG--
extra : moz-landing-system : lando
2018-10-02 14:22:29 +00:00
Mark Banner
b890fde6ec Bug 1491253 - Link the UrlbarController with the input and the view. r=dao
This links together the controller with the input and view. It moves the fake results generation to the controller. As a result, there is now an input -> controller -> view round-trip in place.

Also hooks up the input with determining if we're in private browsing mode or not.

Differential Revision: https://phabricator.services.mozilla.com/D6261

--HG--
extra : moz-landing-system : lando
2018-09-20 13:07:18 +00:00
Coroiu Cristina
2e3f6d7d15 Backed out changeset 261d22d6d396 (bug 1491253) for browser-chrome failures at browser/base/content/test/static/browser_all_files_referenced.js on a CLOSED TREE 2018-09-20 14:22:58 +03:00
Mark Banner
c562a56e7d Bug 1491253 - Link the UrlbarController with the input and the view. r=dao
This links together the controller with the input and view. It moves the fake results generation to the controller. As a result, there is now an input -> controller -> view round-trip in place.

Also hooks up the input with determining if we're in private browsing mode or not.

Differential Revision: https://phabricator.services.mozilla.com/D6261

--HG--
extra : moz-landing-system : lando
2018-09-20 10:11:47 +00:00
Mark Banner
ee2e573e9a Bug 1487125 - Create a basic UrlbarController object for the address bar rewrite. r=mak,dao
This creates a basic object with minimal search functionality. It currently uses a dummy ProvidersManager that can be replaced once we get the real one.

There are two test files, the unit one is aiming to test at a unit level - stubbing out the manager, and checking the functionality works correctly.

The second is for checking integration with the providers manager, and it does the right things when linked together. For now, this has just a simple check that uses the dummy ProvidersManager for the case of returning a single result matching the URL.

Depends on D4566

Differential Revision: https://phabricator.services.mozilla.com/D4973

--HG--
extra : moz-landing-system : lando
2018-09-06 19:54:21 +00:00