Commit graph

65 commits

Author SHA1 Message Date
Masatoshi Kimura
3e8c44dd66 Bug 1845057 - Remove aClaimAllTypes from setDefaultBrowser. r=nrishel,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189678
2023-10-02 16:56:42 +00:00
Emilio Cobos Álvarez
46df319668 Bug 1805939 - Have a central source of truth for desktop environment detection. r=stransky,jld
Gfx blocklist doesn't actually use the desktop environment filter so
remove that functionality. We can reintroduce it in the future if we
need it.

Differential Revision: https://phabricator.services.mozilla.com/D166090
2023-01-20 11:26:11 +00:00
serge-sans-paille
8c578a2682 Bug 1773148 - Cleanup browser/components/shell includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D148621
2022-06-08 09:53:54 +00:00
Emilio Cobos Álvarez
a0a64c2947 Bug 1767889 - Set both picture-uri and picture-uri-dark when setting desktop background in GSettings. r=stransky
Clean up a bit the code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D145559
2022-05-09 13:38:38 +00:00
Emilio Cobos Álvarez
9ddc42292b Bug 1760839 - Use more automatic memory management in GTK code. r=stransky
This fixes a couple potential leaks (e.g., see the UPowerClient changes,
we weren't freeing all the devices properly).

Differential Revision: https://phabricator.services.mozilla.com/D141775
2022-03-23 16:14:34 +00:00
Emilio Cobos Álvarez
74c4e590a6 Bug 1757209 - Don't hardcode snap instance name. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139761
2022-02-28 15:07:16 +00:00
Emilio Cobos Álvarez
8e7fb6594f Bug 1756083 - Remove useless ifdef. r=stransky
We never compile nsGNOMEShellService without MOZ_WIDGET_GTK.

Depends on D139474

Differential Revision: https://phabricator.services.mozilla.com/D139475
2022-02-23 13:59:33 +00:00
Emilio Cobos Álvarez
0422925d7e Bug 1756083 - Cleanup snap name handling and enable portal when running under either flatpak or snap. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139474
2022-02-23 13:59:33 +00:00
Noemi Erli
cfc7069bc4 Backed out changeset e6e6714aa40a (bug 1516290) for causing valgrind failures 2022-01-23 18:20:28 +02:00
Emilio Cobos Álvarez
2dfce95b86 Bug 1516290 - Check for default browser using xdg-settings before trying to use the protocol handler. r=stransky
This seems worth doing regardless of whether we do D136076.

Differential Revision: https://phabricator.services.mozilla.com/D136623
2022-01-23 13:41:12 +00:00
Valentin Gosu
b9a978d201 Bug 1599713 - Implement IsCurrentAppOSDefaultForProtocol on Linux (GTK) r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D113951
2021-05-27 06:42:56 +00:00
Emilio Cobos Álvarez
2677f1390e Bug 1706299 - Remove nsIImageToPixBuf. r=stransky
It's just useless indirection.

Differential Revision: https://phabricator.services.mozilla.com/D112705
2021-04-21 09:29:51 +00:00
Olivier Tilloy
17b5edfc93 Bug 1701182 - Prepend SNAP-specific prefix to shm path. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D110269
2021-04-09 14:41:31 +00:00
Butkovits Atila
c6955ce4d0 Backed out changeset caf472555c8a (bug 1701182) for causing failure on test_snap_empty.js. CLOSED TREE 2021-04-08 05:26:26 +03:00
Olivier Tilloy
7b5c4d8ee0 Bug 1701182 - Prepend SNAP-specific prefix to shm path. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D110269
2021-04-07 20:55:42 +00:00
Andreea Pavel
e86d10c304 Backed out changeset c83c9af968f8 (bug 1701182) for build bustages at system_wrappers/gdk/gdk.h on a CLOSED TREE 2021-03-31 19:33:47 +03:00
Olivier Tilloy
45068bf782 Bug 1701182 - Prepend SNAP-specific prefix to shm path. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D110269
2021-03-31 15:52:07 +00:00
Dorel Luca
f0985635c0 Backed out changeset 627da64827ab (bug 1701182) for build bustages in gecko/browser/components/shell/nsGNOMEShellService.cpp. CLOSED TREE 2021-03-30 21:32:39 +03:00
Olivier Tilloy
24c53bd998 Bug 1701182 - Prepend SNAP-specific prefix to shm path. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D110269
2021-03-30 18:03:30 +00:00
Valentin Gosu
0b0dd660db Bug 1696193 - Stop setting Firefox as default handler for FTP r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D107079
2021-03-04 08:37:02 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Martin Stransky
cc642ad9c0 Bug 1239694 Implemenet Gnome search provider, r=jhorak,mak
Implement org.gnome.Shell.SearchProvider2 D-Bus interface and enable it when
widget.gnome-search-provider.enabled pref is set, so this feature is disabled
by default.

Differential Revision: https://phabricator.services.mozilla.com/D69181
2020-04-29 18:02:23 +00:00
Bogdan Tara
5f9254f771 Backed out changeset cee5051ad409 (bug 1239694) for bustages complaining about dbus CLOSED TREE 2020-04-29 14:17:16 +03:00
Martin Stransky
67042242cd Bug 1239694 Implemenet Gnome search provider, r=jhorak,mak
Implement org.gnome.Shell.SearchProvider2 D-Bus interface and enable it when
widget.gnome-search-provider.enabled pref is set, so this feature is disabled
by default.

Differential Revision: https://phabricator.services.mozilla.com/D69181
2020-04-29 10:50:10 +00:00
Sergio Schvezov
5a3431997f Bug 1616870 - Correctly detect when running as a snap r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D64741

--HG--
extra : moz-landing-system : lando
2020-03-04 10:52:43 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Mark Banner
3f6c1dab90 Bug 324361 - Remove openApplication/openApplicationWithURI from the shell service as they aren't used. r=mossop
Keeps a function for opening the Mac desktop preferences.

Differential Revision: https://phabricator.services.mozilla.com/D43269

--HG--
extra : moz-landing-system : lando
2019-08-27 08:03:12 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Martin Stransky
69f81abebc Bug 1526243 - [Linux] Don't use nsGConfService in nsGNOMEShellService.cpp, r=glandium
Don't use gconf service to get/set default browser as it breaks recent Gnome environment.
Also use XDG_CURRENT_DESKTOP to check actual desktop.

Differential Revision: https://phabricator.services.mozilla.com/D25395

--HG--
extra : moz-landing-system : lando
2019-04-04 05:58:32 +00:00
Ian Moody
7d6860c063 Bug 612373 - Add "Span" option for Windows and Linux to "Set As Desktop Background". r=Gijs
Gnome introduced this in 2.30[0], Windows in 8[1].
Preview is just an "international prohibition symbol" to save the complicated
business of trying to calculate a semi-accurate one.

[0]
8eb0886312
https://bugzilla.gnome.org/show_bug.cgi?id=603551
[1]
https://superuser.com/questions/1061416/which-version-of-windows-introduced-the-span-wallpaper-style

Differential Revision: https://phabricator.services.mozilla.com/D23336

--HG--
extra : moz-landing-system : lando
2019-03-27 18:26:19 +00:00
Dave Townsend
26e0f46fb1 Bug 1522694: Add a toolkit level API for determining if this is the default instance of the application. r=mconley
This also switches around a few preprocessor lines to make more sense.

Differential Revision: https://phabricator.services.mozilla.com/D17557

--HG--
extra : moz-landing-system : lando
2019-01-25 20:03:15 +00:00
Dave Townsend
4980b117c6 Bug 1521902: Remove unused argument from nsIShellService.isDefaultBrowser. r=rstrong,chutten
Differential Revision: https://phabricator.services.mozilla.com/D17281

--HG--
extra : moz-landing-system : lando
2019-01-24 20:08:14 +00:00
shindli
1d09d7bee4 Backed out changeset 217865622f7a (bug 1521902) for an error in the code that will break telemetry 2019-01-22 23:28:48 +02:00
Dave Townsend
3b32c37fc4 Bug 1521902: Remove unused argument from nsIShellService.isDefaultBrowser. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D17281

--HG--
extra : moz-landing-system : lando
2019-01-22 20:41:41 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Gijs Kruitbosch
9048f58f8f Bug 1477669 - remove feed preview code and associated files/code, r=flod,mak,nika
Differential Revision: https://phabricator.services.mozilla.com/D8524

--HG--
extra : moz-landing-system : lando
2018-10-16 12:47:36 +00:00
Sylvestre Ledru
dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

Differential Revision: https://phabricator.services.mozilla.com/D8569

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Boris Zbarsky
6bf97b61c0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
Olivier Tilloy
27a9db7239 Bug 1444313 - Fix desktop file name for snapd's xdg-setting wrapper. r=mkaply
MozReview-Commit-ID: KfG8oEYArKm

--HG--
extra : rebase_source : cf82e6eeb6b8f47396c3b50f3761a3b8f2a85991
2018-03-09 09:04:25 +01:00
Olivier Tilloy
3f6577471f Bug 512305 - Use xdg-settings for Firefox Snap. r=jhorak
MozReview-Commit-ID: CJvgaLK373j

--HG--
extra : rebase_source : dc1c56ea3d42e0ef75262f9737a4404d0eea84f6
2018-03-01 10:35:03 -06:00
Jan Horak
e55996cc86 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

--HG--
extra : rebase_source : 8155c33fa9c402d2668bdfb07094ba6758fe6203
2018-01-12 16:32:53 +01:00
Jan Horak
8d50dc0b07 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

--HG--
extra : source : 9660ff09c2212cb7456e50cb166752f42e0a0669
extra : amend_source : 3c5fc61fe09b9b68bdfbb9683335cedd4d706744
2017-12-29 07:27:42 +00:00
Cosmin Sabou
43e1d34ab4 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
5b4fd25730 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

--HG--
extra : rebase_source : 36d254cbc45cbe6929cc469cd531211f7ddd6a64
2017-12-28 15:25:32 +00:00
Kyle Machulis
1cc8b01353 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo

--HG--
extra : rebase_source : 29854f1374c6ad318da0b5b68be23507667c3be4
2017-10-06 13:27:23 -07:00
Stephen A Pohl
0451201f8a 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
f941156987 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.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Nicholas Nethercote
c86dc10505 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.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00