Commit Graph

134 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
f77a04e463 Bug 1890397 - Rework tab preview panel to make it not part of the shadow dom. r=desktop-theme-reviewers,tabbrowser-reviewers,dao,emilio
This moves the panel to the light dom so that it works like every other
panel, but it seems simpler in general too?

Differential Revision: https://phabricator.services.mozilla.com/D207133
2024-04-10 21:07:55 +00:00
Yi Xiong Wong
3df27d805a Bug 1880914 - Move BrowserOpenTab. r=Gijs,webdriver-reviewers,perftest-reviewers,extension-reviewers,sessionstore-reviewers,tabbrowser-reviewers,home-newtab-reviewers,thecount,whimboo,dao,afinder,omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D205529
2024-04-03 10:32:27 +00:00
DJ
62f42b2cb2 Bug 1878920 - disable preview when dragging a tab. r=tabbrowser-reviewers,desktop-theme-reviewers,cmkm,mak
Differential Revision: https://phabricator.services.mozilla.com/D205383
2024-03-27 19:30:24 +00:00
Dave Townsend
ab57b0fdc1 Bug 1864896: Autofix unused function arguments (browser/base/content). r=Gijs,application-update-reviewers,tabbrowser-reviewers,places-reviewers,bytesized,dao
Differential Revision: https://phabricator.services.mozilla.com/D202949
2024-03-19 14:59:20 +00:00
DJ
f1b0f4af8b Bug 1876522 - only reset tab preview delay when cursor leaves tabstrip. r=tabbrowser-reviewers,dao
[D201245](https://phabricator.services.mozilla.com/D201245) was having some merge/test issues so I decided to re-implement cleanly from central. This version has a little less indirection which I think is better overall.

Differential Revision: https://phabricator.services.mozilla.com/D204655
2024-03-18 14:59:14 +00:00
Dave Townsend
c7ba305f4a Bug 1882099: Only call _mouseenter and _mouseleave when entering or leaving the tab. r=tabbrowser-reviewers,dao
It's not clear that there is any user-visible bug here but it is causing unnecessary work and can
cause debugging to be harder than it needs to be.

Differential Revision: https://phabricator.services.mozilla.com/D202790
2024-02-27 19:35:54 +00:00
Natalia Csoregi
75ef6626fd Backed out changeset aa5fc411278d (bug 1876522) for causing failures on browser_tab_tooltips.js. CLOSED TREE 2024-02-15 08:45:45 +02:00
DJ
e0cfa36946 Bug 1876522 - only reset tab hover delay when mouse leaves tabstrip. r=tabbrowser-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D201245
2024-02-15 04:49:59 +00:00
stransky
7a216bc331 Bug 1539998 [Linux] Don't open new tab if widget.gtk.titlebar-action-middle-click-enabled is set r=emilio,tabbrowser-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D199881
2024-01-30 20:18:13 +00:00
DJ
ca9f42a177 Bug 1783521 - add card preview when inactive tab hovered. r=settings-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,fluent-reviewers,flod,dao,mconley
Differential Revision: https://phabricator.services.mozilla.com/D184260
2024-01-12 19:29:18 +00:00
Narcis Beleuzu
2028d562b3 Backed out changeset fe2ffeac3ec2 (bug 1783521) for marionette failure on test_restore_manually.py . CLOSED TREE 2023-12-20 21:20:39 +02:00
DJ
681d1ba324 Bug 1783521 - add card preview when inactive tab hovered. r=settings-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,fluent-reviewers,flod,dao,mconley
Differential Revision: https://phabricator.services.mozilla.com/D184260
2023-12-20 15:56:51 +00:00
Iulian Moraru
dc6135c698 Backed out changeset 5f5354d30a45 (bug 1783521) for causing bc failures on browser_ext_windows_create_url.js. CLOSED TREE 2023-09-08 10:21:20 +03:00
DJ
57144039b3 Bug 1783521 - add card preview when inactive tab hovered. r=settings-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,fluent-reviewers,flod,dao,mconley
Differential Revision: https://phabricator.services.mozilla.com/D184260
2023-09-08 02:47:16 +00:00
Dão Gottwald
6876424fca Bug 1850721 - Correctly check boolean attributes when deciding whether to set indicator-replaces-favicon, and correctly carry over boolean attributes when moving a tab to another window. r=mak,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187183
2023-09-05 09:57:27 +00:00
Sandor Molnar
bff2d3b8b8 Backed out changeset ad7684944acc (bug 1850721) for causing bc failures in dom/base/test/browser_timeout_throttling_with_audio_playback.js CLOSED TREE 2023-09-01 19:46:14 +03:00
Dão Gottwald
603d3e682f Bug 1850721 - Correctly check boolean attributes when deciding whether to set indicator-replaces-favicon, and correctly carry over boolean attributes when moving a tab to another window. r=mak,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187183
2023-09-01 15:41:22 +00:00
Dão Gottwald
5e89f4908b Bug 1849904 - Convert a bunch of psuedo-boolean tab strip attributes to be standard boolean attributes. r=mconley,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D186729
2023-08-29 06:52:49 +00:00
Dão Gottwald
a1da4da44d Bug 1837174 - Replace [first-visible-unpinned-tab] selector with :nth-child and get rid of _setPositionalAttributes. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D180213
2023-06-07 18:42:07 +00:00
Mark Banner
0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner
91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Niklas Baumgardner
72a934650e Bug 1576612 - Close all multiselected tabs on middle click. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D177792
2023-05-16 20:16:26 +00:00
Natalia Csoregi
c56766d693 Backed out changeset 2814e09f635a (bug 1576612) for failures on browser_multiselect_tabs_close.js. CLOSED TREE 2023-05-16 19:27:36 +03:00
Niklas Baumgardner
8a8d4adfc0 Bug 1576612 - Close all multiselected tabs on middle click. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D177792
2023-05-16 14:04:32 +00:00
Dão Gottwald
b4df38a218 Bug 1819359 - Replace removeTab's byMouse parameter with triggeringEvent parameter. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D171459
2023-03-02 15:22:00 +00:00
Oriol Brufau
8c0684e496 Bug 1808787 - Optimize drag-and-drop into tabbar with lots of tabs. r=dao,Gijs
When called with isLink=true, _getDragTargetTab returns null if the
pointer is around the edges of the tab. This is useful to decide whether
drag-and-drop should create a new tab, or reuse an existing one.

The problem was that _getDropIndex, used when creating a new tab, would
therefore always get a null tab on dragover events, and then fall back
to iterating all tabs sequentially until it would find the right index,
with an expensive getBoundingClientRect() for each tab.

So this patch:
 - Renames unclear isLink to a more meaningful ignoreTabSides
 - Makes _getDragTargetTab use the native Element#closest instead of
   iterating the ancestors manually in JS.
 - Makes _getDropIndex always pass ignoreTabSides=false
 - Refactors _getDropIndex to never iterate tabs.
 - Adds .tab-drop-indicator{pointer-events:none}. This is needed so that
   the indicator doesn't become the event target, we want to get the tab
   behind it.

Differential Revision: https://phabricator.services.mozilla.com/D166125
2023-03-01 13:59:48 +00:00
Mike Conley
541e7eeb80 Bug 1804722 - Add probes for the All Tabs panel. data-review=jhirsch, r=mossop
This adds probes and a limited set of tests for the following types of measurements:

1. A count for each time the All Tabs panel is opened, keyed on the entrypoint.
2. A count for each usage of the Tab Context Menu, keyed on the trigger node
   as the entrypoint.
3. A count for each dragstart within the All Tabs panel.

Differential Revision: https://phabricator.services.mozilla.com/D168305
2023-02-06 15:14:48 +00:00
Oriol Brufau
e5704fa01f Bug 1808784 - Move tab invalidation methods to gBrowser.tabContainer. r=Gijs
D166962 is moving the cache into gBrowser.tabContainer, so the methods
for invalidating it should also be there.

Differential Revision: https://phabricator.services.mozilla.com/D166966
2023-01-17 14:12:08 +00:00
Oriol Brufau
28f5739d90 Bug 1808784 - Cache gBrowser.tabContainer.allTabs. r=Gijs
gBrowser.tabs was either redirecting to gBrowser.tabContainer.allTabs or
using the previously cached result. However, most tabContainer code uses
allTabs directly, which was not benefiting from the cache.

Therefore, this patch caches gBrowser.tabContainer.allTabs, and makes
gBrowser.tabs always redirect to it.

Also makes it consistent for gBrowser.tabContainer._getVisibleTabs() and
gBrowser.visibleTabs. In that case both the logic and the cache were in
gBrowser, and tabContainer was redirecting to that, except when gBrowser
hadn't been initialized.

So it's better to have both the logic and the cache in tabContainer.

Differential Revision: https://phabricator.services.mozilla.com/D166962
2023-01-17 00:36:19 +00:00
Dão Gottwald
4b170423dd Bug 1809465 - Replace _hoveredTab with a private tab property. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D166441
2023-01-10 17:10:30 +00:00
Oriol Brufau
e2f23612d8 Bug 1808965 - Stop calling _mouseleave and _mouseenter from _setPositionalAttributes. r=dao
Calling _mouseleave and _mouseenter from _setPositionalAttributes used
to be needed to update the beforehovered and afterhovered attributes,
as the tabs these attributes were set on might have changed.

However, bug 1808661 removed these attributes, so mouseenter/mouseleave
events should be sufficient for updating _hoveredTab itself.

_setPositionalAttributes is a hot code-path, so avoiding the expensive
querySelector("tab:hover") will improve performance when having lots of
tabs.

Depends on D166094

Differential Revision: https://phabricator.services.mozilla.com/D166225
2023-01-09 18:29:38 +00:00
Oriol Brufau
efa6c3a035 Bug 1808661 - Remove beforehovered and afterhovered. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D166094
2023-01-06 21:48:02 +00:00
Oriol Brufau
81252a2a9f Bug 1808661 - Remove before-multiselected and beforeMultiselected. r=Gijs,dao
Depends on D166026

Differential Revision: https://phabricator.services.mozilla.com/D166027
2023-01-06 21:48:01 +00:00
Oriol Brufau
6236b11f12 Bug 1808661 - Remove last-visible-tab and _lastTab. r=Gijs,dao
Differential Revision: https://phabricator.services.mozilla.com/D166026
2023-01-06 21:48:01 +00:00
Oriol Brufau
90c202dccb Bug 1808661 - Remove first-visible-tab and _firstTab. r=Gijs,dao
Differential Revision: https://phabricator.services.mozilla.com/D166025
2023-01-06 21:48:01 +00:00
Oriol Brufau
e7d4635b5f Bug 1808661 - Remove beforeselected-visible and _beforeSelectedTab. r=Gijs,dao
Differential Revision: https://phabricator.services.mozilla.com/D166024
2023-01-06 21:48:00 +00:00
Sandor Molnar
8df493554b Backed out 5 changesets (bug 1808661) for causing bc failures in browser/base/content/test/tabs/browser_positional_attributes.js CLOSED TREE
Backed out changeset 16871d37b859 (bug 1808661)
Backed out changeset 607a282e25f5 (bug 1808661)
Backed out changeset c2ad604be361 (bug 1808661)
Backed out changeset b22c7589a7bb (bug 1808661)
Backed out changeset b0c1ee751b7a (bug 1808661)
2023-01-06 22:21:10 +02:00
Oriol Brufau
ae8fa22d48 Bug 1808661 - Remove beforehovered and afterhovered. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D166094
2023-01-06 19:38:54 +00:00
Oriol Brufau
a4c57bb663 Bug 1808661 - Remove before-multiselected and beforeMultiselected. r=Gijs,dao
Depends on D166026

Differential Revision: https://phabricator.services.mozilla.com/D166027
2023-01-06 19:38:54 +00:00
Oriol Brufau
836df6345f Bug 1808661 - Remove last-visible-tab and _lastTab. r=Gijs,dao
Differential Revision: https://phabricator.services.mozilla.com/D166026
2023-01-06 19:38:53 +00:00
Oriol Brufau
1d06d77e22 Bug 1808661 - Remove first-visible-tab and _firstTab. r=Gijs,dao
Differential Revision: https://phabricator.services.mozilla.com/D166025
2023-01-06 19:38:53 +00:00
Oriol Brufau
d21435446d Bug 1808661 - Remove beforeselected-visible and _beforeSelectedTab. r=Gijs,dao
Differential Revision: https://phabricator.services.mozilla.com/D166024
2023-01-06 19:38:53 +00:00
Oriol Brufau
86e125812f Bug 1760460 - Turn gBrowser._removingTabs into a Set. r=Gijs
Thus avoiding ugly things like:
this._removingTabs.splice(this._removingTabs.indexOf(aTab), 1);

Differential Revision: https://phabricator.services.mozilla.com/D165736
2023-01-01 18:09:28 +00:00
Mark Banner
34d6fb8d94 Bug 1806503 - Automatically replace Cu.reportError with console.error (browser/actors, browser/base). r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D165068
2022-12-27 10:08:58 +00:00
Eemeli Aro
c33e8c501f Bug 1760029 - Migrate tabbrowser.properties strings used by tabbrowser-tabs.js to Fluent. r=gregtatum,dao,fluent-reviewers,flod
This removes the `intl:app-locales-changed` event listener that was added in bug 1760825, as it's not longer required.

Depends on D159017

Differential Revision: https://phabricator.services.mozilla.com/D159018
2022-11-22 17:12:22 +00:00
Simon Friedberger
6b0a251a63 Bug 1549057 - Rename (Gg)etCSP to (Gg)etCsp - r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D159268
2022-10-24 20:38:11 +00:00
Katherine Patenio
08a422ffa7 Bug 1789978: fix drop indicator position for RTL builds after opening Firefox View. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D157851
2022-10-11 18:30:59 +00:00
James Picone
e437470a8b Bug 1625945: Intercept wheel events in tabbrowser-tabs if switchByScrolling is true so tabs also switch when it's overflown, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D158077
2022-10-09 08:32:16 +00:00
Emilio Cobos Álvarez
0b76fc94ec Bug 1775998 - Update close buttons as a result of overflow/underflow. r=Gijs
The close buttons look at the overflow attribute but are not guaranteed
to update when it changes otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D158622
2022-10-08 00:17:24 +00:00
Emilio Cobos Álvarez
de0702b818 Bug 1786513 - Don't use ResizeObserver to deal with window resizes in tabbrowser. r=Gijs
This was introduced alongside the MutationObserver[1], according to the commit
message to "improve performance through coalesence of 'resize' events."

However, that's false, before this bug, resizes on the top level window would
flush layout and resize the document element instantly so there should be the
exact same amount of resize events as of ResizeObserver notifications. I'm not
sure what coalesence would this achieve.

This is causing the previous patch to get backed out, due to a failure on macOS
that I haven't been able to reproduce.

It's likely because on chrome windows some document element resizes can trigger
window resizes due to the size constraint propagation we have, so nothing
super-concerning or new all-in-all, my patch just changed the timing of how
this happened.

[1]: https://hg.mozilla.org/mozilla-central/rev/ad71dde9ed5e28957b124001a78c88fc1d94426a

Differential Revision: https://phabricator.services.mozilla.com/D155986
2022-09-01 10:54:13 +00:00