Commit graph

967 commits

Author SHA1 Message Date
Harry Twyford
471136bfde Bug 1628065 - Split out UrlbarProviderTokenAliasEngines from UnifiedComplete. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D71663
2020-04-22 18:47:12 +00:00
Harry Twyford
2a06a6f3c9 Bug 1626946 - Remove search suggestions that dupe a search history result. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D71094
2020-04-22 17:41:00 +00:00
Marco Bonardo
1cf8ec89c1 Bug 1613276 - Visit data: URIs containing spaces rather than searching them. r=adw
Ignore whitespaces when tokenizing strings looking like data: urls.
Improve the tokenizer to better distinguish possible origins from text, by
using the domains whitelist.
Fix a regexp mistake uncovered by the test.

Differential Revision: https://phabricator.services.mozilla.com/D71791
2020-04-22 09:44:20 +00:00
Noemi Erli
c0bd1834c8 Backed out 19 changesets (bug 1602318) for causing multiple failures
Backed out changeset 4b3345b2e33b (bug 1602318)
Backed out changeset 7240b27afe28 (bug 1602318)
Backed out changeset a7091729d8c9 (bug 1602318)
Backed out changeset e496ab6c0857 (bug 1602318)
Backed out changeset 184da6309f0c (bug 1602318)
Backed out changeset 79b540f8619d (bug 1602318)
Backed out changeset b298015ee960 (bug 1602318)
Backed out changeset 6d0783cd5e01 (bug 1602318)
Backed out changeset cbc308486b17 (bug 1602318)
Backed out changeset 94142944fb54 (bug 1602318)
Backed out changeset 7c1eeb299b78 (bug 1602318)
Backed out changeset 0fc27502503a (bug 1602318)
Backed out changeset 0fc27c2e09d9 (bug 1602318)
Backed out changeset b5e2aa4741b2 (bug 1602318)
Backed out changeset 57d568114c5a (bug 1602318)
Backed out changeset 8f7360d827dc (bug 1602318)
Backed out changeset 78930a97c2df (bug 1602318)
Backed out changeset 8015780587cd (bug 1602318)
Backed out changeset bc9da03cb3a3 (bug 1602318)
2020-04-21 03:46:41 +03:00
Matt Woodrow
11a6a14a87 Bug 1602318 - Make some browser tests wait on the test uri to load instead of any uri. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70624
2020-04-20 23:01:44 +00:00
Marco Bonardo
45a8a38b0b Bug 1080682 - Use the Public Suffix List to distinguish foo.bar searches in URIFixup (and consequently the Address Bar). r=Gijs,dao
Use the PSL list to evaluate whether user typed strings in urlbar are valid URLs.
Cleanup the URIFixupInfo.fixupChangedProtocol property to be set appropriately.
Auto-correct the most common suffix typos for com, net, org.

Stop using URIFixup to trim urls when the urlbar value is set, instead always trim,
then untrim on focus if the trimmed string would cause, on navigation, a search
instead of a visit. This saves us from doing the URIfixup work on page load and
tab switch, running it only when strictly necessary.

Fix the "Did you mean to go to" prompt to show a protocol, avoiding the
confusing (but funny) "did you mean to go to 'space'" prompts.

Differential Revision: https://phabricator.services.mozilla.com/D68796
2020-04-20 12:39:08 +00:00
Marco Bonardo
5a7c296d45 Bug 1630996 - Adjust urlbar tokenizer mail regexp. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D71345
2020-04-17 19:00:25 +00:00
Drew Willcoxon
f1a03db7a8 Bug 1618769 - Follow up: Remove unnecessary assignment to allowSearchSuggestions. r=mak
I didn't remove the `allowSearchSuggestions` assignment even though it's not necessary due to the `defaultValue` addition. And I already queued the main patch for landing.

Differential Revision: https://phabricator.services.mozilla.com/D71249
2020-04-17 07:45:55 +00:00
Marco Bonardo
6d1242bea3 Bug 1628288. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D71191
2020-04-17 09:59:23 +00:00
Ciure Andrei
3593787658 Backed out changeset 894ebe92bdae (bug 1628052) for causing failure increase in bug 1358898 CLOSED TREE 2020-04-17 07:20:16 +03:00
Drew Willcoxon
eeeeea2f96 Bug 1618769 - Increase max chars for search suggestions, and don't fetch suggestions at all when max is reached due to paste. r=mak
* Add a new `allowSearchSuggestions` property to the query context. It defaults to true.
* `UrlbarInput` sets this property when it starts a query. If the event that started the query is a paste event and the pasted string's length is larger than maxChars, then don't allow suggestions. Otherwise do.
* `UrlbarProviderSearchSuggestions.isActive` returns false when `!context.allowSearchSuggestions`.
* `UrlbarProviderSearchSuggestions` doesn't truncate the query anymore.
* Keep the `browser.urlbar.maxCharsForSearchSuggestions` pref but use it only for pastes, and increase it from 20 to 100. I considered making a new pref but this way if a user changed it, then it still applies to pastes at least. I'm not sure it's important though.

Differential Revision: https://phabricator.services.mozilla.com/D70956
2020-04-17 00:42:23 +00:00
Marco Bonardo
fb0662edda Bug 1628906 - First search in a tab from location bar could trigger an "Invalid URL" error page. r=Gijs,nika,mattwoodrow
Before 1496578, URIFixup::keywordToURI used to do a synchronous IPC call to be
able to access search engines from the content process. Consumers of URIFixup
didn't care. Bug 1496578 moved the IPC messaging to the callers, in particular
nsDocShell, but assumed nsDocShellLoadState wasn't loading from content.
It looks like in some cases it does, so this adds another sync IPC call for
GetFixupURIInfo.
The total numer of sync IPCs should not change from before Bug 1496578, URIFIxup
was just doing it internally, while now it happens at the call point.
Note the long term plan would be for these docshell objects callers to just
handle URIs, while the UI code should do fixup.
Bug 1375244 tracks the removal of these sync IPC messages.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 22:39:38 +00:00
Drew Willcoxon
a6b80b0e24 Bug 1628926 - Remove the browser.urlbar.oneOffSearches pref. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D70921

--HG--
extra : moz-landing-system : lando
2020-04-16 00:00:55 +00:00
Arthur Iakab
3f105ec0c5 Backed out changeset 0c8a5b5094b6 (bug 1628926) for Eslint failure on UrlbarView.jsm
CLOSED TREE
2020-04-16 01:38:49 +03:00
Drew Willcoxon
1736e700e0 Bug 1628926 - Remove the browser.urlbar.oneOffSearches pref. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D70921

--HG--
extra : moz-landing-system : lando
2020-04-15 08:56:16 +00:00
Emilio Cobos Álvarez
a2c02d9e75 Bug 1627520 - Use keydown instead of keypress for autocomplete event listeners. r=mak,Gijs
This is so that we can avoid needing mozSystemGroup (to get keypress for
non-printable keys), which in turn prevents racing with the native key event
listeners, see the second patch in bug 1624657.

This turned out to be a bit tricky, because we need to guarantee the ordering of
the search one-offs handling in the searchbar with the usual autocomplete-input
handling. We could try to move this to the popup subclass but this is already a
bigger patch than what I'd like.

We can also revert the customElements.js change I did in bug 1624657, as the bug
is no longer relevant.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 20:48:26 +00:00
Harry Twyford
29d7ff69e0 Bug 1629137 - Respect ui.popup.disable_autohide in UrlbarView._on_blur. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D70934

--HG--
extra : moz-landing-system : lando
2020-04-14 20:40:32 +00:00
Harry Twyford
ca762ba039 Bug 1623637 - Part 6 - Port part of search_suggestions_aliases.js. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D69701

--HG--
rename : toolkit/components/places/tests/unifiedcomplete/test_search_engine_alias.js => browser/components/urlbar/tests/unit/test_search_suggestions_aliases.js
extra : moz-landing-system : lando
2020-04-07 20:30:33 +00:00
Harry Twyford
a39a136567 Bug 1623637 - Part 5 - Port test_search_suggestions.js. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D69700

--HG--
rename : toolkit/components/places/tests/unifiedcomplete/test_search_suggestions.js => browser/components/urlbar/tests/unit/test_search_suggestions.js
extra : moz-landing-system : lando
2020-04-07 20:30:25 +00:00
Harry Twyford
8ddc4cb7da Bug 1623637 - Part 3 - Remove suggestions code from UnifiedComplete and enable UrlbarProviderSearchSuggestions. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D69698

--HG--
extra : moz-landing-system : lando
2020-04-07 19:35:26 +00:00
Harry Twyford
ac0782869f Bug 1623637 - Part 2 - Add UrlbarProviderSearchSuggestions.jsm. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D69697

--HG--
extra : moz-landing-system : lando
2020-04-14 14:08:40 +00:00
Harry Twyford
fb56446809 Bug 1627378 - Rename gURLBar.value getter missed in bug 1528593. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D70692

--HG--
extra : moz-landing-system : lando
2020-04-14 14:46:02 +00:00
Bogdan Tara
52f29c9810 Backed out changeset b92904ec121f (bug 1627520) for browser_searchbar_keyboard_navigation.js failures CLOSED TREE 2020-04-14 16:58:35 +03:00
Emilio Cobos Álvarez
d547edb535 Bug 1627520 - Use keydown instead of keypress for autocomplete event listeners. r=mak,Gijs
This is so that we can avoid needing mozSystemGroup (to get keypress for
non-printable keys), which in turn prevents racing with the native key event
listeners, see the second patch in bug 1624657.

This turned out to be a bit tricky, because we need to guarantee the ordering of
the search one-offs handling in the searchbar with the usual autocomplete-input
handling. We could try to move this to the popup subclass but this is already a
bigger patch than what I'd like.

We can also revert the customElements.js change I did in bug 1624657, as the bug
is no longer relevant.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 12:42:16 +00:00
Andrew McCreight
a4bbbb0889 Bug 1628052 - Remove uses of dom.ipc.keepProcessesAlive.webIsolated.perOrigin to fix leaks. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70076

--HG--
extra : moz-landing-system : lando
2020-04-13 20:11:50 +00:00
Dão Gottwald
579bafbb86 Bug 1627988 - Remove the browser.urlbar.update1.view.stripHttps pref. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D70208

--HG--
extra : moz-landing-system : lando
2020-04-09 13:54:19 +00:00
Dão Gottwald
3b8b1171af Bug 1627969 - Remove the megabar pref. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D70023

--HG--
extra : moz-landing-system : lando
2020-04-08 19:04:24 +00:00
Michal Novotny
2a483b2bc4 Bug 1622409 - Put FTP code behind a pref r=marionette-reviewers,valentin,whimboo,mixedpuppy
Disables FTP protocol handler on nightly. FTP scheme is handled by external protocol handler if it isn't explicitly disabled with preference network.protocol-handler.external.ftp = false.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 19:49:26 +00:00
Marco Bonardo
758aa4f647 Bug 1496578 - convert nsDefaultURIFixup to URIFixup.jsm. r=Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D66579

--HG--
extra : moz-landing-system : lando
2020-04-08 11:30:14 +00:00
Razvan Maries
3b66f5f729 Backed out changeset b86e8f2cc5db (bug 1496578) for build bustages on nsDocShell.cpp. CLOSED TREE 2020-04-08 01:16:33 +03:00
Marco Bonardo
7457a384f2 Bug 1496578 - convert nsDefaultURIFixup to URIFixup.jsm. r=Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D66579

--HG--
extra : moz-landing-system : lando
2020-04-07 21:55:24 +00:00
Razvan Maries
08e433da85 Backed out changeset 8748e324ef44 (bug 1623888) for perma failures on browser_UrlbarInput_overflow.js. CLOSED TREE 2020-04-08 00:06:41 +03:00
Marco Bonardo
7739949897 Bug 1623888. r=Gijs,Itiel
Differential Revision: https://phabricator.services.mozilla.com/D67817

--HG--
extra : moz-landing-system : lando
2020-04-07 19:48:58 +00:00
Harry Twyford
788b61dbd9 Bug 1606924 - Remove unused urlbar WebExtension APIs. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D69820

--HG--
extra : moz-landing-system : lando
2020-04-07 04:43:47 +00:00
Mark Banner
bb413bca06 Bug 1590803 - Clean up uses of SearchService.getDefaultEngines where we can now use engine.isAppProvided. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D69235

--HG--
extra : moz-landing-system : lando
2020-04-03 11:36:35 +00:00
Henri Sivonen
3b815d9201 Bug 1618539 - Remove content-process use of nsIFocusManager::GetActiveWindow. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D66416

--HG--
extra : moz-landing-system : lando
2020-04-01 12:01:51 +00:00
Harry Twyford
17cb1990bd Bug 1625241 - Show the UPDATE_ASK intervention if an update is still downloading or staging. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D68884

--HG--
extra : moz-landing-system : lando
2020-03-31 13:57:35 +00:00
Harry Twyford
70b99b17f1 Bug 1623978 - Disable Search Tips on secondary location changes. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D68067

--HG--
extra : moz-landing-system : lando
2020-03-31 13:56:34 +00:00
Drew Willcoxon
5739954280 Bug 1616752 - Part 2: Add payload schemas for each result type and validate payloads against them. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D64300

--HG--
extra : moz-landing-system : lando
2020-03-26 15:27:12 +00:00
Harry Twyford
b5ec718191 Bug 1624704 - Part 1 - Remove UrlbarUtils.INSERTMETHOD. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D68098

--HG--
extra : moz-landing-system : lando
2020-03-25 17:09:59 +00:00
Harry Twyford
cf0cd77ad8 Bug 1624044 - Wait for SessionStartup initialization before using it in willCheckDefaultBrowser. r=dao
The sessionType getter in SessionStartup sets its internal state if there isn't already one. Since the willCheckDefaultBrowser call added in bug 1622195 happens very early, SessionStartup isn't initialized yet so its state is set to "never restore".

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

--HG--
extra : moz-landing-system : lando
2020-03-24 16:36:00 +00:00
Drew Willcoxon
224829a029 Bug 1621944 - Try-catch all provider calls. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D67582

--HG--
extra : moz-landing-system : lando
2020-03-20 20:00:41 +00:00
Drew Willcoxon
ad7476596e Bug 1621944 - Make the top sites provider not assume the activity stream top sites pref exists. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D67581

--HG--
extra : moz-landing-system : lando
2020-03-20 20:00:41 +00:00
Bogdan Tara
69ff22a78e Backed out changeset e50cbce87f8d (bug 1618539) for nsFocusManager related crashes CLOSED TREE 2020-03-20 11:25:11 +02:00
Henri Sivonen
287ee18258 Bug 1618539 - Remove content-process use of nsIFocusManager::GetActiveWindow. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D66416

--HG--
extra : moz-landing-system : lando
2020-03-20 08:25:58 +00:00
Dão Gottwald
80fb089287 Bug 1623673 - Make gKeywordURIFixup a good browser.js citizen. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D67508

--HG--
extra : moz-landing-system : lando
2020-03-20 07:45:26 +00:00
Harry Twyford
8f23aa3e2a Bug 1622195 - Disable Search Tips if the default browser prompt will be shown. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D67034

--HG--
extra : moz-landing-system : lando
2020-03-18 21:47:17 +00:00
Dão Gottwald
cc14b6fe44 Bug 1610478 - Make UrlbarInput's use of gKeywordURIFixup optional. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D67345

--HG--
extra : moz-landing-system : lando
2020-03-19 11:04:34 +00:00
Sylvestre Ledru
be18fd4dba Bug 1622328 - add license info to all eslintrc files r=Standard8,webcompat-reviewers,miketaylr
Differential Revision: https://phabricator.services.mozilla.com/D67319

--HG--
extra : moz-landing-system : lando
2020-03-19 13:47:51 +00:00
Masatoshi Kimura
3df19bc1d4 Bug 1623222 - Remove the charset parameter from nsITextToSubURI::UnEscapeURIForUI. r=hsivonen
Only 3 callers are using a non-UTF-8 charset as the first parameter.
* MediaDocument.cpp: This does not make sense because the "filename" part of
  URLs will always be encoded with UTF-8.
* nsContextMenu.js: This is wrong because "mailto:" URLs don't care about the
  document charset.
* Finder.jsm: This caused bug 1623222.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 10:45:28 +00:00