Commit Graph

851 Commits

Author SHA1 Message Date
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
Eemeli Aro
3dc060b88e Bug 1818916 - Clear tab tooltip on display. r=Gijs
The unnecessary tabbrowser-tab-tooltip is dropped, as it's the same single variable references in all locales. Also, setting the title as the label directly avoids a minuscule but observable delay that's the source of this issue.

Differential Revision: https://phabricator.services.mozilla.com/D171103
2023-03-01 08:57:07 +00:00
Gijs Kruitbosch
96e3b61974 Bug 1810141 - fix tabbrowser.js and browser.js loadURI to match new webnavigation interfaces, r=dao
This moves the somewhat out-of-place `_loadURI` method and its dependencies
into tabbrowser, and deals with receiving either a string or a URI.

Depends on D168391

Differential Revision: https://phabricator.services.mozilla.com/D168392
2023-02-13 23:50:39 +00:00
Cristina Horotan
f062495d94 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch
0e1d45594b Bug 1810141 - fix tabbrowser.js and browser.js loadURI to match new webnavigation interfaces, r=dao
This moves the somewhat out-of-place `_loadURI` method and its dependencies
into tabbrowser, and deals with receiving either a string or a URI.

Depends on D168391

Differential Revision: https://phabricator.services.mozilla.com/D168392
2023-02-13 12:55:23 +00:00
Jason Prickett
81d6c2c73d Bug 1815308 - Changed feature callout pdf check to use content principal instead of source URI r=aminomancer,omc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D169021
2023-02-08 23:08:09 +00:00
Shane Hughes
7f19e919fb Bug 1805177 - Make Escape key dismiss Feature Callouts. r=mviar
Set up event handlers so that pressing Escape dismisses Feature
Callouts. If an interactive element outside of the Callout is focused,
then the Escape key will not be consumed. Also consolidate all the event
handlers into a single switch statement so we won't need to continue
adding more callback bindings (they were only necessary before
encapsulation was implemented). Also change the names of a couple
formerly pseudo-private methods that we're now referencing externally.

Differential Revision: https://phabricator.services.mozilla.com/D168307
2023-02-01 17:52:12 +00:00
Hannah Peuckmann
c7b6da7fb7 Bug 791594 - Set tab title state while auth prompt is open. r=pbz,mconley,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D164442
2023-01-31 18:16:54 +00:00
Jason Prickett
492fc2777e Bug 1813947 - Fix pdf location evaluation for feature callout in chrome r=aminomancer,omc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D168327
2023-01-31 16:55:18 +00:00
Kelly Cochrane
9e73c55f7b Bug 1792017 - Prevent ability to multiselect hidden tabs such as Fx View r=sclements
Differential Revision: https://phabricator.services.mozilla.com/D167306
2023-01-23 14:44:23 +00:00
Meg Viar
04e1d3b419 Bug 1806425 - Make value of source in Feature Callout and page in its telementry more consistent r=jprickett,aminomancer
Unify the values of "source" and "page" as used in FeatureCallout.sys.mjs:
- Explicitly pass in a value for "page" when instantiating a Feature Callout and use this for the value of "page" when sending Feature Callout telemetry and as the "source" when making calls to `sendTriggerMessage`. This avoids the risk of including non-about: page URLs or PDF file extensions in our telemetry.
- Set the value of "page" in an HTML data attribute that can be accessed for use in about:welcome telemetry for Spotlight and Feature Callouts.
- Update references to the page value previously used as the page/source for telemetry from `about:firefoxview` Feature Callouts from "firefoxview"  to "about:firefoxview"
- Pass the token "chrome" when creating a callout from the browser chrome and update references to the source in PDF.js messages' targeting
- Update the page value expected in automated tests as needed

Differential Revision: https://phabricator.services.mozilla.com/D165910
2023-01-20 16:53:30 +00:00
Gijs Kruitbosch
a38928e07b Bug 1810025 - ensure long data URIs are never fully present in the tab label, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D166737
2023-01-18 12:17:00 +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
ca1a72c7a6 Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Unlike allowInheritPrincipal, skipLoad sets the nodefaultsrc attribute.
This avoids a load instead of falling back to about:blank.

One consequence of that is that switching to a lazy about:blank tab will
not notify invoke listeners registered with addTabsProgressListener
(listeners registered with addProgressListener will still be invoked).

Thus test browser_open_in_lazy_tab.js needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 13:51:47 +00:00
Sandor Molnar
4f5ee6f941 Backed out changeset 2b67bd0dd255 (bug 1808615) for causing bc failures in browser/components/customizableui/test/browser_open_in_lazy_tab.js CLOSED TREE 2023-01-07 03:18:23 +02:00
Oriol Brufau
60b9a931c7 Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 00:37:36 +00:00
Oriol Brufau
688084c92b Bug 1808721 - Stop invalidating cached _tabs from showTab and hideTab. r=dao
Invalidating cached _visibleTabs should be enough.

Differential Revision: https://phabricator.services.mozilla.com/D166085
2023-01-05 16:25:59 +00:00
Gijs Kruitbosch
1113bc0e43 Bug 1475606 - remove loadOneTab and switch its callers over, r=dao,perftest-reviewers,sparky
Depends on D165774

Differential Revision: https://phabricator.services.mozilla.com/D165775
2023-01-03 22:24:44 +00:00
Gijs Kruitbosch
be4f0334ac Bug 1475606 - remove separate logic for tabbrowser's loadOneTab(), r=dao
This used to do three things:
1. determine whether we're background loading
2. determine a default owner tab
3. force allowInheritPrincipal to a bool value

For the background loading, I removed the default pref check and moved the
selection action into addTab. I defaulted it to true, so that existing addTab
callers continue to open background tabs. I removed the code checking the pref:
all existing loadOneTab callsites pass an explicit value and where appropriate
check the pref themselves (sometimes doing the opposite in response to shift
keypresses etc.).
The one exception is browser_bug597218.js, but there the default of true gets
used right now, which is still the same post-patch.

For the owner tab, I moved setting the default into addTab. This shouldn't
affect existing addTab callers as they don't pass inBackground anyway, so we
default inBackground to true, in which case it just assigns null, only when
ownerTab wasn't provided in the first place.

For allowInheritPrincipal, the only reads of this in addTab use boolean negation
anyway so forcing its type to bool first made no difference.

Differential Revision: https://phabricator.services.mozilla.com/D165774
2023-01-03 22:24:44 +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
Meg Viar
79eec33848 Bug 1805930 - Change featureCallout.mjs to featureCallout.sys.mjs and update all references to filename r=barret,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D164824
2022-12-29 14:27:02 +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
Gijs Kruitbosch
788a3ae7e4 Bug 1738190 - allow opening inline SVG background images in a new tab, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D165454
2022-12-23 17:23:44 +00:00
Gijs Kruitbosch
2ddb749dcd Bug 1806919 - simplify loadOneTab to not unwrap and rewrap the same object, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D165453
2022-12-23 17:23:43 +00:00
Stanca Serban
eb72a57ac6 Backed out changeset a92af276c945 (bug 1805930) for causing bustages in packager.mk. CLOSED TREE 2022-12-19 21:41:40 +02:00
Meg Viar
2cf660435c Bug 1805930 - Change featureCallout.mjs to FeatureCallout.sys.mjs and update all references to filename r=barret
Differential Revision: https://phabricator.services.mozilla.com/D164824
2022-12-19 18:55:05 +00:00
Jason Prickett
8dc33d0067 Bug 1804589 - Refactors pdfjs feature callout instantiation for better performance r=mviar
Differential Revision: https://phabricator.services.mozilla.com/D164174
2022-12-09 20:14:46 +00:00
Meg Viar
63afba9b12 Bug 1804490 - Update PDF.js callout messages' targeting to only show on PDF documents r=jprickett
Differential Revision: https://phabricator.services.mozilla.com/D164129
2022-12-08 12:37:03 +00:00
Jason Prickett
a880490eae Bug 1803660 - Hide and show feature callout surface when tabs are changed r=mviar
Depends on D163639

Differential Revision: https://phabricator.services.mozilla.com/D163642
2022-12-06 23:22:50 +00:00
Noemi Erli
38df0ec770 Backed out changeset ab219eb65432 (bug 1803660) for causing failures in /browser_newtab_ping.js CLOSED TREE 2022-12-06 22:29:16 +02:00
Jason Prickett
fd2e0452f9 Bug 1803660 - Hide and show feature callout surface when tabs are changed r=mviar
Depends on D163639

Differential Revision: https://phabricator.services.mozilla.com/D163642
2022-12-06 19:27:40 +00:00
Meg Viar
18abc909b1 Bug 1795894 - Enable triggering Feature Callouts in chrome by content location r=jprickett
Differential Revision: https://phabricator.services.mozilla.com/D160503
2022-11-30 01:47:23 +00:00
Nika Layzell
c401277cf6 Bug 1538028 - Part 4: Pass TriggeringRemoteType through the frontend, r=Gijs,emilio
Propagate the ability to pass triggeringRemoteType through the desktop frontend
in various places, such that it is set when using the context menu or content
click handler.

Differential Revision: https://phabricator.services.mozilla.com/D161834
2022-11-29 20:41:46 +00:00
Sandor Molnar
61f05197c3 Backed out changeset 28484915dc1b (bug 1795894) for causing mochitest failures. CLOSED TREE 2022-11-28 04:33:07 +02:00
Meg Viar
3633b07781 Bug 1795894 - Enable triggering Feature Callouts in chrome by content location r=jprickett
Differential Revision: https://phabricator.services.mozilla.com/D160503
2022-11-28 00:54:14 +00:00
Neil Deakin
cbefc0ebf5 Bug 1801168, only expect the full screen exited event when the inDOMFullscreen attribute is set and select the url only in this case, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D162857
2022-11-25 10:36:00 +00:00
Eemeli Aro
9a3c42464a Bug 1760029 - Migrate browser.properties strings used by tabbrowser.js to Fluent. r=dao,fluent-reviewers,flod
The autorefresh blocker strings are added to `browser.ftl` as they aren't really "tab" strings.

Differential Revision: https://phabricator.services.mozilla.com/D159017
2022-11-22 17:12:21 +00:00
Eemeli Aro
46d4e9b1a3 Bug 1760029 - Migrate tabbrowser.properties strings used by tabbrowser.js to Fluent. r=dao,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D159016
2022-11-22 17:12:21 +00:00
Neil Deakin
a402fd4d84 Bug 1801060, fix selectURL function call so that url is selected properly, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162317
2022-11-21 21:30:46 +00:00
Neil Deakin
d3b4cd4f58 Bug 1219775 , focus the url bar when opening a new tab while in fullscreen mode, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D161517
2022-11-15 17:15:51 +00:00
Marian-Vasile Laza
cb5a3644d1 Backed out changeset de61491bc549 (bug 1795894) for causing bc failures on browser_protocol_ask_dialog.js. CLOSED TREE 2022-11-11 01:14:04 +02:00
Meg Viar
9e1c9a7613 Bug 1795894 - Enable triggering Feature Callouts in chrome by content location r=jprickett
Differential Revision: https://phabricator.services.mozilla.com/D160503
2022-11-10 21:01:22 +00:00
Marian-Vasile Laza
4582bdf7cb Backed out changeset 2023e8659017 (bug 1795894) for causing multiple bc failures on featureCallout.mjs. CLOSED TREE 2022-11-10 21:42:43 +02:00
Meg Viar
ed1f5ee2a9 Bug 1795894 - Enable triggering Feature Callouts in chrome by content location r=jprickett
Differential Revision: https://phabricator.services.mozilla.com/D160503
2022-11-10 18:47:04 +00:00
Bernard Igiri
511d17c548 Bug 1790971 - Prevent Firefox View Tab from being autoselected on tab closing r=dao
Prevent pinned Firefox View Tab from being autoselected on tab closing.

Differential Revision: https://phabricator.services.mozilla.com/D161218
2022-11-04 13:35:13 +00:00
Shane Hughes
b5e7da0a12 Bug 1743878 - Avoid opening caret browsing dialogs when already open. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D160166
2022-10-26 19:27:34 +00:00
Stanca Serban
50ec21d946 Backed out changeset d076c8363b14 (bug 1743878) for causing bc failures on browser_findbar_disabled_manual.js. CLOSED TREE 2022-10-26 13:10:37 +03:00
Shane Hughes
4a0617c8ce Bug 1743878 - Avoid opening caret browsing dialogs when already open. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D160166
2022-10-26 05:42:05 +00:00