Commit Graph

56 Commits

Author SHA1 Message Date
Kyle Machulis
a28c2eeaf2 Backing out 8fd1d4a79a48 (Bug 952453) due to notification bustage on MacOS
MozReview-Commit-ID: BeziRSoUvh2
2018-01-04 14:50:21 -08:00
Kyle Machulis
a2d6953beb Bug 952453 - Remove mozNotification; r=baku
MozReview-Commit-ID: 5wAa5mYFDq4
2017-12-10 12:40:05 -08:00
shindli
490bbfc5b2 Backed out 2 changesets (bug 1424571, bug 952453) for FATAL ERROR PROCESSING MOZBUILD FILE r=backout on a CLOSED TREE
Backed out changeset c05f6d6df510 (bug 1424571)
Backed out changeset 2e682c1841a1 (bug 952453)
2017-12-10 07:46:19 +02:00
Kyle Machulis
a85e9841b3 Bug 952453 - Remove mozNotification; r=baku
MozReview-Commit-ID: 5wAa5mYFDq4
2017-12-09 21:25:56 -08: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
Kit Cambridge
e3035ec49c Bug 1359290 - Fix "notifiction" typos. r=markh
MozReview-Commit-ID: 1d9QQUQckQW
2017-04-24 18:51:45 -07:00
William Chen
ffb414a896 Bug 862395 - Part 1: Add requireInteraction property to web notifications. r=baku 2016-10-12 17:27:40 -07: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
Kit Cambridge
6fd2d10f8e Bug 1233086, Part 3 - Use unified image loading for OS X alerts. r=mstange
MozReview-Commit-ID: Ln5rHIj8xxI
2016-06-10 18:59:25 -07:00
Josh Aas
b478d827ec Bug 1257765 - Limit the length of notification strings to 5000 characters. r=spohl 2016-06-26 18:51:05 -04:00
SUN Haitao
86fce9587d Bug 1264815 - Add a 'showPersistentNotification' method to nsIAlertService. r=kcambridge 2016-05-12 23:58:18 +08:00
Carsten "Tomcat" Book
102154539f Backed out changeset 8f6cc2d22ba7 (bug 1264815) 2016-05-31 07:05:04 +02:00
SUN Haitao
4a2fec21d7 Bug 1264815 - Add a 'showPersistentNotification' method to nsIAlertService. r=kcambridge 2016-05-12 23:58:18 +08:00
Jonathan Watt
29b7b0d8c3 Bug 1275266 - Rename imgLoader::Singleton and imgLoader::PBSingleton to something less misleading, and document them. r=tnikkel 2016-05-19 13:31:15 +01:00
Jonathan Watt
7f4af30d23 Bug 1274881 - Get rid of imgLoader::GetInstance. r=tnikkel 2016-05-18 10:19:19 +01:00
Christoph Kerschbaumer
8ffee19dd7 Bug 1256999 - Pass the right context to new channels for image loads. r=bz r=seth 2016-04-11 10:58:03 +02:00
Kit Cambridge
fcb78b84be Bug 1224785, Part 2 - Show the site favicon in OS X notifications. r=mstange
MozReview-Commit-ID: L7d00xEY6Ka
2016-01-07 13:16:54 -07:00
Kit Cambridge
1f67dabaf7 Bug 1219855, Part 3 - Fix variable shadowing in OSXNotificationCenter::ShowAlert. r=me 2016-01-13 23:26:41 -07:00
Kit Cambridge
2aa4705a88 Bug 1219855, Part 1 - Make nsXULAlerts implement nsIAlertsService. r=MattN,wchen 2015-12-31 13:27:09 -07:00
Kit Cambridge
f2f6640ce7 Bug 1227300, Part 3 - Implement showAlert for the OS X alerts backend. r=mstange 2015-12-31 12:08:22 -07:00
Kit Cambridge
c2c12f4c90 Bug 1224738 - Fix alternate action index getter name on OS X. r=MattN 2015-11-16 13:09:38 -08:00
Kit Cambridge
2a035371c0 Bug 1220337 - Don't show alternate notification actions on OS X 10.8. r=MattN 2015-11-10 11:23:13 -08:00
Josh Aas
348f0ab75e Bug 1221449: Add null ptr check and fix variable shadowing in OSXNotificationCenter.mm. r=spohl 2015-11-07 18:23:00 +09:00
Makoto Kato
32db2e3207 Bug 1218315 - Replace NS_LITERAL_STRING(...).get() with MOZ_UTF16(...) on widget. r=nfroyd 2015-10-28 14:28:06 +09:00
Jared Wein
dbd4199caf Bug 1209602 - XUL: Implement disabling notifications for a site. r=MattN 2015-10-15 22:58:56 -04:00
Nathan Froyd
4e6d8f6705 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
2015-10-18 01:24:48 -04:00
Wes Kocher
a7c3e82868 Backed out changeset 91d4539e00ce (bug 1207245) 2015-10-07 10:19:19 -07:00
Nathan Froyd
0b009681ad 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.

 # 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
2015-10-07 16:50:25 -04:00
Kit Cambridge
539ff8ef02 Bug 1202933, Part 2 - Show the origin for OS X notifications. r=MattN,wchen 2015-10-05 19:48:05 -07:00
Matthew Noorenberghe
a5d3c20581 Bug 1208295 - Show an additional action on OS X notifications to open notification settings. r=mstange 2015-09-25 13:18:29 -07:00
Wes Kocher
aefeda7d18 Backed out 3 changesets (bug 1208295) for build bustage CLOSED TREE
Backed out changeset ba930740225e (bug 1208295)
Backed out changeset 54f38580e0b8 (bug 1208295)
Backed out changeset a5907e5982a8 (bug 1208295)
2015-10-05 12:20:47 -07:00
Matthew Noorenberghe
42b5f4b998 Bug 1208295 - Show an additional action on OS X notifications to open notification settings. r=mstange 2015-09-25 13:18:29 -07:00
Kartikaya Gupta
ad6b4e8fa5 Bug 1205399 - Follow-up to fix build bustage for platforms without OS X 10.10 and -Wswitch enabled. r=mstange 2015-09-30 12:48:45 -04:00
Wes Kocher
11a7af3dcd Backed out 3 changesets (bug 1208295) for browser_offlineQuotaNotification.js bustage CLOSED TREE
Backed out changeset 1c16e9f4aa2f (bug 1208295)
Backed out changeset 3242ff9a86bb (bug 1208295)
Backed out changeset 04f2a2c320a3 (bug 1208295)
2015-09-25 18:20:35 -07:00
Matthew Noorenberghe
bf57ad6714 Bug 1205399 - Fix OS X crash when no alert principal is passed. r=bustage 2015-09-25 16:10:56 -07:00
Matthew Noorenberghe
c9cba70821 Bug 1208295 - Show an additional action on OS X notifications to open notification settings. r=mstange 2015-09-25 13:18:29 -07:00
Matthew Noorenberghe
2e2a3969f5 Bug 1205399 - OS X: Implement disabling Notifications for the site from the native notifications. r=mstange 2015-09-25 13:18:29 -07:00
Christoph Kerschbaumer
0e075876c3 Bug 1048048 - add preload content policy types for images (r=seth) 2015-09-20 14:55:59 -07:00
Wes Kocher
7e27875d2c Backed out 7 changesets (bug 1048048) for android crashes in various chunks CLOSED TREE
Backed out changeset b5abe23a4ea5 (bug 1048048)
Backed out changeset 4f91b10e8be0 (bug 1048048)
Backed out changeset 450d4a13c90e (bug 1048048)
Backed out changeset 6a727c40eb68 (bug 1048048)
Backed out changeset 88c2333ff745 (bug 1048048)
Backed out changeset 740ab1ecd079 (bug 1048048)
Backed out changeset 02c6d6aef163 (bug 1048048)
2015-09-21 09:08:34 -07:00
Christoph Kerschbaumer
46f476eda8 Bug 1048048 - add preload content policy types for images (r=seth) 2015-09-20 14:55:59 -07:00
Ehsan Akhgari
02d309afa1 Bug 1106116 - Load images for notifications triggered from private browsing windows as private; r=jdm 2014-11-28 14:08:29 -05:00
Sid Stamm
29bcaaf68b Bug 704320 - apply referrer policies to image loads (r=seth) 2014-11-18 08:46:53 -05:00
Seth Fowler
3f6865afd7 Bug 1084136 (Part 3) - Don't reset image status flags on error. r=tn 2014-11-06 17:33:57 -08:00
John Schoenick
a1fa52f944 Bug 1055750 - Part 3 - Track image vs imageset request load type through ImageLoadingContent::LoadImage r=bz,tanvi 2014-10-24 14:00:14 -07:00
Christoph Kerschbaumer
17e43a4437 Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-10-15 19:11:45 -07:00
Robert Bindar
a0e0e8b231 Bug 899585 - Add custom data support in the Notification constructor r=baku 2014-08-20 17:56:12 -07:00
Ehsan Akhgari
3be29eb488 Bug 1005036 - Make OSXNotificationInfo not use mozilla::RefCounted; r=josh 2014-05-02 12:42:31 -04:00
Birunthan Mohanathas
eeb9aaaa94 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Adrian Lungu
53c9888d1b Bug 822480 - Add in the Resource Timing API. r=honzab, r=jst 2013-10-15 18:35:44 -07:00