Commit graph

95 commits

Author SHA1 Message Date
Dão Gottwald
97dc13cb94 Bug 1586889 - Stop re-initializing the urlbar when exiting customize mode. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D49405

--HG--
extra : moz-landing-system : lando
2019-10-17 09:03:12 +00:00
Marco Bonardo
7d77f1ccc3 Bug 1579002 - Retained results: megabar should shown again pending search results on refocus. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D46606

--HG--
extra : moz-landing-system : lando
2019-09-26 13:31:15 +00:00
Harry Twyford
56a52ac8db Bug 1583855 - The Megabar should enter the Focused & Collapsed state when ESC is pressed. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D47126

--HG--
extra : moz-landing-system : lando
2019-09-26 09:06:09 +00:00
Harry Twyford
a609266a08 Bug 1578436 - Handle enter keypresses and mouse clicks on tip buttons. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D46067

--HG--
rename : browser/components/urlbar/tests/browser/browser_tip_keyboard_selection.js => browser/components/urlbar/tests/browser/browser_tip_selection.js
extra : moz-landing-system : lando
2019-09-25 17:37:09 +00:00
Harry Twyford
a9baf68cab Bug 1582022 - Update search one-offs selection behaviour to respect selectable elements in the view instead of rows. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D46339

--HG--
extra : moz-landing-system : lando
2019-09-24 18:45:18 +00:00
Bogdan Tara
b555d01f88 Backed out changeset e28a3e15c777 (bug 1578436) for browser_tip_selection.js failures CLOSED TREE
--HG--
rename : browser/components/urlbar/tests/browser/browser_tip_selection.js => browser/components/urlbar/tests/browser/browser_tip_keyboard_selection.js
2019-09-24 20:53:52 +03:00
Harry Twyford
e3f4b09e6e Bug 1578436 - Handle enter keypresses and mouse clicks on tip buttons. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D46067

--HG--
rename : browser/components/urlbar/tests/browser/browser_tip_keyboard_selection.js => browser/components/urlbar/tests/browser/browser_tip_selection.js
extra : moz-landing-system : lando
2019-09-24 15:26:15 +00:00
Drew Willcoxon
cfb89e146b Bug 1581989 - Properly account for tip results in histogram telemetry. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D46243

--HG--
extra : moz-landing-system : lando
2019-09-18 13:42:14 +00:00
Dorel Luca
c36b2923b0 Backed out changeset 7eba83975e7e (bug 1578436) for Browser-chrome failures in browser/components/urlbar/tests/browser/browser_tip_selection.js
--HG--
rename : browser/components/urlbar/tests/browser/browser_tip_selection.js => browser/components/urlbar/tests/browser/browser_tip_keyboard_selection.js
2019-09-18 01:57:19 +03:00
Harry Twyford
bb98c8df10 Bug 1578436 - Handle enter keypresses and mouse clicks on tip buttons. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D46067

--HG--
rename : browser/components/urlbar/tests/browser/browser_tip_keyboard_selection.js => browser/components/urlbar/tests/browser/browser_tip_selection.js
extra : moz-landing-system : lando
2019-09-17 20:34:11 +00:00
monikamaheshwari
9d60e0d578 Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629

--HG--
extra : moz-landing-system : lando
2019-09-14 09:39:26 +00:00
Harry Twyford
23ad8796f5 Bug 1578435 - Update UrlbarView's selection model to support selection within "tip" results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D45455

--HG--
extra : moz-landing-system : lando
2019-09-13 22:47:41 +00:00
harry
0303f92923 Bug 1578433 - Add a new TIP result type to UrlbarUtils.RESULT_TYPES. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D44714

--HG--
extra : moz-landing-system : lando
2019-09-05 13:09:47 +00:00
Drew Willcoxon
292a6bb2ce Bug 1575038 - Quantumbar: Record engagement event telemetry when openViewOnFocus is triggered without mouse clicks. r=dao
We need to start engagement event recording when the view opens due to `openViewOnFocus`. We already do for mouse clicks since we call `engagementEvent.start` from `_on_mousedown`. But we don't for the Ctrl/Command-L key shortcut. The shortcut command calls `openLocation` in browser.js, which calls `gURLBar.startQuery` but not `engagementEvent.start`.

Every time we call `engagementEvent.start`, we do it before calling `input.startQuery`. The one exception is in `input._on_drop` because there we just handle the dropped value directly instead of starting a new query with it.

The inverse is also mostly true, i.e., every time we call `input.startQuery`, we also call `engagementEvent.start`. The three exceptions are: in UITour (where it looks like we should be calling `urlbar.search` instead), in `UrlbarInput` after picking a keyword offer result, and in `openLocation` in browser.js (mentioned above). So really the only valid place is after picking a keyword entry.

So, it makes sense to move `engagementEvent.start()` into `input.startQuery` so that callers don't have to call it. I added an `event` param to `startQuery`, since `engagementEvent.start` needs one. I considered removing that need. It's possible, but then we would need a way to avoid calling `engagementEvent.start` in the keyword offer case, so `startQuery` would need something like a `suppressEngagementEvent` param. `event` basically functions as that, so I left it.

Another thing to point out about this patch is that I chose to record a "typed" value when the pageproxystate is invalid and the view opens due to `openViewOnFocus`. The view does not show the user's top sites in that case, so "topsites" seems wrong.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 14:50:42 +00:00
harry
4f4a15a1d5 Bug 1528593 - Rename UrlbarInput::value getter to untrimmedValue and textValue to value. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D42190

--HG--
extra : moz-landing-system : lando
2019-08-19 19:15:47 +00:00
Dão Gottwald
21af578b73 Bug 1570688 - Remove UrlbarController::viewContextChanged. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D40229

--HG--
extra : moz-landing-system : lando
2019-08-02 08:36:29 +00:00
Dão Gottwald
3514c20156 Bug 1568959 - Add notifications for the urlbar results view opening and closing. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D40170

--HG--
extra : moz-landing-system : lando
2019-08-02 07:25:25 +00:00
Ciure Andrei
2a4fcddae1 Backed out changeset 7768b6a6cfc7 (bug 1568959) for ESlint failures CLOSED TREE 2019-08-02 03:18:31 +03:00
Dão Gottwald
68864b02f7 Bug 1568959 - Add notifications for the urlbar results view opening and closing. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D40170

--HG--
extra : moz-landing-system : lando
2019-08-01 16:29:19 +00:00
Dão Gottwald
968ae4419d Bug 1551598 - Stop using a popup window for urlbar results. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D38988

--HG--
extra : moz-landing-system : lando
2019-07-25 20:13:33 +00:00
Marco Bonardo
3a39214a77 Bug 1559136 - Add urlbar event telemetry behind a pref. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D38521

--HG--
extra : moz-landing-system : lando
2019-07-25 12:39:02 +00:00
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
Drew Willcoxon
ada1b99b5f Bug 1559179 - Quantumbar: Fix keyboard navigation when stale results are present. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D36537

--HG--
extra : moz-landing-system : lando
2019-07-02 14:24:18 +00:00
Dão Gottwald
1002cff1d3 Bug 1554158 - Always consume the enter key in UrlbarInput. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D34268

--HG--
extra : moz-landing-system : lando
2019-06-11 09:27:51 +00:00
Dão Gottwald
7c07c3ff76 Bug 1556774 - Don't handle Tab key when Ctrl or Alt are pressed. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D34269

--HG--
extra : moz-landing-system : lando
2019-06-11 07:57:03 +00:00
Dão Gottwald
b50e9a3cd7 Bug 1554038 - Make UrlbarInput::pickResult and UrlbarController::recordSelectedResult take a UrlbarResult instead of an index and remove UrlbarView::getResult. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D32708

--HG--
extra : moz-landing-system : lando
2019-05-30 01:13:59 +00:00
Dão Gottwald
51fd51ab63 Bug 1522440 - Finish porting browser_test_focus_urlbar.js to quantumbar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D30346

--HG--
extra : moz-landing-system : lando
2019-05-08 22:04:54 +00:00
Marco Bonardo
4f8c7aa8a1 Bug 1548817 - Quantum Bar controller notifications may arrive out of order. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D30082

--HG--
extra : moz-landing-system : lando
2019-05-08 21:14:33 +00:00
Dão Gottwald
090bb68c30 Bug 1548860 - Set a11y focus in the UrlbarView when arrowing down and remove it on backspace. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D29664

--HG--
extra : moz-landing-system : lando
2019-05-03 18:32:15 +00:00
Drew Willcoxon
70e0b1acf5 Bug 1539804 - Quantumbar: Re-enable browser_urlbarStopSearchOnSelection.js and fix a couple of related problems. r=mak
This test uncovered a couple of problems:

(1) UrlbarController.handleKeyNavigation relies on event.defaultPrevented to tell whether the one-offs handled the key event. That's a problem when combined with deferring the down arrow key.

handleKeyNavigation is called twice in that case. The first time, the event is deferred (so executeAction = false), and handleKeyNavigation calls event.preventDefault. The second time, the event is being replayed, but defaultPrevented is true from the previous call regardless of whether the one-offs actually handled the event.

So handleKeyNavigation always returns early because it thinks the one-offs always handled the event, so it never properly replays down arrow keys.

(2) UrlbarProviderUnifiedComplete's query promise is never resolved when the query is canceled. That's a problem in general of course but I tripped over it in this test because I need to check results after the query is canceled, and the test ended up hanging since UrlbarTestUtils waits for the query to finish in order to get its results.

It's not a problem in UnifiedComplete itself per se because of course awesomebar uses UnifiedComplete too, and it doesn't have this problem. The difference is that nsAutoCompleteController::StopSearch calls input->OnSearchComplete() (via PostSearchCleanup): https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/components/autocomplete/nsAutoCompleteController.cpp#1433

Quantumbar's UnifiedComplete provider is missing that behavior, so this patch adds it by resolving its query promise when the query is canceled.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:42:19 +00:00
Ciure Andrei
9b79007ae8 Backed out changeset 9242458b79d5 (bug 1539804) for high frequency browser/browser_urlbarStopSearchOnSelection.js failures CLOSED TREE 2019-05-01 14:45:59 +03:00
Drew Willcoxon
539ae1ed8f Bug 1539804 - Quantumbar: Re-enable browser_urlbarStopSearchOnSelection.js and fix a couple of related problems. r=mak
This test uncovered a couple of problems:

(1) UrlbarController.handleKeyNavigation relies on event.defaultPrevented to tell whether the one-offs handled the key event. That's a problem when combined with deferring the down arrow key.

handleKeyNavigation is called twice in that case. The first time, the event is deferred (so executeAction = false), and handleKeyNavigation calls event.preventDefault. The second time, the event is being replayed, but defaultPrevented is true from the previous call regardless of whether the one-offs actually handled the event.

So handleKeyNavigation always returns early because it thinks the one-offs always handled the event, so it never properly replays down arrow keys.

(2) UrlbarProviderUnifiedComplete's query promise is never resolved when the query is canceled. That's a problem in general of course but I tripped over it in this test because I need to check results after the query is canceled, and the test ended up hanging since UrlbarTestUtils waits for the query to finish in order to get its results.

It's not a problem in UnifiedComplete itself per se because of course awesomebar uses UnifiedComplete too, and it doesn't have this problem. The difference is that nsAutoCompleteController::StopSearch calls input->OnSearchComplete() (via PostSearchCleanup): https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/components/autocomplete/nsAutoCompleteController.cpp#1433

Quantumbar's UnifiedComplete provider is missing that behavior, so this patch adds it by resolving its query promise when the query is canceled.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 02:30:47 +00:00
Drew Willcoxon
c1f323bbe7 Bug 1541929 - Don't autofill the first result in some cases. r=mak
We need to handle autofilling the first result separately from autofilling results in general (which happens in UrlbarInput.setValueFromResult), so add a new UrlbarInput.autofillFirstResult method. The controller calls it instead of setValueFromResult. I ported the logic from nsAutoCompleteController, as described in the bug.

Other changes are related to the new test for this.

As part of this work, I was interested in learning how awesomebar handles browser_autoFill_typed.js, so I added it to the legacy tests, with a small tweak in the test for awesomebar.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 13:15:30 +00:00
Drew Willcoxon
2c2bb13ce7 Bug 1540710 - Down arrow key on the current URL/text should search for the URL/text, and clicking on the history dropmarker should keep the input's current value. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D25906

--HG--
extra : moz-landing-system : lando
2019-04-11 21:09:50 +00:00
Marco Bonardo
b69efcad09 Bug 1532738 - Fix the expected outcome of browser_caret_navigation.js. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D25978

--HG--
extra : moz-landing-system : lando
2019-04-10 09:07:55 +00:00
Drew Willcoxon
740f437ce0 Bug 1533054 - Add tests for selection key navigation: up/down, page-up/down, tab r=mak
Differential Revision: https://phabricator.services.mozilla.com/D25901

--HG--
extra : moz-landing-system : lando
2019-04-04 12:11:32 +00:00
Dão Gottwald
e52d04f50f Bug 1542099 - Return a11y focus to the input when arrow left/arrow right/home/end keys are pressed. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D26313

--HG--
extra : moz-landing-system : lando
2019-04-05 15:00:36 +00:00
Cosmin Sabou
60d90c1df7 Backed out changeset 278767179a87 (bug 1532738) for turning bug 1352679 into permafail. 2019-04-04 19:13:27 +03:00
Marco Bonardo
18a897a02f Bug 1532738 - Fix the expected outcome of browser_caret_navigation.js. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D25978

--HG--
extra : moz-landing-system : lando
2019-04-04 09:09:33 +00:00
Dão Gottwald
346b38ebad Bug 1524510 - Freeze quantum bar results when the user interacts with them. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D25222

--HG--
extra : moz-landing-system : lando
2019-03-29 14:53:52 +00:00
Dão Gottwald
c74034d3c0 Bug 1525910 - QuantumBar: Pressing the down key should first go to the end of line, then open the results. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D20437

--HG--
extra : moz-landing-system : lando
2019-03-05 15:16:00 +00:00
Marco Bonardo
aef1c1beed Bug 1530985 - Make Quantum Bar controller notifications optional. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D21543

--HG--
extra : moz-landing-system : lando
2019-03-01 12:36:14 +00:00
Mark Banner
9df875fc5e Bug 1522508 - Notify Omnibox WebExtensions when the user cancels a search via blur. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D21004

--HG--
extra : moz-landing-system : lando
2019-02-28 09:33:08 +00:00
Marco Bonardo
d012deb395 Bug 1496685 - Implement UrlbarController::viewContextChanged. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D20841

--HG--
extra : moz-landing-system : lando
2019-02-26 15:30:10 +00:00
Marco Bonardo
5d76717637 Bug 1526817 - Enable browser_autocomplete_enter_race.js for QuantumBar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D20670

--HG--
extra : moz-landing-system : lando
2019-02-21 23:15:32 +00:00
Marco Bonardo
0823cb7547 Bug 1525547 - Unify removing Quantum Bar entries to shift+DEL/BKSP. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D20642

--HG--
extra : moz-landing-system : lando
2019-02-21 19:46:24 +00:00
Dão Gottwald
31d3c61a49 Bug 1526815 - QuantumBar: implement page up/down behavior and enable browser_autocomplete_autoselect.js. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D20361

--HG--
extra : moz-landing-system : lando
2019-02-21 18:53:07 +00:00
Mark Banner
0df151fa88 Bug 1500476 - Re-implement FX_URLBAR_SELECTED_RESULT_METHOD on the new Quantumbar. r=dao
This doesn't enable the rightClick option for telemetry reporting as that is complicated to support, see bug 1528250.

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

--HG--
extra : moz-landing-system : lando
2019-02-17 06:57:58 +00:00
Mark Banner
10cebf3c34 Bug 1515083 - Re-implement telemetry for selected index/type on QuantumBar. r=adw
This makes the browser_UsageTelemetry_urlbar*.js tests pass for the all of the
FX_URLBAR_SELECTED_RESULT_* histograms apart from the "METHOD" one which will be handled
in bug 1500476.

I have handled the recording of telemetry in the controller, as this seems a better
location than BrowserUsageTelemetry.jsm due to needing to reach into the results and obtain
specific details.

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

--HG--
extra : moz-landing-system : lando
2019-02-15 14:57:23 +00:00
Dão Gottwald
f568816086 Bug 1527260 - Integrate one off buttons into keyboard navigation. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D19656

--HG--
extra : moz-landing-system : lando
2019-02-13 15:06:54 +00:00