Commit graph

159 commits

Author SHA1 Message Date
Drew Willcoxon
c901619704 Bug 1545742 - Quantumbar: Remove the proper nsIController on uninit and customize start so that left/right arrow and home/end keys work after exiting customize mode. r=mak
When UrlbarInput.uninit is called after customize mode ends, uninit calls this.inputField.controllers.removeControllerAt(0), which is supposed to remove the input's CopyCutController inserted in the constructor. But the controller at index 0 at that point is not the CopyCutController. Instead it's some built-in controller that supports these commands (at least these): cmd_charPrevious, cmd_charPrevious, cmd_beginLine, cmd_endLine. (Verified by adding logging to nsXULControllers::GetControllerForCommand.) That's why arrow left/right and home/end don't work after ending customize mode.

The problem is that this.inputField.controllers in the constructor and this.inputField.controllers in uninit (when customize mode ends) are not the same. I wasn't able to track down why, but I'm guessing that the textbox or something in its state is being reset or cloned when customized mode ends or maybe right after it starts. The CopyCutController isn't in the controllers array at all on uninit. (Verified by adding support for cmd_adw and iterating through the controllers array, looking for a controller supporting cmd_adw.)

Note that urlbarBindings.xml has a try-catch around removeController(), I'm guessing for what turns out to be this reason: https://searchfox.org/mozilla-central/rev/7944190ad1668a94223b950a19f1fffe8662d6b8/browser/base/content/urlbarBindings.xml#190

However, CopyCutController *is* in the controllers array when customize mode starts. So I added a new gURLBarHandler.customizeStart method that calls a new UrlbarInput.removeCopyCutController method.

Other things I tried or thought of doing:

Call gURLBarHandler._reset on customize start instead of end. Problem with that is that the UrlbarInput ends up getting immediately recreated because some other parts of the browser access gURLBar at that time. (Of course I replaced the `gURLBar = this.urlbar` assignment in _reset with another lazy getter definition.)

Just don't worry about removing CopyCutController at all. That seems bad because then we'd leak it, unless the controller is removed or the controllers array is emptied at some point by XUL, and I'm not at all certain about that. (Although I guess this is effectively what awesomebar does, given the link above!)

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

--HG--
extra : moz-landing-system : lando
2019-05-03 16:03:00 +00:00
Drew Willcoxon
5d3e10fe23 Bug 1541921 - Remove duplicate-search bailout from quantumbar. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D27859

--HG--
extra : moz-landing-system : lando
2019-04-25 05:54:44 +00:00
Drew Willcoxon
cf27bc7f66 Bug 1544996 - Call setValueFromResult when autofilling the first result so that cut/copy work correctly on the autofilled value. r=dao
Bug 1541929 broke this by bypassing setValueFromResult when autofilling the first result in autofillFirstResult. setValueFromResult sets _resultForCurrentValue, so _resultForCurrentValue is null when _getSelectedValueForClipboard is called. We should call setValueFromResult in autofillFirstResult instead of calling _autofillValue directly.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 05:58:20 +00:00
Brindusan Cristian
3704a79e13 Backed out changeset b97df75c9365 (bug 1541921) for bc mochitest asan failures. 2019-04-20 01:35:37 +03:00
Drew Willcoxon
8f9a1d4ab3 Bug 1541921 - Remove duplicate-search bailout from quantumbar. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D27859

--HG--
extra : moz-landing-system : lando
2019-04-19 20:57:56 +00:00
Marco Bonardo
ce793a562d Bug 776408 - Do not autofill after a paste. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D28051

--HG--
extra : moz-landing-system : lando
2019-04-19 09:10:40 +00:00
Drew Willcoxon
607920f718 Bug 1524550 - Remove UrlbarQueryContext's lastKey property. r=mak
This assumes that the current direction in bug 1522278 is the one we want, which it's looking like it is.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 15:19:23 +00:00
Drew Willcoxon
1bc115e695 Bug 1522278 - Use nsIEditActionListener to detect when the user deletes autofilled substrings. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D27637

--HG--
extra : moz-landing-system : lando
2019-04-17 15:19:23 +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
Marco Bonardo
f007744700 Bug 1541647 - Avoid rebinding the urlbar on startup if Quantum Bar is enabled. r=Standard8
Applying the attribute early enough allows us to avoid rebinding the urlbar,
plus a few checks to ensure "popup" windows, without a visible toolbar, work
properly.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 14:14:51 +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
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
Marco Bonardo
b0bdfa84fc Bug 1533683 - Port the fix for Bug 1480349. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D25668

--HG--
extra : moz-landing-system : lando
2019-04-03 12:39:13 +00:00
Marco Bonardo
0e5180139a Bug 1533052 - Port IME tests from autocomplete. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D25365

--HG--
extra : moz-landing-system : lando
2019-04-02 14:24:43 +00:00
Noemi Erli
4a99b6924a Backed out changeset e5baf85c4ceb (bug 1533052) for failures in browser_ime_composition.js CLOSED TREE 2019-04-02 01:32:24 +03:00
Marco Bonardo
d8959021e7 Bug 1533052 - Port IME tests from autocomplete. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D25365

--HG--
extra : moz-landing-system : lando
2019-04-01 21:24:42 +00:00
Dão Gottwald
e6ae768e15 Bug 1538158 - Clicking the history dropmarker should initiate an empty search instead of searching for the loaded URL. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D25059

--HG--
extra : moz-landing-system : lando
2019-03-28 16:18:50 +00:00
Brindusan Cristian
c6935ffebe Backed out changeset 827a1c12a137 (bug 1538158) for bc failures at browser_action_searchengine.js. 2019-03-28 14:46:16 +02:00
Dão Gottwald
ebf1e6991b Bug 1538158 - Clicking the history dropmarker should initiate an empty search instead of searching for the loaded URL. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D25059

--HG--
extra : moz-landing-system : lando
2019-03-28 10:45:08 +00:00
Dão Gottwald
18caff664d Bug 1537716 - Quantumbar: Suppress a11y focus for the auto-selected result. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D24332

--HG--
extra : moz-landing-system : lando
2019-03-27 10:38:52 +00:00
Drew Willcoxon
c707227057 Bug 1538293 - Make autofilling the placeholder allow changes in case. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D24593

--HG--
extra : moz-landing-system : lando
2019-03-26 22:59:14 +00:00
Marco Bonardo
6b5b1c40cd Bug 1533038 - Test that userContextId is properly added to the queryContext. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D24357

--HG--
extra : moz-landing-system : lando
2019-03-26 15:15:54 +00:00
Mark Banner
ce267bd0ae Bug 1538771 - Move trimURL to BrowserUtils.jsm so it can be more easily accessed in non-window contexts. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D24761

--HG--
extra : moz-landing-system : lando
2019-03-26 09:15:50 +00:00
Marco Bonardo
134a6c11a6 Bug 1536751 - Quantum Bar should clear switch-to-tab overrides on blur. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D24492

--HG--
extra : moz-landing-system : lando
2019-03-25 09:04:31 +00:00
Drew Willcoxon
ad4b3ecfcb Bug 1538117 - Fix autofill when typing the last character of an autofilled value. r=mak
_autofillValueOnInput correctly uses the placeholder string as the autofilled value, but it incorrectly uses _lastSearchString as the current input value.  _lastSearchString at that point is -- yes -- the previous search string, not what the user has just typed.  So when _autofillValueOnInput sets selectionStart to _lastSesarchString.length, the length is one char less than what it should be.

But why does that mess up only the last char typed and not every char?  Because when the first result comes in, we correctly autofill it.  It's only when the first result is not an autofill result that the incorrect placeholder autofill sticks around -- e.g., just after you type the last char in an @ alias.

This patch just gets rid of _autofillValueOnInput and inlines the body in _maybeAutofillOnInput.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 20:34:44 +00:00
Mark Banner
da3d75151a Bug 1530675 - Enable WebNavigation transistion notifications for WebExtensions with QuantumBar. r=mak,rpl
Differential Revision: https://phabricator.services.mozilla.com/D21218

--HG--
extra : moz-landing-system : lando
2019-03-20 20:22:35 +00:00
Mark Banner
45e4b14a1a Bug 1528683 - Update and annotate existing QuantumBar TODO comments with bug numbers. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D24199

--HG--
extra : moz-landing-system : lando
2019-03-20 16:12:35 +00:00
Drew Willcoxon
674a2ade96 Bug 1529931 - Prevent autofill flicker and fix cases where we're not autofilling but should be. r=mak
* In nsAutoCompleteController, the logic that determines whether the new search is a prefix of the old search is only done in HandleText, i.e., on input, not when the value is set programmatically.

* That logic is a lot more complex in nsAutoCompleteController.

* nsAutoCompleteController autofills in one case where quantumbar doesn't: when completing the "placeholder" string before starting a new search and waiting for the async results (thereby preventing flicker).

* Some nsAutoCompleteController state gets reset each time the awesomebar is focused (see calls to attachController() in the autocomplete binding, which sets the controller's input, which calls ResetInternalState()). That state is important in regard to autofill and the placeholder string. If it's not reset, then the autofill of one search will incorrectly affect the autofill of a later search.

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

--HG--
rename : browser/components/urlbar/tests/browser/browser_UrlbarInput_autofill.js => browser/components/urlbar/tests/browser/browser_autoFill_caretNotAtEnd.js
extra : moz-landing-system : lando
2019-03-20 17:07:15 +00:00
Marco Bonardo
a88ef6676c Bug 1530706 - IME may be displayed along with the urlbar results panel. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D23836

--HG--
extra : moz-landing-system : lando
2019-03-19 14:06:33 +00:00
Mark Banner
6ea18465bb Bug 1534661 - Fix the QuantumBar results view to have an accessible role of ROLE_COMBOBOX_LIST. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D23155

--HG--
extra : moz-landing-system : lando
2019-03-15 16:43:11 +00:00
Drew Willcoxon
29930869b6 Bug 1535203 - Don't close and reopen the popup when an @alias offer is clicked. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D23436

--HG--
extra : moz-landing-system : lando
2019-03-14 17:50:11 +00:00
jawad
291f078f0d Bug 1533691 - Uncommented the code and removed TODO comment. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D22871

--HG--
extra : moz-landing-system : lando
2019-03-11 09:59:19 +00:00
Dão Gottwald
c66ffa7d21 Bug 1527946 - QuantumBar: Update the input value when cycling through results until no result is selected. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D22551

--HG--
extra : moz-landing-system : lando
2019-03-09 12:15:26 +00:00
Dão Gottwald
0f913a9f9c Bug 1524561 - Quantumbar: add accessibility semantics. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D22469

--HG--
extra : moz-landing-system : lando
2019-03-08 13:42:11 +00:00
Marco Bonardo
0d3d40fa97 Bug 1530987 - Popup notification don't re-appear when QuantumBar blurs. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D22513

--HG--
extra : moz-landing-system : lando
2019-03-07 22:37:24 +00:00
Mark Banner
08f7c345d9 Bug 1533366 - UrlbarInput's blur handling should respect ui.popup.disable_autohide preference. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D22500

--HG--
extra : moz-landing-system : lando
2019-03-07 14:10:40 +00:00
Marco Bonardo
b00e0e544b Bug 1531327 - Properly handle actions overrides in the Quantum Bar. r=dao
This fixes 2 problems causing overrides (with SHIFT/ALT/CTRL) to stick longer than expected:
1. The event bufferer may delay keydown, keyup could then happen before it
2. On some platforms holding a key generates multiple events, so there's no match in number of keydown/keyup

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

--HG--
extra : moz-landing-system : lando
2019-03-06 15:21:35 +00:00
Marco Bonardo
e2a36d3b96 Bug 1531787 - Fix browser_raceWithTabs.js with QuantumBar. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D22117

--HG--
extra : moz-landing-system : lando
2019-03-06 11:18:10 +00:00
Johann Hofmann
b4d5efa6f7 Bug 1525267 - Move auth prompt rate limiting to nsIAuthPrompt2.promptAuth. r=MattN
This also changes the name of 'canceledAuthenticationPromptCounter' to account for the
fact that we no longer count up when the prompt was cancelled, but when it was shown.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 15:24:19 +00:00
Marco Bonardo
69d74cca55 Bug 1523332 - Allow to instant switch on and off the Quantum Bar. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D20534

--HG--
extra : moz-landing-system : lando
2019-03-01 14:52:17 +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
Mark Banner
7b0ae41ca6 Bug 1522508 - When a WebExtension result is selected, the urlbar should be reverted. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D21003

--HG--
extra : moz-landing-system : lando
2019-02-28 09:25:07 +00:00
Boris Zbarsky
9c5da5f234 Bug 1489308 part 9. Remove now-unused wyciwyg bits. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17327

--HG--
rename : dom/html/test/browser_refresh_wyciwyg_url.js => dom/html/test/browser_refresh_after_document_write.js
rename : dom/html/test/file_refresh_wyciwyg_url.html => dom/html/test/file_refresh_after_document_write.html
extra : moz-landing-system : lando
2019-02-28 01:09:48 +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
Mark Banner
8a876b23c0 Bug 1530395 - Port bug 377496 to QuantumBar (Improve auth dialog blocking heuristics). r=dao
Differential Revision: https://phabricator.services.mozilla.com/D21024

--HG--
extra : moz-landing-system : lando
2019-02-25 17:31:00 +00:00
Marco Bonardo
a2833729ca Bug 1525035 - Handle IME composition in Quantum Bar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D20826

--HG--
extra : moz-landing-system : lando
2019-02-22 20:02:35 +00:00
Marco Bonardo
f6a6f8486a Bug 1524597 - Document what setValueFromResult does for extension results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D20671

--HG--
extra : moz-landing-system : lando
2019-02-21 23:16:07 +00:00
Dão Gottwald
a20377e47d Bug 1526597 - Canonization should be applied to all result types, and the input's value should reflect the canonized URL. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D20633

--HG--
extra : moz-landing-system : lando
2019-02-21 20:21:47 +00:00