Commit Graph

340 Commits

Author SHA1 Message Date
Norisz Fay
5caeaca8fe Backed out 2 changesets (bug 1928132) for causing failures on browser_mouseout_notification_panel.js and Bug 1934387, Bug 1934388, Bug 1934389 CLOSED TREE
Backed out changeset 2ea4986f9eb8 (bug 1928132)
Backed out changeset 4a72ad308d0c (bug 1928132)
2024-11-30 15:43:28 +02:00
Daisuke Akatsuka
38412e4cd1 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-11-29 21:24:53 +00:00
Goloman Adrian
2cd2737f6f Backed out 2 changesets (bug 1928132) for causing bc failures browser_popupNotification_2.js. CLOSED TREE
Backed out changeset 5882194e7456 (bug 1928132)
Backed out changeset 0d13b91f55e0 (bug 1928132)
2024-11-29 15:18:36 +02:00
Daisuke Akatsuka
c738c0eb32 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-11-29 11:18:02 +00:00
Manuel Bucher
53e7c24e8d Bug 1924493 - Copy without site tracking: Rename to "Copy Clean Link" r=anti-tracking-reviewers,fluent-reviewers,urlbar-reviewers,flod,dao,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D230251
2024-11-28 11:40:11 +00:00
Yazan Al Macki
579f372259 Bug 1923686 - Exit search mode for non app-provided search engines. r=jteow,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D229158
2024-11-20 01:17:09 +00:00
Florian Quèze
48a799d50d Bug 1927093 - Migrate scalars to use Glean APIs for contextual.services.topsites.*, r=chutten,urlbar-reviewers,jteow,Standard8,home-newtab-reviewers,thecount.
Differential Revision: https://phabricator.services.mozilla.com/D227815
2024-11-15 11:53:39 +00:00
Simon Friedberger
4fcd691190 Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 17:15:57 +00:00
Sandor Molnar
9e0c14a80e Backed out changeset c4dfee1f9194 (bug 1919544) for causing bc failures @ browser_UrlbarInput_formatValue.js CLOSED TREE 2024-11-13 15:20:39 +02:00
Simon Friedberger
8eafd874fe Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 11:44:43 +00:00
Daisuke Akatsuka
708d0195d5 Bug 1925532: Enter search mode without preview mode by key if there is single result r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D226865
2024-11-11 22:19:45 +00:00
Daisuke Akatsuka
c2f5c3753c Bug 1921731: Keep actions' layout until changing the results r=urlbar-reviewers,daleharvey,adw
Differential Revision: https://phabricator.services.mozilla.com/D226107
2024-11-11 05:44:29 +00:00
James Teow
935394d9f6 Bug 1927113 - Ensure persisted search doesn't show search mode from another tab - r=adw,urlbar-reviewers
this.searchMode can return null even if a search mode is shown
in the address bar, as the getter uses the current browser as the
context and attempts to use the state data. I try to solve this
by relying on the fact that a tab switch and invalid pageproxystate
results in restoring the search mode state.

Differential Revision: https://phabricator.services.mozilla.com/D228483
2024-11-08 23:04:24 +00:00
Marco Bonardo
f13efc6b93 Bug 1925496. r=jfkthame,adw
Differential Revision: https://phabricator.services.mozilla.com/D228315
2024-11-08 13:50:43 +00:00
Dale Harvey
d6bf7c5a2d Bug 1926241 - Provide tab-to-search results via actions. r=urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D227236
2024-11-08 13:35:12 +00:00
Alexandru Marc
e2fa59c2ee Backed out changeset 40518e514fc1 (bug 1925496) for causing bc failures @ browser_copying.js . CLOSED TREE 2024-11-08 14:51:02 +02:00
Marco Bonardo
4a15af511c Bug 1925496. r=jfkthame,adw
Differential Revision: https://phabricator.services.mozilla.com/D228315
2024-11-08 10:43:36 +00:00
Florian Quèze
e704e70b3b Bug 1927093 - Migrate scalars to use Glean APIs for urlbar.*, r=chutten,urlbar-reviewers,mak.
Differential Revision: https://phabricator.services.mozilla.com/D226513
2024-11-05 13:22:58 +00:00
Emilio Cobos Álvarez
a1ae05d74e Bug 1928255 - Fix bug 1927111 in a better way. r=urlbar-reviewers,mak
Keep using the static position as we did before. As long as we don't
have anchor positioning this seems better than whack-a-mole-ing every
possible urlbar position change.

In order to make the fullscreen animation work, make our position
computation ignore transforms, which is how anchor positioning would
behave anyways.

Differential Revision: https://phabricator.services.mozilla.com/D227758
2024-11-04 16:11:58 +00:00
Paul Zuehlcke
4922189f11 Bug 1927220 - Remove broken check for insert location in _initStripOnShare in UrlbarInput. r=urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D227480
2024-11-04 13:58:13 +00:00
Moritz Beier
4983a8b7fa Bug 1916499 - Add searchForm support back to OpenSearch engines. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D225968
2024-11-04 13:53:51 +00:00
Emilio Cobos Álvarez
303a90ea1b Bug 1928550 - Don't breakout on readonly urlbar. r=urlbar-reviewers,dao
This was a pre-existing issue that was only papered by chance.
this._toolbar is set before the early return for readonly urlbars, but
the ResizeObserver is only set up after it.

Be more explicit about when we allow breaking out of the container (and
effectively do it only for non-readonly urlbars).

Differential Revision: https://phabricator.services.mozilla.com/D227760
2024-11-04 10:11:07 +00:00
Alexandru Marc
5a5f7b93df Backed out 2 changesets (bug 1916505, bug 1916499) for causing bc failures @ browser_oneOffContextMenu.js
Backed out changeset dbd2ce7823c2 (bug 1916505)
Backed out changeset 5082d347bbf7 (bug 1916499)
2024-10-31 16:05:29 +02:00
Moritz Beier
36f3384408 Bug 1916499 - Add searchForm support back to OpenSearch engines. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D225968
2024-10-31 13:01:12 +00:00
Emilio Cobos Álvarez
6e6b254c42 Bug 1927111 - Shift urlbar during macOS fullscreen animation. r=Gijs,sfoster,urlbar-reviewers,mak
See comment for sadness.

Differential Revision: https://phabricator.services.mozilla.com/D226933
2024-10-30 13:09:46 +00:00
Emilio Cobos Álvarez
2b95871a34 Bug 1927111 - Don't rely on static position (top: auto) for urlbar position. r=Gijs,sfoster,desktop-theme-reviewers,urlbar-reviewers,mak
The static position of these boxes is not great to depend upon, see:

  https://github.com/w3c/csswg-drafts/issues/9939

Right now, we are relying on the static pos to be properly set which is
going to go away, eventually, and it is bogus, because it doesn't update
if e.g. only transform changes.

Use getBoxQuads to get the content box bounds properly. Also, make
breakout position: absolute explicitly, to prevent confusion.

Differential Revision: https://phabricator.services.mozilla.com/D226932
2024-10-30 13:09:46 +00:00
Butkovits Atila
2271d1135d Backed out changeset 6668994ba84c (bug 1925532) for causing failures at browser_ime_composition.js. CLOSED TREE 2024-10-30 06:45:52 +02:00
Daisuke Akatsuka
2aeaf78698 Bug 1925532: Enter search mode without preview mode by KEY_Tab, VK_RIGHT and VK_DOWN r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D226865
2024-10-30 02:58:57 +00:00
Butkovits Atila
f2d9be08fd Backed out 2 changesets (bug 1927111) for causing failures at browser_add_search_engine.js. CLOSED TREE
Backed out changeset b12f12db6d50 (bug 1927111)
Backed out changeset 8afe68ed6509 (bug 1927111)
2024-10-30 02:27:06 +02:00
Emilio Cobos Álvarez
826ab1afd3 Bug 1927111 - Shift urlbar during macOS fullscreen animation. r=Gijs,sfoster,urlbar-reviewers,mak
See comment for sadness.

Differential Revision: https://phabricator.services.mozilla.com/D226933
2024-10-29 22:03:22 +00:00
Emilio Cobos Álvarez
80dcdf14de Bug 1927111 - Don't rely on static position (top: auto) for urlbar position. r=Gijs,sfoster,desktop-theme-reviewers,urlbar-reviewers,mak
The static position of these boxes is not great to depend upon, see:

  https://github.com/w3c/csswg-drafts/issues/9939

Right now, we are relying on the static pos to be properly set which is
going to go away, eventually, and it is bogus, because it doesn't update
if e.g. only transform changes.

Use getBoxQuads to get the content box bounds properly. Also, make
breakout position: absolute explicitly, to prevent confusion.

Differential Revision: https://phabricator.services.mozilla.com/D226932
2024-10-29 22:03:22 +00:00
Marco Bonardo
631e8d05ce Bug 1912416 - Ctrl+Shift+Left in the Address Bar should not unselect all. r=urlbar-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D226684
2024-10-29 09:50:07 +00:00
Emilio Cobos Álvarez
4ea54f6e0f Bug 1921811 - Make URLBar a popover. r=emilio,desktop-theme-reviewers,tabbrowser-reviewers,sidebar-reviewers,urlbar-reviewers,dao,mak,dao?
* Fix various z-index/paint order issues by making the urlbar a popover - which moves the open
 urlbar to the top layer, outside the toolbox

* Adjust the urlbar position when the autohide menubar shows and hides

* Temporarily disable the browser_urlbar_keyed_search.js which needs revisiting to measure reflows under regular, non-test-specific conditions

Combines work from nsharpley and sfoster on top of emilio's original popover patch

Differential Revision: https://phabricator.services.mozilla.com/D224201
2024-10-21 23:39:16 +00:00
Dale Harvey
37dbf730f3 Bug 1922570 - Show global actions on seperate row from heuristic. r=daisuke,desktop-theme-reviewers,urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D225051
2024-10-21 19:36:57 +00:00
Norisz Fay
224773d44d Backed out changeset d4c4540a5a4a (bug 1921811) for causing bc failures on browser_urlbar_keyed_search.js CLOSED TREE 2024-10-21 15:10:55 +03:00
Emilio Cobos Álvarez
9fa478edc3 Bug 1921811 - Make URLBar a popover. r=emilio,desktop-theme-reviewers,tabbrowser-reviewers,sidebar-reviewers,urlbar-reviewers,dao,mak,dao?
* Fix various z-index/paint order issues by making the urlbar a popover - which moves the open
 urlbar to the top layer, outside the toolbox

* Adjust the urlbar position when the autohide menubar shows and hides

Combines work from nsharpley and sfoster on top of emilio's original popover patch

Differential Revision: https://phabricator.services.mozilla.com/D224201
2024-10-21 10:24:06 +00:00
Norisz Fay
9b743ec4a9 Backed out changeset 1de300781d3f (bug 1916499) for causing multiple search related failures CLOSED TREE 2024-10-18 22:17:36 +03:00
Moritz Beier
eedeed877c Bug 1916499 - Add searchForm support back to OpenSearch engines. r=Standard8,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225968
2024-10-18 13:46:52 +00:00
Dale Harvey
4a96f5ee84 Bug 1920032 - Hide the SearchModeSwitcher in readonly urlbars. r=dao,desktop-theme-reviewers,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224477
2024-10-11 20:10:59 +00:00
mcheang
6a815ad8e0 Bug 1919180 - Update scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer. r=mak,urlbar-reviewers
- `urlbar.searchmode.typed`: suffixed with "keyword" for restrict keyword entries and "symbol" for symbol entries.
- `urlbar.searchmode.keywordoffer`: suffixed with "keyword" for restrict keyword entries via keywordoffer.
- Example: History search mode scalar key is `history_keyword` for restrict keyword and `history_symbol` for symbol.

Differential Revision: https://phabricator.services.mozilla.com/D223210
2024-10-08 14:10:01 +00:00
James Teow
46c33defd6 Bug 1921092 - Simplify Persisted Search logic and make non-default engines consistent - r=adw,urlbar-reviewers
The main goal is to simplify the logic in setURI, and create a more easier to understand flow of operations.

It involves making Persisted Search more contained, offload some responsibilities to UrlbarSearchTermsPersistence, and store fewer state variables than the patch that was first reviewed. I also simplified code in UrlbarSearchTermsPersistence.

**How Search Terms Persist:**

**Step 1**

When the page first appears, set state for search terms persistence. First load doesn't necessarily mean no tab switch or same page load, as a user could load a browser in the background tab. In that latter case, the first "view" may occur on a tab switch and the state won't exist because `setURI` will never have been called with that browser object being selected.

Once the state has been set, the only property that could be updated is `shouldPersist`. Otherwise, don't update the state object unless a full new page load occurs.

**Step 2**

Call `shouldPersist`. This has all the logic for when search terms should persist and gets called anytime `setURI` is called.

The conditions in which we shouldn't persist:

- There's no reason to show search terms:
  - The persist state is missing.
  - There are no search terms extracted from the URL.
- We need to temporarily hide the search terms, such as by handleRevert
  - `hideSearchTerms` is provided to setURI
- There is an user typed value and it differs from the search terms
- A single page application moved to a secondary page
- After the initial page load, there's the search mode (or lack of search mode) differs from the persist engine.

**Step 3**

Determine if we need to update `this.window.gBrowser.userTypedValue`. If we're going to persist, set `userTypedValue` to the search terms, which will keep the search mode and non-search mode state consistent. This'll also enable the ability to reuse existing logic that determines how to set `value`.

On same page loads, when switching from persist to non-persist, and search term equals the userTypedValue, then `null` the userTypedValue so that the URL shows.

**Step 4**

In the area of setURI which has logic for search mode, if we persist, ensure the search mode (or lack of search mode) is consistent with the engine. If it is, do nothing. If it isn't, either nullify the search mode or enter search mode.

Differential Revision: https://phabricator.services.mozilla.com/D224520
2024-10-08 04:12:29 +00:00
Tamas Szentpeteri
217012b8ec Backed out changeset 737f799b6c6c (bug 1919180) for causing mochitest fails on browser_secondaryActions.js. CLOSED TREE 2024-10-04 04:40:15 +03:00
mcheang
8bf9314776 Bug 1919180 - Update scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer. r=mak,urlbar-reviewers
- `urlbar.searchmode.typed`: suffixed with "keyword" for restrict keyword entries and "symbol" for symbol entries.
- `urlbar.searchmode.keywordoffer`: suffixed with "keyword" for restrict keyword entries via keywordoffer.
- Example: History search mode scalar key is `history_keyword` for restrict keyword and `history_symbol` for symbol.

Differential Revision: https://phabricator.services.mozilla.com/D223210
2024-10-03 23:18:05 +00:00
Sandor Molnar
232317ebfc Backed out changeset 2fa695c28d67 (bug 1919180) for causing bc failures @ browser_searchMode_switchTabs.js CLOSED TREE 2024-10-03 01:47:33 +03:00
mcheang
d66595dcf8 Bug 1919180 - Update scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer. r=mak,urlbar-reviewers
- `urlbar.searchmode.typed`: suffixed with "keyword" for restrict keyword entries and "symbol" for symbol entries.
- `urlbar.searchmode.keywordoffer`: suffixed with "keyword" for restrict keyword entries via keywordoffer.
- Example: History search mode scalar key is `history_keyword` for restrict keyword and `history_symbol` for symbol.

Differential Revision: https://phabricator.services.mozilla.com/D223210
2024-10-02 19:01:01 +00:00
James Teow
d8061ef3e3 Bug 1903376 - Move searchTerms into UrlbarInput internal state - r=adw,urlbar-reviewers
The purpose of this change is to cache persist state into an object so that in future patches, I can add other persisted search related state to it.

Differential Revision: https://phabricator.services.mozilla.com/D224122
2024-10-01 19:33:54 +00:00
Dale Harvey
be347dbe5e Bug 1921323 - Add new pref to handle persistant search mode. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224055
2024-10-01 10:25:43 +00:00
Dale Harvey
522658f297 Bug 1918437 - Disable secondary actions based switch to tab. r=daisuke,desktop-theme-reviewers,urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D223704
2024-09-30 22:10:48 +00:00
James Teow
728cf35f79 Bug 1915273 - Allow revert button to always show until search terms change and fix keyboard focus - r=adw,desktop-theme-reviewers,urlbar-reviewers,dao
The main purpose of this patch is to make the visibility of the revert button consistent to make it more accessible. After talking with Josh, we agreed the revert icon should always show in an `invalid` pageproxystate until `userTypedValue` differs from the search string. Doing so will make the Revert button be more predictable for keyboard users instead of hiding it when the input field is focused and then showing it again when they press tab (or not making it focusable at all).

The Go button (the right arrow button) will show up again once the user has modified the search terms. I didn't think this would be much of an issue since the Go arrow is not focusable by keyboard, it's not visible when the address bar is not focused, and "Enter" is a well known shortcut to doing the same function.

This involved checking when `persistsearchterms` was changed to `false` and removing it to instead remove `persistsearchterms` when the search terms changed. This is reflected in the new expected behavior in the tests.

One issue was adding `focus` to the revert button via CSS caused focus issues. Tabbing from the left elements (reload button) to the input would skip the input altogether and go straight to the revert button and then to the Save to Pocket button. Pressing shift + tab to try and go back from the revert button to the input would get stuck in a loop between the input field and revert button. This was fixed with `<toolbartabstop/>` . I created a hideable container to ensure the tabstop only exists when the `persistsearchterms` state is active. And the new test checks that the tab behaviour is consistent.

Lastly, because keyboard users might press the Revert button, focusing the input seemed like a logical choice, or else when the focus is lost the user would need to tab all the way back to the input to do more actions. There is also an initiative to move inline Javascript out from markup.

Differential Revision: https://phabricator.services.mozilla.com/D223423
2024-09-25 22:07:11 +00:00
James Teow
2423c61e3e Bug 1920493 - Clear search mode in Persisted Search when loading a default SERP - r=adw,urlbar-reviewers
In the patch where I ensure the correct `searchMode` is added, I didn't consider the possibility a user could return to a default SERP. Thus, if there was a search mode chiclet, it should be cleared.

Differential Revision: https://phabricator.services.mozilla.com/D223141
2024-09-24 03:32:02 +00:00