Commit Graph

321 Commits

Author SHA1 Message Date
Marco Bonardo
afba2eac66 Bug 1909676 - Switching to a tab whose urlbar was cleared restores the URL but doesn't select it. r=jteow,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D217595
2024-07-25 08:28:27 +00:00
Karandeep
b207f35b42 Bug 1903633 - Integrate the UrlbarSearchTermsPersistence component with remote setting. r=jteow,firefox-desktop-core-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D215777
2024-07-23 12:14:44 +00:00
mcheang
934e5f7581 Bug 1902537 - Create UrlbarProviderRestrictKeywords to show localized bookmarks, history, and tabs restrict keywords results. r=mak,settings-reviewers,urlbar-reviewers
This patch includes:
- A new UrlbarProviderRestrictKeywords class
- Showing localized Search with Bookmarks, Search with History, Search with Tabs results after the user types @
- Add search restrict keywords to preferences UI Search Shortcuts table
- Hiding search restrict keyword behind browser.urlbar.searchRestrictKeywords.featureGate pref

Differential Revision: https://phabricator.services.mozilla.com/D213697
2024-07-19 23:45:58 +00:00
Dale Harvey
0c3d03e94d Bug 1905510 - Ensure SearchModeSwitcher popup opens in correct window. r=urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D215311
2024-07-19 21:43:39 +00:00
Marco Bonardo
164db06ff2 Bug 1903266 - Copied URL from loading new tab does not include scheme. r=jteow,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D216917
2024-07-19 12:29:09 +00:00
DJ
519ee01824 Bug 1876558 - deactivate tab preview when urlbar receives input. r=tabbrowser-reviewers,dao,urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D214870
2024-07-17 20:37:36 +00:00
Marco Bonardo
c5372e4d26 Bug 1902237 - Enable untrimOnUserInteraction and trimHttps with ScotchBonnet. r=daleharvey
This leaves out `security.insecure_connection_text.enabled` and
`security.insecure_connection_text.pbmode.enabled`, that should also be part of
ScotchBonnet, but are managed by a different component.

Differential Revision: https://phabricator.services.mozilla.com/D216181
2024-07-17 09:34:48 +00:00
Marco Bonardo
c4bdac3b58 Bug 1906110 - Address bar content shifts when focusing on mousedown. r=jteow,desktop-theme-reviewers,urlbar-reviewers,dao
Shifting the input field position on mousedown can easily cause unwanted text
selection. We can avoid that by delaying pageproxystate change to mouseup, and
using an attribute to postpone other display changes.

Differential Revision: https://phabricator.services.mozilla.com/D215930
2024-07-17 09:31:36 +00:00
Stanca Serban
832439e884 Backed out changeset eec38ebb419b (bug 1876558) for causing mochitests failures in browser_tab_preview.js. CLOSED TREE 2024-07-12 21:57:33 +03:00
DJ
8325a8a7aa Bug 1876558 - deactivate tab preview when urlbar receives input. r=tabbrowser-reviewers,dao,urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D214870
2024-07-12 17:01:23 +00:00
Marco Bonardo
6ee1266afe Bug 1904829 - Don't handle repeated keydown in urlbar handler. r=urlbar-reviewers,dao
Avoid handling repeated keydown events in the urlbar handler as they are not
necessary and confuse our bookkeeping.

Differential Revision: https://phabricator.services.mozilla.com/D215918
2024-07-09 09:32:49 +00:00
James Teow
fa3b3d1fea Bug 1905100 - Remove Persisted Search Tip - r=adw,urlbar-reviewers
The onboarding will be handled by OMC who will help with the
messaging for all the scotch bonnet features.

Differential Revision: https://phabricator.services.mozilla.com/D215234
2024-07-01 23:45:47 +00:00
Dale Harvey
35e363801a Bug 1893067 - Add actions key to glean urlbar metrics. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D214763
2024-06-29 21:50:46 +00:00
Dale Harvey
8f27c5fa6e Bug 1903146 - Remove experiment.searchButton pref. r=urlbar-reviewers,dao,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D214671
2024-06-27 10:26:09 +00:00
Marco Bonardo
c33e249b2b Bug 1892934 - Domain highlighting doesn't work when detaching tabs. r=jteow
There's a timing issue where sometimes formatting happens too early on new
windows opening, so we await for the next RAF to happen.
Note there's already a test in browser_UrlbarInput_formatValue_detachedTab.js
covering this, and it's indeed failing intermittently, this may fix it.

The patch also avoids trimming when active mixed content may show a strikeout
https protocol. This is an uncommon state anyway because we block active mixed
content, and in the future we'll rely on the insecure label.

Differential Revision: https://phabricator.services.mozilla.com/D212906
2024-06-19 11:17:27 +00:00
Marco Bonardo
317e2fd13f Bug 1896128 - Pressing Home on trimmed urlbar value should put cursor at 0. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D212790
2024-06-13 14:55:52 +00:00
Dale Harvey
3a3707ff44 Bug 1891863 - Implement initial prototype of dedicated search button. r=dao,fluent-reviewers,desktop-theme-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D209469
2024-06-12 13:14:14 +00:00
Marco Bonardo
88146e4c15 Bug 1897109 - Urlbar tests should run also with trimHttps enabled. r=jteow
Note this patch changes the urlbar behavior regarding the value put into the
input when a result is selected with the keyboard. We won't trim the value
anymore in most cases.
Trimming makes too easy for the user to transform https into http, and
in general it makes harder to predict the result after editing or copying from
the urlbar after selecting a result.
This resembles the behavior of other mainstream browsers.
The only special case where we still trim the value, is when we add http to a
schemeless user typed value, as we may be using https first, then showing
http would be confusing. Though if trimming the url may transform it into a
search, we still don't trim and accept showing a potentially confusing protocol.

Differential Revision: https://phabricator.services.mozilla.com/D212465
2024-06-11 08:06:43 +00:00
Karandeep
b706203c2c Bug 1898437 - Fix TypeError on re-submitting a search link by ensuring details.result is defined. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D212111
2024-06-07 12:04:02 +00:00
Dão Gottwald
86f5d1f8d0 Bug 1900575 - Make focused a proper boolean attribute. r=desktop-theme-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D212544
2024-06-04 17:34:07 +00:00
Moritz Beier
0dcee9a58f Bug 1610530 - Use classes instead of ids to access urlbar elements from UrlbarInput. r=dao,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D212095
2024-06-04 12:58:52 +00:00
Moritz Beier
9c75a90b88 Bug 1893228 - Move address bar expandos set on browsers to the #browserStates WeakMap. r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D211574
2024-05-31 16:04:16 +00:00
Dale Harvey
7cf2ed740f Bug 1893069 - Add 'browser.urlbar.scotchBonnet.enableOverride' pref. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D210374
2024-05-27 21:56:56 +00:00
Marco Bonardo
0c2c9b1bab Bug 1893871 - When untrimming the URL adjust partial selection depending on whether the selected text is a valid URL. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D210027
2024-05-14 11:33:57 +00:00
Leeya
281cc0f354 Bug 1742889 - Rewrite consumers of whereToOpenLink to use BrowserUtils.whereToOpenLink. r=Gijs,search-reviewers,places-reviewers,firefox-desktop-core-reviewers ,home-newtab-reviewers,reusable-components-reviewers,hjones,nbarrett
Differential Revision: https://phabricator.services.mozilla.com/D208680
2024-05-08 14:33:17 +00:00
Abhishek Madan
310bd3f288 Bug 1884535 - Added error catching for Strip on Share.r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D209292
2024-05-06 19:11:26 +00:00
Stanca Serban
abbf8b4412 Backed out changeset ede7a0b15af0 (bug 1742889) for causing node tests failures. CLOSED TREE 2024-05-03 23:12:24 +03:00
Leeya
23b26e9421 Bug 1742889 - Rewrite consumers of whereToOpenLink to use BrowserUtils.whereToOpenLink. r=Gijs,search-reviewers,places-reviewers,firefox-desktop-core-reviewers ,home-newtab-reviewers,reusable-components-reviewers,hjones,nbarrett
Differential Revision: https://phabricator.services.mozilla.com/D208680
2024-05-03 19:05:59 +00:00
Marco Bonardo
6e1c1d304a Bug 1848715 - Untrim address bar value on user interaction. r=dao,tabbrowser-reviewers
Untrim the address bar value when the user starts manipulating it.
This doesn't untrim on focus, because that would break double-click to select
word, and drag-select. In the future we'll evaluate untrim on focus, but we'll
need additional platform support to replicate that functionality.
The behavior is currently controlled by the feature-gate preference
`browser.urlbar.untrimOnUserInteraction.featureGate`.

Original patch by Marc Seibert.

Differential Revision: https://phabricator.services.mozilla.com/D206135
2024-04-24 17:01:48 +00:00
Dale Harvey
5f9ad2e51c Bug 1871206 - Implement secondary actions for the urlbar. r=mak,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203381
2024-04-23 11:33:33 +00:00
Drew Willcoxon
ea5c333253 Bug 1892732 - Fix the urlbar help command for results that don't define a help URL. r=daleharvey
When UrlbarView [handles the help command for a result](https://searchfox.org/mozilla-central/rev/863aef60f9fa1536884252ad90cad1d8ee9d8a41/browser/components/urlbar/UrlbarView.sys.mjs#3471-3476), first it determines the
result's help URL. If `result.payload.helpUrl` is defined it uses that, and
otherwise it falls back to generating a default help URL. Either way, then it
sets `menuitem.dataset.url` to the help URL and calls `input.pickResult()`.

Before bug 1883378, `pickResult()` would similarly first check
`result.payload.helpUrl` and then fall back to `menuitem.dataset.url` when
determining the help URL to load. Bug 1883378 changed this behavior so that it
only checks `result.payload.helpUrl`. That means we break any provider that
implements the help command but doesn't define a help URL on its results, like
Yelp and MDN.

One way to fix this would be to make sure providers that implement the help
command always define a help URL on their results. I don't like that idea
because it's nice for providers to be able to rely on a default help URL that's
defined elsewhere.

Another fix would be to always use `menuitem.dataset.url` in `pickResult()` and
don't check `result.payload.helpUrl` at all. That would work for result menu
items, but it wouldn't work for other elements like buttons that don't go
through the result-menu-command path. I don't know if we currently have any such
paths but I don't want to break something else.

So instead I think we should just go back to the status quo before bug 1883378:
First check `result.payload.helpUrl` if the command is help, and then fall back
to `menuitem.dataset.url`.

Differential Revision: https://phabricator.services.mozilla.com/D208197
2024-04-22 23:51:24 +00:00
Marco Bonardo
ba6b343c0c Bug 1889894 - Change UlrbarInput::_setValue options to an object. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D206767
2024-04-08 14:52:51 +00:00
Dale Harvey
3394af4940 Bug 1886140 - Fix undefined queryContext in paste-and-go. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D206202
2024-04-07 17:32:02 +00:00
Emilio Cobos Álvarez
9eb098cd7c Bug 1889463 - Prevent flickering with the previous patch. r=dao,desktop-theme-reviewers
The toolbar height includes the top border now. It's not what we want
anyways:

 * In some cases its usage was completely redundant (we can use the
   default static position).

 * In other cases what we want is the urlbar-container height, which
   doesn't include that border. I confirmed this looks good in compact
   mode (which was the reason for introducing this in bug 1580248).

So simplify the code a tiny bit and fix the flickering that got the
original version reverted.

Differential Revision: https://phabricator.services.mozilla.com/D206596
2024-04-04 10:21:27 +00:00
Karandeep
9af5d8493e Bug 1880498 - Modify the abandonment event, to also happen in case of a switch tab. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202238
2024-03-13 14:08:06 +00:00
Mark Banner
afdbce2ec3 Bug 1884623 - Update more jsm references in production code and docs in browser/. r=mossop,extension-reviewers,omc-reviewers,migration-reviewers,robwu,mconley,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D204182
2024-03-11 15:26:28 +00:00
Marco Bonardo
36ad633e1e Bug 1883845 - Switch to tab entries in Top Sites (zero prefix) don't support cross container search. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D203730
2024-03-09 12:05:44 +00:00
Dale Harvey
c23a69bf50 Bug 1883378 - Dont record pressing help menu item as a search. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D203535
2024-03-06 23:49:29 +00:00
Dave Townsend
98ed146e46 Bug 1864896: Autofix unused function arguments (browser/components/urlbar). r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202954
2024-03-03 09:09:09 +00:00
Marco Bonardo
adbeacbb4a Bug 1880069 - Switch-to-tab result sometimes appears twice with wrong container. r=jteow
The InputHistory (adaptive) provider is not properly reporting the open tab
userContextId, thus the Muxer is unable to dedupe results properly.
This cleans up the query a little bit avoiding numeric indices and fields that
are unused later.

Differential Revision: https://phabricator.services.mozilla.com/D203012
2024-03-01 12:23:49 +00:00
Daisuke Akatsuka
25ace7ed62 Bug 1882677: Change 'Learn more' menu to 'Manage' for weather suggestion r=adw,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D203075
2024-03-01 04:18:35 +00:00
Marco Bonardo
f0bd48ca5b Bug 1876743 - Enable cross-container Tab Search in Nightly. r=mseibert
Fixes code to properly run tests with the feature enabled.
Fixes code not considering payload.userContextId is set to -1 for private
windows.
Fixes a bug in the _openTabs Map where multiple open tabs to the same url are
not properly counted.

Differential Revision: https://phabricator.services.mozilla.com/D200036
2024-02-07 09:29:32 +00:00
Marc Seibert
485a2c91f5 Bug 1855717 - Copy also from hidden results.r=adw
Differential Revision: https://phabricator.services.mozilla.com/D198240
2024-01-29 18:28:32 +00:00
Dale Harvey
a6bc2baf74 Bug 1841762 - Ensure onEngagement has queryContext defined. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D197265
2024-01-18 17:52:58 +00:00
Mark Banner
e2e80f646d Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in system modules. r=Gijs,perftest-reviewers,necko-reviewers,extension-reviewers,application-update-reviewers,fxview-reviewers,sync-reviewers,sessionstore-reviewers,reusable-components-reviewers,rpl,jesup,hjones,kshampur,skhamis,nalexander,sclements
Differential Revision: https://phabricator.services.mozilla.com/D197489
2024-01-05 09:22:34 +00:00
Daisuke Akatsuka
19a1b03db3 Bug 1853044: Open page with edited value by user regardless of selected result r=adw
Differential Revision: https://phabricator.services.mozilla.com/D196908
2023-12-25 01:19:25 +00:00
Mark Banner
86b8e0fb97 Bug 1868749 - Remove search engine send attribution request. r=search-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D195758
2023-12-18 12:01:34 +00:00
Marco Bonardo
fe296cb095 Bug 1863797 - Frequent failures in browser_schemeless.js due to UrlbarView.selectedElement removed from DOM. r=adw
#selectedElement may end up pointing to disconnected nodes. And so the public
.selectedElement getter.
This is how it was happening: a first call to onQueryResults adds and selects a
heuristic result. Then a second call to onQueryResults brings a new heuristic
result that requires new content (not compatible with the previous one), so the
old heuristic is emptied out, and new DOM is generated.
Because the code in onQueryResults relies on .selectedElement, at the second
invokation it thinks the selection is still valid, and doesn't select the new
heuristic. In reality .selectedElement at that time is pointing to a removed
DOM node.
The patch introduces a #rawSelectedElement and converts #selectedElement
into a getter.

Plus some minor logging improvements, and removing unused #mainContainer property.

Differential Revision: https://phabricator.services.mozilla.com/D195779
2023-12-13 10:05:26 +00:00
Benjamin VanderSloot
24f33e0e84 Bug 1525943 - Show identity section for web controlled about:blank. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D193804
2023-11-30 18:32:48 +00:00
Dale Harvey
5c52093b54 Bug 1797488 - Ensure switchtotab loads URL in a tab if record is missing. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D194170
2023-11-28 06:33:56 +00:00