Commit graph

511 commits

Author SHA1 Message Date
Gijs Kruitbosch
c1ce490e37 Bug 1738056 - stop initializing the about window asynchronously and manually sizing it, r=emilio,mconley
Differential Revision: https://phabricator.services.mozilla.com/D172007
2023-03-14 00:03:42 +00:00
Iulian Moraru
2c92c7a07f Backed out changeset b352f130099f (bug 1738056) for causing bc failures on browser_aboutDialog_distribution.js. CLOSED TREE 2023-03-09 21:01:23 +02:00
Gijs Kruitbosch
28ac807b9e Bug 1738056 - stop initializing the about window asynchronously and manually sizing it, r=emilio,mconley
Differential Revision: https://phabricator.services.mozilla.com/D172007
2023-03-09 17:17:29 +00:00
Butkovits Atila
cb6b23ff4f Backed out changeset e8b15a7eb6ae (bug 1738056) for causing failures at browser_aboutDialog_AppUpdater_stop_ready_for_restart.js. CLOSED TREE 2023-03-09 02:52:54 +02:00
Gijs Kruitbosch
5184a1bb4d Bug 1738056 - stop initializing the about window asynchronously and manually sizing it, r=emilio,mconley
Differential Revision: https://phabricator.services.mozilla.com/D172007
2023-03-08 22:51:53 +00:00
Gijs Kruitbosch
fbd24413c4 Bug 1817443 - remove openUILinkIn entirely and rename fromChrome, r=mossop,extension-reviewers,rpl
'fromChrome' really meant "force tabs to open in the foreground", so let's
rename it accordingly.

This removes the attempt to document arguments for openUILinkIn.
I'll add documentation back on the end of this stack, for openLinkIn, when
various bits are reorganized anyway.

Differential Revision: https://phabricator.services.mozilla.com/D170384
2023-02-23 17:02:43 +00:00
Gijs Kruitbosch
3e5d710873 Bug 1817443 - move url loading method implementations from utilityOverlay.js into their own helper module, r=mossop
openLinkIn would really benefit from being split up a bit, and adding more
globals to the browser window is icky. Also, the story for opening new tabs if
you're not inside a window is a nightmare right now. Moving this code
to a module is a first step to making that story nicer.

I kept wrappers for all the functions I'm moving, and added the `window` as the
first argument. In the future we can update these functions to support being
called without a `window` ref. The one exception is getTopWin, where I updated
the callers in this patch.

I had to tweak the parameter detection of the different arguments supported by
openUILinkIn because forwarding calls means arguments.length is always larger
than 3... but then also removed it in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D170210
2023-02-23 17:02:43 +00:00
Cristina Horotan
45de4f594f Backed out 5 changesets (bug 1817443) for newtab failure CLOSED TREE
Backed out changeset ba33c510d008 (bug 1817443)
Backed out changeset 07e3bccaeb6d (bug 1817443)
Backed out changeset 2b39dee42948 (bug 1817443)
Backed out changeset a74a52e93af4 (bug 1817443)
Backed out changeset 827855beb033 (bug 1817443)
2023-02-23 17:30:23 +02:00
Gijs Kruitbosch
4458f50681 Bug 1817443 - remove openUILinkIn entirely and rename fromChrome, r=mossop,extension-reviewers,rpl
'fromChrome' really meant "force tabs to open in the foreground", so let's
rename it accordingly.

This removes the attempt to document arguments for openUILinkIn.
I'll add documentation back on the end of this stack, for openLinkIn, when
various bits are reorganized anyway.

Depends on D170210

Differential Revision: https://phabricator.services.mozilla.com/D170384
2023-02-23 14:49:28 +00:00
Gijs Kruitbosch
1c327d22dd Bug 1817443 - move url loading method implementations from utilityOverlay.js into their own helper module, r=mossop
openLinkIn would really benefit from being split up a bit, and adding more
globals to the browser window is icky. Also, the story for opening new tabs if
you're not inside a window is a nightmare right now. Moving this code
to a module is a first step to making that story nicer.

I kept wrappers for all the functions I'm moving, and added the `window` as the
first argument. In the future we can update these functions to support being
called without a `window` ref. The one exception is getTopWin, where I updated
the callers in this patch.

I had to tweak the parameter detection of the different arguments supported by
openUILinkIn because forwarding calls means arguments.length is always larger
than 3... but then also removed it in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D170210
2023-02-23 14:49:27 +00:00
Gijs Kruitbosch
c41ccf9cc7 Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 23:50:40 +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
bb42efb76d Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 12:55:25 +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
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
Danny Colin
980244d030 Bug 1796797 - Convert toolkit/components/contextualidentity JSM modules to ESMs r=baku,webdriver-reviewers,extension-reviewers,settings-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D159945
2022-12-21 08:14:05 +00:00
Nika Layzell
98304d1200 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-12-01 15:43:19 +00:00
Marian-Vasile Laza
7492025127 Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell
9cc8ee8c01 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-11-30 18:13:43 +00:00
Nika Layzell
39cfe43333 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
Neil Deakin
7997a24179 Bug 1676492, show the bookmarks toolbar when a new window is opened when the preference is set to show a blank page, r=Mardak,settings-reviewers
w

Differential Revision: https://phabricator.services.mozilla.com/D155003
2022-11-01 20:43:02 +00:00
Mark Banner
2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Gregory Pappas
c09f207391 Bug 1792205 - Disable 'More troubleshooting information...' when BlockAboutSupport is active r=mkaply,mconley
Differential Revision: https://phabricator.services.mozilla.com/D158071
2022-10-07 18:12:28 +00:00
Mark Banner
8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Butkovits Atila
59d03e0b1d Backed out 2 changesets (bug 1676492) for causing failures at test_navigation.py. CLOSED TREE
Backed out changeset 09fd88048f35 (bug 1676492)
Backed out changeset bc76e6966ec9 (bug 1676492)
2022-08-30 20:56:51 +03:00
Neil Deakin
507f721d6c Bug 1676492, show the bookmarks toolbar when a new window is opened when the preference is set to show a blank page, r=Mardak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D155003
2022-08-30 14:02:02 +00:00
Daisuke Akatsuka
9a83490432 Bug 1784369: Make opening in new window target for inheritance of sponsored sessions. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D154483
2022-08-16 00:41:01 +00:00
Norisz Fay
b1df28edbf Backed out 3 changesets (bug 1784369, bug 1784242) for causing node newtab failures CLOSED TREE
Backed out changeset f19a8a76a85b (bug 1784242)
Backed out changeset 0722fc4bb4fa (bug 1784242)
Backed out changeset 2d4131b0ca28 (bug 1784369)
2022-08-16 03:19:32 +03:00
Daisuke Akatsuka
05112fc891 Bug 1784369: Make opening in new window target for inheritance of sponsored sessions. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D154483
2022-08-15 23:45:32 +00:00
Daisuke Akatsuka
fe1785170f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-08-01 00:27:50 +00:00
Butkovits Atila
665e518c7f Backed out 2 changesets (bug 1776609) for causing failures at browser_topsites_annotation.js. CLOSED TREE
Backed out changeset cac795fd16d2 (bug 1776609)
Backed out changeset 88ec1cca8540 (bug 1776609)
2022-08-01 00:52:35 +03:00
Daisuke Akatsuka
971ff4bfb6 Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-31 20:26:30 +00:00
Butkovits Atila
900cbd85bd Backed out 2 changesets (bug 1776609) for causing gtest failures. CLOSED TREE
Backed out changeset 7630fea97777 (bug 1776609)
Backed out changeset 426cbe0fac73 (bug 1776609)
2022-07-29 13:42:33 +03:00
Daisuke Akatsuka
7c02dae76f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-29 09:24:28 +00:00
Tooru Fujisawa
54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Kagami Sascha Rosylight
764ef75de5 Bug 1773740 - Part 4: Reapply mach -l eslint --fix with use-isInstance changes r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148939
2022-06-27 20:31:34 +00:00
Dão Gottwald
6e5fc9e18e Bug 1774377 - Add Firefox View menu item to the Tools menu. r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D149367
2022-06-17 07:56:26 +00:00
Butkovits Atila
381a82e504 Backed out changeset df17ec7a8095 (bug 1774377) for causing assertion failures at ErrorResult.h. CLOSED TREE 2022-06-16 01:20:24 +03:00
Dão Gottwald
918c0e9b5e Bug 1774377 - Add Firefox View menu item to the Tools menu. r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D149367
2022-06-15 21:34:44 +00:00
Tom Schuster
f2caf19094 Bug 1738694 - Pass around hasValidUserGestureActivation and fromExternal when opening links from the UI or command-line. r=Gijs,edgar
Differential Revision: https://phabricator.services.mozilla.com/D147515
2022-06-15 19:01:02 +00:00
Calixte
93528759ed Bug 1766030 - Add an optional source URL when saving an URL. r=Gijs
In pdf.js, files are saved thanks to a blob but the original URL is lost.
Consequently, the download panel doesn't contain any information about the
origins of a saved pdf.
The saveURL, internalSave and nsITransfer.init functions has now a parameter for this originalURL.

Differential Revision: https://phabricator.services.mozilla.com/D147651
2022-05-31 17:25:29 +00:00
Dão Gottwald
bb44ff4ea0 Bug 1766896 - Redirect attempts to load something else in the Firefox View tab to new tabs. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D145613
2022-05-10 22:16:45 +00:00
Julien Wajsberg
220542aa8c Bug 1639716 - [utilityOverlay] Provide a callback in openLinkIn to report when a content browser is created r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D133375
2022-01-26 17:26:22 +00:00
Julien Wajsberg
3f29e1ff88 Bug 1745208 - [utilityOverlay] Add a new parameter "forceNonPrivate" to openLinkIn r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D133378
2022-01-26 17:26:20 +00:00
Julien Wajsberg
b461799fc5 Bug 1745208 - [utilityOverlay] Make getTopWin take an option parameter r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D133376
2022-01-26 17:26:19 +00:00
Gijs Kruitbosch
f7af2c33b1 Bug 1742801 - do not consume the user gesture from ClickHandlerChild if ClickHandlerParent will ignore the click anyway, r=edgar
This commit does a couple of things:
- move whereToOpenLink and getRootEvent implementations into BrowserUtils,
  so they can be used from the child process.
- forward callers in utilityOverlay.js to the BrowserUtils ones
  (bug 1742889 will get rid of the forwarding and update all the callers;
   we might be able to get this and bug 1739929 into beta if risk is low
   enough, and touching a bunch of extra files really doesn't help with
   that)
- move the lazy-load of BrowserUtils from browser.js to utilityOverlay.js
  This is safe because everywhere that loads browser.js also loads
  utilityOverlay.js. It's needed because there are some places that use
  utilityOverlay.js but not browser.js, and so now they need access to
  BrowserUtils.jsm.
- use whereToOpenLink to determine if we should avoid consuming the transient
  user gesture activation in the child click handling code.
- add an automated test based on the testcase in the bug.

When working on this, I initially put the check using whereToOpenLink in
the toplevel of the function, and then when I ran places test to check that
I hadn't broken any places consumers of whereToOpenLink or getRootEvent,
realized that I had broken `browser_markPageAsFollowedLink.js`, because it
relies on "normal" (ie no modifier key, left button) link clicks making it
to ClickHandlerParent.jsm . I filed bug 1742894 about this. I've not tried
to fix that here, instead I've tried to ensure that paths through this
function are as untouched as possible while still fixing bug 1739929 and
bug 1742801.

Differential Revision: https://phabricator.services.mozilla.com/D132102
2021-11-25 22:49:00 +00:00