Commit Graph

26 Commits

Author SHA1 Message Date
Boris Zbarsky
9a8e024fa0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
Olivier Tilloy
2b098ddcae Bug 1444313 - Fix desktop file name for snapd's xdg-setting wrapper. r=mkaply
MozReview-Commit-ID: KfG8oEYArKm
2018-03-09 09:04:25 +01:00
Olivier Tilloy
7d282e7f17 Bug 512305 - Use xdg-settings for Firefox Snap. r=jhorak
MozReview-Commit-ID: CJvgaLK373j
2018-03-01 10:35:03 -06:00
Jan Horak
d5b0cb0ab4 Bug 1411579 - add system handler when Firefox runs in flatpak; r=stransky
Firefox in Flatpak sandboxed environment does not get the list
of installed applications on the system because application should
know about the environment as little as possible. Introducing
nsFlatpakHandlerApp which forwards requests for opening downloaded files
to the system by utilizing gtk_show_uri fuction.

This changeset also removes nsIGIOMimeApp::Launch method from the interface
because it can be fully replaced with LaunchWithUri from nsIHandlerApp
interface.

The TMPDIR where files are downloaded when user choose to open them
needs to be accessible from sandbox and host. The default settings
TMPDIR=/tmp is accessible only to the sandbox.

To workaround for is to set TMPDIR environment variable to
$XDG_CACHE_HOME/tmp before executing Firefox.

MozReview-Commit-ID: CSBv0QcETpd
2018-01-12 16:32:53 +01:00
Jan Horak
e7bd43fa44 Bug 1297686 - List GIO handlers in the protocol handler list, in the handlers dialog, and in preferences. r=paolo
The nsGIOService now provides GetAppsForURIScheme which is used to append handlers
for specific scheme in handler list dialog (toolkit/mozapps/handling/content/dialog.js)
and also in Applications section in preferences. In case the default system handler
or user added handler has same name as one of the GIO handlers, the GIO handler
is not appended. The check for not adding handler is by using handler name.

The nsGIOMimeApp class now implements nsIHandlerApp interface. Instead overloaded
GetName methods (nsCString and nsString) we now use nsString variant everywhere.
This require change of nsGNOMERegistry::GetFromType which if fact leads to code
simplification.

The implementation of nsGNOMEShellService::SetDefaultBrowser has been changed
because implementation of CreateAppFromCommand has changed.
The CreateAppFromCommand no longer tries to find the application,
for that FindAppFromCommand has been introduced.

MozReview-Commit-ID: KmfFWRPqV3
2017-12-29 07:27:42 +00:00
Cosmin Sabou
b7fa5a6d8a Backed out changeset 9660ff09c221 (bug 1297686) for xpcshell failures at uriloader/exthandler/tests/unit/test_handlerService_json.js r=backout on a CLOSED TREE 2017-12-28 19:41:50 +02:00
Jan Horak
11243ad3fa Bug 1297686 - List GIO handlers in the protocol handler list, in the handlers dialog, and in preferences. r=paolo
The nsGIOService now provides GetAppsForURIScheme which is used to append handlers
for specific scheme in handler list dialog (toolkit/mozapps/handling/content/dialog.js)
and also in Applications section in preferences. In case the default system handler
or user added handler has same name as one of the GIO handlers, the GIO handler
is not appended. The check for not adding handler is by using handler name.

The nsGIOMimeApp class now implements nsIHandlerApp interface. Instead overloaded
GetName methods (nsCString and nsString) we now use nsString variant everywhere.
This require change of nsGNOMERegistry::GetFromType which if fact leads to code
simplification.

The implementation of nsGNOMEShellService::SetDefaultBrowser has been changed
because implementation of CreateAppFromCommand has changed.
The CreateAppFromCommand no longer tries to find the application,
for that FindAppFromCommand has been introduced.

MozReview-Commit-ID: KmfFWRPqV3
2017-12-28 15:25:32 +00:00
Kyle Machulis
d02dd47205 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo
2017-10-06 13:27:23 -07:00
Stephen A Pohl
467dd73061 Bug 1119088: Fix ability to set an image as desktop background via context menu on macOS. r=mstange,mconley 2017-08-09 14:43:39 -04:00
Nicholas Nethercote
723f585d9c Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.
2017-08-04 14:40:52 +10:00
Nicholas Nethercote
8b5bdf0867 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)
2017-07-12 15:13:37 +10:00
Brendan Dahl
c27fd9e6dd Bug 1368211 - Don't create gnome shell service in headlesss mode. r=jrmuizel 2017-07-11 13:35:30 -07:00
Sylvestre Ledru
9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Enes Goktas
9205ec54b0 Bug 1302855 - Fold browsercomps into xul; r=bsmedberg
MozReview-Commit-ID: 8oaVngXFfh3
2016-09-27 19:54:37 -07:00
Igor
9c81c3c1ee Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
27c926c49e Bug 1197331 - remove PR_snprintf calls in miscellaneous directories. r=nfroyd 2016-08-04 16:41:00 +02:00
Chris Peterson
6c0f810682 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Jared Wein
c3f27c3b0d Bug 1238712 - Move duplicated shell-service code to a shared JSM. r=gijs 2016-01-15 12:35:15 -05:00
Jared Wein
83c49e4141 Bug 1225648 - Remove duplicate skipDefaultBrowser code and fix double-counting error when tracking prompt counts. r=Gijs 2015-11-18 11:37:29 -05:00
Jared Wein
39e8a487a7 Bug 1208000 - Default browser dialog appears only 2 times. r=Gijs 2015-09-24 14:18:00 +02:00
Jared Wein
c4afcb7809 Bug 1191250 - Defer showing the default browser prompt to 2nd run (and only show it a maximum of three times). r=jimm 2015-08-28 16:30:00 -04:00
Dragana Damjanovic
f5e3e71a6d Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Emanuel Hoogeveen
b30abdc582 Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Gavin Sharp
e9102c0a38 Bug 1041516 part 2: reset the "check for default browser" pref to true when setting ourselves as the default browser, r=Gijs 2014-10-13 21:15:43 -07:00
Gavin Sharp
24c06d7306 Bug 1041516 part 1: clean up pref code in shell service, r=bsmedberg 2014-10-13 21:10:47 -07:00
Birunthan Mohanathas
083a89ae95 Bug 1038458 - Part 7: Flatten browser/components/shell/{public,src}/ directories. r=mak 2014-07-26 09:32:14 -07:00