Commit graph

53 commits

Author SHA1 Message Date
Sylvestre Ledru
14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +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
Makoto Kato
c973b2e0b9 Bug 1155505 - Part 1. Move WriteBitmap to WinUtils. r=jmathies
WriteBitmap will be used for Toast implementation, so it should be moved to
WinUtils.

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

--HG--
extra : rebase_source : b418288b52e14f62122f56dbc40e771c73fd6414
2018-03-23 16:41:58 -04:00
Ciure Andrei
7cf074453d Backed out 4 changesets (bug 1155505) for win2012 build bustages CLOSED TREE
Backed out changeset af0781ab02a6 (bug 1155505)
Backed out changeset f5e706d5a143 (bug 1155505)
Backed out changeset 5400ec20792c (bug 1155505)
Backed out changeset 82e129f7545e (bug 1155505)
2018-10-03 09:16:27 +03:00
Makoto Kato
0ecfa8ba3d Bug 1155505 - Part 1. Move WriteBitmap to WinUtils. r=jmathies
WriteBitmap will be used for Toast implementation, so it should be moved to
WinUtils.

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

--HG--
extra : rebase_source : 7ec7593fd0294dcaa6aab5e8f503b5aa752cb9d1
2018-03-23 16:41:58 -04:00
Boris Zbarsky
4783772a18 Bug 1455674 part 17. Remove use of nsIDOMElement in non-dom non-JS code. r=qdot 2018-04-26 23:37:34 -04:00
Boris Zbarsky
6bf97b61c0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04: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
Perry Jiang
45ea222ca2 Bug 1357154 - Cache Windows executable path after BinaryPath::Get is called in main. r=ehsan
MozReview-Commit-ID: Qby9b4ngz2
2017-06-22 10:56:04 -07:00
Robert Strong
9fc4161b50 Bug 692295 - Remove nsWindowsShellService's ShortcutMaintenance method and calls now that it is no longer needed. r=jimm
Removes nsIWindowsShellService.idl since there are no longer custom methods and it can just use nsIShellService.idl
Removes a couple of includes that are no longer used and should have been removed after the code to delete Firefox prefetch files was removed
2017-06-12 18:42:23 -07:00
David Major
dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Iris Hsiao
5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major
40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Matt Howell
9e7275ddcb Bug 1338843 - Use the install path to distinguish between multiple installations when checking default browser status. r=emk
MozReview-Commit-ID: DIcyAs92dm0

--HG--
extra : rebase_source : e79f69c368ec061ffeaedefb038116b5d2c30ec0
2017-02-13 15:36:28 -08:00
Carsten "Tomcat" Book
3ed98bee2a merge mozilla-inbound to mozilla-central a=merge 2017-02-10 13:49:56 +01:00
Makoto Kato
a9a70d9396 Bug 1337266 - Don't use LoadLibrary to use Vista+ API in browser/components. r=jimm
MozReview-Commit-ID: AUSwfNHqJmc
2017-02-10 16:40:19 +09:00
Matt Howell
4766e72aba Bug 1337530 - Fix Windows default browser detection. r=rstrong
In addition to fixing the bug, this patch takes the opportunity to remove a
bunch of registry handling code specific to XP and Vista, leaving only the one
officially supported default detection method for all versions above Vista.

MozReview-Commit-ID: 1I77ECJaOFk

--HG--
extra : rebase_source : d1a22f966df218e5a9030389dc2305f349d9bbd7
2017-02-08 08:37:20 -08:00
Matt Howell
ba8e2a22b0 Bug 1324617 - Allow any of multiple installations to be set as the Windows default browser; r=jimm,rstrong
Previously each new installation of any Firefox channel in any location would
just overwrite the Windows registry keys which register us as a candidate for
the default browser setting and for all of our potential file and protocol associations.

This meant that only the most recent installation (across all channels) was ever
selectable in those settings.

It also meant that creating a new installation when one was already present
tripped Windows 10's shenanigans alarm, because it saw the registration for an
existing application getting clobbered by a new one and couldn't tell that they
were really the same application.

The response to that alarm going off is to reset the default browser to Edge,
and maybe or maybe not generate a system notification about that. This is the
cause of bug 1324617. Obviously we would like to prevent that outcome.

So with this commit we generate new registration entries for each installation,
by adding a hash of the install path to the relevant identifiers.

MozReview-Commit-ID: Fz1xDtittMi

--HG--
extra : rebase_source : e0bc19e4abc1b32133f56458daf625527ce188b0
2017-01-09 08:14:00 -08:00
Sebastian Hengst
f3c9a45af9 Backed out changeset 5b0aa267bc53 (bug 1324617) for Windows build bustage (warning in CityHash.h). r=backout on a CLOSED TREE 2017-01-30 23:20:01 +01:00
Matt Howell
b50dd65754 Bug 1324617 - Allow any of multiple installations to be set as the Windows default browser; r=jimm,rstrong
Previously each new installation of any Firefox channel in any location would
just overwrite the Windows registry keys which register us as a candidate for
the default browser setting and for all of our potential file and protocol associations.

This meant that only the most recent installation (across all channels) was ever
selectable in those settings.

It also meant that creating a new installation when one was already present
tripped Windows 10's shenanigans alarm, because it saw the registration for an
existing application getting clobbered by a new one and couldn't tell that they
were really the same application.

The response to that alarm going off is to reset the default browser to Edge,
and maybe or maybe not generate a system notification about that. This is the
cause of bug 1324617. Obviously we would like to prevent that outcome.

So with this commit we generate new registration entries for each installation,
by adding a hash of the install path to the relevant identifiers.

MozReview-Commit-ID: Fz1xDtittMi

--HG--
extra : rebase_source : 3b3523c108502aebd08fd4912c3ab50baf3c0359
2017-01-09 08:14:00 -08:00
Chris Peterson
29bbf6d6b2 Bug 1331171 - Part 2: Remove Windows shell integration checks for Windows Vista. r=jimm
MozReview-Commit-ID: 8B6HnnpVP4L

--HG--
extra : rebase_source : 501ebb81dac3a56be9c64bf09d3261e570476a8d
2017-01-14 01:19:22 -08:00
Masatoshi Kimura
62f2dfa1be Bug 1302023 - Disable a workaround for Windows 10 Default apps on build 14965 or later. r=jimm
MozReview-Commit-ID: 5mKkr12n9HP

--HG--
extra : rebase_source : e66865b57232649b29401ab9a79a8346ea9efdf2
2016-11-12 01:32:24 +09:00
Enes Goktas
032c476db6 Bug 1302855 - Fold browsercomps into xul; r=bsmedberg
MozReview-Commit-ID: 8oaVngXFfh3

--HG--
extra : rebase_source : 2f5e770d04bd3f75778f242e3866b141df5bbff4
2016-09-27 19:54:37 -07:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Masatoshi Kimura
24dc7a411b Bug 1251819 - Use the classic Control Panel if the Settings app believes the current Windows logon is a Microsoft account while actually it is not. r=jimm 2016-04-02 08:17:16 +09:00
Masatoshi Kimura
16881de41a Bug 1250781 - Scroll "Default apps" into the default browser option. r=Gijs 2016-02-25 07:10:35 +09:00
Jared Wein
d07d8912ea Bug 1240892 - Disable default-app hash storage. r=dolske 2016-01-22 10:12:00 +01:00
Jared Wein
b82fbe3699 Bug 1238712 - Move duplicated shell-service code to a shared JSM. r=gijs
--HG--
extra : commitid : 5Dm73Qky4vC
extra : rebase_source : 081f9eb19df15bcde305e87dbacea64cfe488249
2016-01-15 12:35:15 -05:00
Jared Wein
915b8a3c39 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
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Jared Wein
16291276a6 Bug 1208000 - Default browser dialog appears only 2 times. r=Gijs 2015-09-24 14:18:00 +02:00
Jared Wein
14a9ae9eba 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
Masatoshi Kimura
da9449810b Bug 1184508 - Remember registry hash for later use on Win8+. r=jimm 2015-07-22 19:31:06 +09:00
Jared Wein
4c76119380 Bug 1183682 - Remove the default browser A/B test for Windows 10 (keep Settings approach). r=gijs
--HG--
extra : rebase_source : 8de483780e8e15b441c1fa0023d4afce4eefb91c
2015-07-15 10:36:55 -04:00
Emanuel Hoogeveen
7d1e52f2ff Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Brian R. Bondy
2516e68ef2 Bug 791501 - Default Programs UI should select Firefox by default. r=jimm 2015-06-27 12:27:26 +09:00
Jared Wein
afe10708a8 Bug 1176112 - A/B test for default browser setting UI on Windows 10. r=Gijs
--HG--
extra : rebase_source : 567e89eb9c618d01e943579ab06d9511dba2dc76
2015-06-20 01:16:05 -04:00
Masatoshi Kimura
734970163c Bug 1172724 - Use the "openas" verb to select the default HTTP handler on Windows 10. r=jaws, jimm 2015-06-19 08:16:52 +09:00
Jared Wein
f3d985358c Bug 1167294 - Launch the modern Settings app when setting the default browser on Windows 10. r=jimm,Gijs
--HG--
extra : rebase_source : 4739b173a9885404a6393f47416904f6f7604891
2015-06-03 11:40:40 -04:00
Hector Zhao
fa633b0513 Bug 1138807 - Treat user cancelling of HTTPHandlerPane as Success. r=jimm 2015-03-03 12:55:50 +08:00