Commit graph

876 commits

Author SHA1 Message Date
Niklas Baumgardner
1a38dbd604 Bug 1188978 - Expose tab playing to accessibility clients. r=dao,mhowell,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D176814
2023-05-03 17:51:57 +00:00
Emilio Cobos Álvarez
1d61a94f1b Bug 1828477 - Support input type=date in non-tabbrowser windows. r=Gijs,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D175771
2023-04-20 21:14:07 +00:00
Cristina Horotan
dbc5b34a3f Backed out changeset fcd3e501bdac (bug 1828477) for causing gv-junit failures. CLOSED TREE 2023-04-19 17:28:42 +03:00
Emilio Cobos Álvarez
081f3e748c Bug 1828477 - Support input type=date in non-tabbrowser windows. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D175771
2023-04-19 11:15:08 +00:00
Natalia Csoregi
e6dfae308a Backed out changeset 8abb5d78b663 (bug 1828477) for causing multiple failures e.g gv-junit on emptyShareReturnsTypeError. CLOSED TREE 2023-04-18 22:27:29 +03:00
Emilio Cobos Álvarez
f8779de473 Bug 1828477 - Support input type=date in non-tabbrowser windows. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D175771
2023-04-18 17:35:48 +00:00
Daisuke Akatsuka
73dc3820cc Bug 1824040: Make the loading URL opened in _blank target to be the target of Session Restore r=mak,smaug,farre,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D173790
2023-04-14 01:59:44 +00:00
Emilio Cobos Álvarez
70644f9d97 Bug 1819721 - Add some debugging utilities for StatusPanel debugging. r=dao
Not sure if this is worth it, your call. But I wrote this so I figured
someone debugging this code might find it useful.

Depends on D172033

Differential Revision: https://phabricator.services.mozilla.com/D172034
2023-04-13 15:31:03 +00:00
Dão Gottwald
2f36aef029 Bug 1822532 - Avoid flushing layout to determine a tab's width when closing it. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D174127
2023-03-30 21:01:22 +00:00
Shane Hughes
5d946f3d90 Bug 1818829 - Implement Feature Callout theme configuration. r=jprickett,omc-reviewers,fxview-reviewers,sfoster
Add logic to apply theme colors to Feature Callout based on where it's
going to show. We can use in-content CSS properties for Firefox View and
other themed system pages, but not for PDF.js, nor for any callouts we
might show in the browser chrome in the future. For the browser chrome
in general, we can use the lightweight theme properties directly, in the
same way the chrome frontend does. But PDF.js is a special case, since
although it exists in the chrome, it's meant to appear like it's in the
PDF.js viewer. And the PDF.js viewer has its own theme totally
independent of everything else. So this dynamically applies themes from
different sources.

This also fixes the bug where the PDF.js color scheme could mismatch the
PDF.js viewer if the browser theme and system color scheme don't match,
e.g. where system color scheme is light but a dark theme is installed,
or vice versa. For PDF.js specifically, we can use the
-moz-content-prefers-color-scheme media query to follow the color scheme
as it exists in the PDF.js viewer page instead of the color scheme in
the chrome window where the Feature Callout actually exists.

It also adds or modifies some colors that were previously missing or
different from the prototype, fixes the illegibility of buttons in HCM
and forced colors mode, and makes some other minor color changes.

Differential Revision: https://phabricator.services.mozilla.com/D173088
2023-03-28 00:38:42 +00:00
Cosmin Sabou
948fdb0dfb Backed out changeset fecef27ba1fa (bug 1818829) for causing newtab failures on _feature-callout-theme.scss. CLOSED TREE 2023-03-28 02:46:44 +03:00
Shane Hughes
effb48b0f5 Bug 1818829 - Implement Feature Callout theme configuration. r=jprickett,omc-reviewers,fxview-reviewers,sfoster
Add logic to apply theme colors to Feature Callout based on where it's
going to show. We can use in-content CSS properties for Firefox View and
other themed system pages, but not for PDF.js, nor for any callouts we
might show in the browser chrome in the future. For the browser chrome
in general, we can use the lightweight theme properties directly, in the
same way the chrome frontend does. But PDF.js is a special case, since
although it exists in the chrome, it's meant to appear like it's in the
PDF.js viewer. And the PDF.js viewer has its own theme totally
independent of everything else. So this dynamically applies themes from
different sources.

This also fixes the bug where the PDF.js color scheme could mismatch the
PDF.js viewer if the browser theme and system color scheme don't match,
e.g. where system color scheme is light but a dark theme is installed,
or vice versa. For PDF.js specifically, we can use the
-moz-content-prefers-color-scheme media query to follow the color scheme
as it exists in the PDF.js viewer page instead of the color scheme in
the chrome window where the Feature Callout actually exists.

It also adds or modifies some colors that were previously missing or
different from the prototype, fixes the illegibility of buttons in HCM
and forced colors mode, and makes some other minor color changes.

Differential Revision: https://phabricator.services.mozilla.com/D173088
2023-03-27 23:07:45 +00:00
Daisuke Akatsuka
1daa08100f Bug 610357: Show pending URL in location bar and tab while loading. r=mak,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D170045
2023-03-23 21:24:11 +00:00
Gijs Kruitbosch
6e92bec207 Bug 1823706 - rename addMultipleTabs and batchInsertingTabs parameter for clarity, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D173271
2023-03-23 10:00:35 +00:00
Sandor Molnar
a4a50c3d51 Backed out changeset b8ae8c3725cd (bug 610357) for causing multiple failures in browser_link_in_tab_title_and_url_prefilled.js / browser_cdp.js 2023-03-23 04:35:38 +02:00
Daisuke Akatsuka
f0eef2cdca Bug 610357: Show pending URL in location bar and tab while loading. r=mak,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D170045
2023-03-23 00:44:47 +00:00
Gijs Kruitbosch
78ae8aa771 Bug 1822854 - ensure session store doesn't assume _tPos is set and has good stub info for recently restored tabs so we don't break manual session restore, r=dao
Either of these changes (ie dropping the setTabState call for batch restored
tabs, or ensuring the restoreTabs code correctly fills its array with dummy
entries) is sufficient here. I chose to do both because I think in both cases
the brokenness is not limited to this scenario or the issues at hand.

Specifically, the setTabState call was added in bug 1521346 to deal with
moved lazy tabs, but is now being invoked for session restore because of
the batchInsertingTabs optimization work. It doesn't actually need to be,
as far as I can tell, and the lacking _tPos in this case (because we don't
insert the tab into the tabstrip a few lines above) is what breaks things
inside _ensureNoNullsInTabDataList. Note that this _already_ was breaking
things in restoreTab(), which would assign into tabs[undefined] on the
window state object, so just dropping the call seemed better than wallpapering
the absence of _tPos.

The restoreTabs code, pre-patch, calls _ensureNoNullsInTabDataList but that
will never do anything, because right before calling it we change the array
length, so maxPos was always smaller than the size of the list. This meant
we still had empty slots in the array, which was also causing confusion down
the line.

I added the explicit exception for the broken _tPos in restoreTab so that we
notice any future issues with this more quickly. Doing so without any of the
other fixes broke the pre-existing browser_586068-apptabs.js test, so
hopefully that will catch any future changes that break the code's assumptions.

Differential Revision: https://phabricator.services.mozilla.com/D173070
2023-03-21 16:29:06 +00:00
Gijs Kruitbosch
724b8b71bc Bug 1822072 - split up tabbrowser's addTab so it's easier to understand, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D170924
2023-03-16 15:37:28 +00:00
Luca Greco
ebac80c11a Bug 1819794 - Ensure userContextId is set in the session store tab state for tabs created as discarded. r=Gijs,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D171570
2023-03-15 11:47:01 +00:00
Norisz Fay
b33738264f Backed out changeset f0bc703cf531 (bug 1822072) for causing bc failures on browser_ext_tabs_discard_reversed.js CLOSED TREE 2023-03-14 04:18:39 +02:00
Gijs Kruitbosch
bbe7f00942 Bug 1822072 - split up tabbrowser's addTab so it's easier to understand, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D170924
2023-03-14 00:29:26 +00:00
Gijs Kruitbosch
9e0531a790 Bug 1718082 - move hasSiblings from BrowserChild to BC and update as a synced field, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D171645
2023-03-13 17:32:08 +00:00
Gijs Kruitbosch
f64b33fbe8 Bug 1718082 - move isAppTab from docshell to browsing context, r=nika,rpl
Differential Revision: https://phabricator.services.mozilla.com/D171412
2023-03-13 17:32:07 +00:00
Gijs Kruitbosch
c20f7ae2a1 Bug 1718082 - make updating apptab and usercontext information solely tabbrowser's responsibility, r=mconley
I'm removing the apptab bits completely in one of the later commits,
but trying to keep this modular so it's easy to figure out regressions,
should there be any.

Differential Revision: https://phabricator.services.mozilla.com/D171411
2023-03-13 17:32:07 +00:00
Gijs Kruitbosch
2a7a19dfbf Bug 1718082 - remove expired container/userContextId telemetry, r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D171410
2023-03-13 17:32:06 +00:00
Dão Gottwald
077339c4e9 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
fc03e6d384 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
48f5aa84bb 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
5f4356e527 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
c7c3c6ad29 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
c1007dbe46 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
5272e82bf7 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
b8be954fd0 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
810bba0add 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
69725bd383 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
a3e99a2057 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
a983b1fc60 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
f1298a84d4 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
7802cff266 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
0564edd687 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
ef235398aa 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
198b27b6ab 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
8f8fe7e93f 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
19d0b68eda 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
3762db01b9 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
e477f833cc 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
7eca06dd4c 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
90822c532c 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
3a07fcf436 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
c453d031f5 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