Commit Graph

889 Commits

Author SHA1 Message Date
Butkovits Atila
e013ce3291 Backed out 2 changesets (bug 1836051) for causing failures at browser_keepStateAcrossTabSwitches.js. CLOSED TREE
Backed out changeset 1b340c6a4e28 (bug 1836051)
Backed out changeset b15e56c19bb7 (bug 1836051)
2023-06-14 19:19:31 +03:00
Daisuke Akatsuka
f01241b6d9 Bug 1836051: Restore selection range when tab switching r=tabbrowser-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D180415
2023-06-14 12:53:12 +00:00
Daisuke Akatsuka
7e13016aa7 Bug 1836051: Make the urlbar to revert its previous focus state when switching tabs r=tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D180266
2023-06-14 12:53:12 +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
Niklas Baumgardner
cafd4fd680 Bug 1811115 - Make tab owner a weak reference. r=dao,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D179558
2023-06-06 13:26:39 +00:00
Sam Foster
ffc79712f2 Bug 1819675 - rename SessionStore.getClosedTabCount and getClosedTabData to getClosedTabCountForWindow and getClosedTabDataForWindow. r=dao,fxview-reviewers,kcochrane
- As closed tabs will change to mean closed tabs from all windows, rename these functions to make
  changes in later patches clearer when we mean closed tabs from this window specifically, or closed
  tabs for all private/non-private windows

Differential Revision: https://phabricator.services.mozilla.com/D177849
2023-05-30 18:54:12 +00:00
Fred Chasen
b2ee1caee5 Bug 574385 - Reset related tabs on system triggered page navigations r=mhowell
Check the triggering principal of document loads in TabProgressListener's onLocationChange event,
and clear the related tabs if load was triggered by the system principal (typed in the url bar / bookmarks / history, etc.) to prevent grouping unrelated tabs.

Differential Revision: https://phabricator.services.mozilla.com/D178373
2023-05-23 16:47:48 +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
30cead34a2 Bug 1791231 - Open link in new tab after selected tab. r=dao,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D178242
2023-05-18 15:18:11 +00:00
Brice Laurencin
f7bb93f59c Bug 1418462 - Middleclick on new tab button launch clipboard r=Gijs
Original code from bruntonross@protonmail.com,
adapted to current Firefox version.

Differential Revision: https://phabricator.services.mozilla.com/D170097
2023-05-10 10:08:24 +00:00
Stanca Serban
67a233d35f Backed out changeset 50c9a0bea4c6 (bug 1418462) for causing mochitests failures in browser_middleClick.js. CLOSED TREE 2023-05-10 02:50:36 +03:00
Brice Laurencin
b6311d6f18 Bug 1418462 - Middleclick on new tab button launch clipboard r=Gijs
Original code from bruntonross@protonmail.com,
adapted to current Firefox version.

Differential Revision: https://phabricator.services.mozilla.com/D170097
2023-05-09 20:50:04 +00:00
Niklas Baumgardner
ec558f08b8 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
7b99f3eb89 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
1f70ff41ad Backed out changeset fcd3e501bdac (bug 1828477) for causing gv-junit failures. CLOSED TREE 2023-04-19 17:28:42 +03:00
Emilio Cobos Álvarez
2290a1d8e2 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
34a8f8c95d 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
df2c483941 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
f1441c3114 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
a0c2c34335 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
e7a78cd6d0 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
7cf9a86c67 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
c31085cb42 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
43bb7f08b0 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
56c121f318 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
5e7d1aeb25 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
8ba916acb7 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
c6baf52b6c 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
5a7f5e02ed 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
e65dc4cca0 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
29d1c32414 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
faa1cfe3cd 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
92681c3227 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
f6eafeeea6 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
4ee9373eaa 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
b6fec007b1 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
9785c9cc61 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
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