Update to 36

This commit is contained in:
Jan Horak 2015-02-20 10:36:49 +01:00
parent 1c8e85a305
commit 8a0ee5a752
7 changed files with 433 additions and 505 deletions

2
.gitignore vendored
View File

@ -121,3 +121,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-35.0-20150109.tar.xz
/firefox-35.0.1.source.tar.bz2
/firefox-langpacks-35.0.1-20150123.tar.xz
/firefox-36.0.source.tar.bz2
/firefox-langpacks-36.0-20150220.tar.xz

View File

@ -106,14 +106,14 @@
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 35.0.1
Release: 5%{?pre_tag}%{?dist}
Version: 36.0
Release: 1%{?pre_tag}%{?dist}
URL: http://www.mozilla.org/projects/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
Source0: ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.bz2
%if %{build_langpacks}
Source1: firefox-langpacks-%{version}%{?pre_version}-20150123.tar.xz
Source1: firefox-langpacks-%{version}%{?pre_version}-20150220.tar.xz
%endif
Source10: firefox-mozconfig
Source11: firefox-mozconfig-branded
@ -143,14 +143,12 @@ Patch220: rhbz-1014858.patch
Patch221: firefox-fedora-ua.patch
# Upstream patches
Patch300: mozilla-858919.patch
Patch301: mozilla-1097550-dict-fix.patch
Patch301: mozilla-1129859-dictfix2.patch
# Gtk3 upstream patches
Patch404: mozilla-1101582.patch
Patch405: mozilla-1073117-check.patch
Patch406: mozilla-1073117-color.patch
Patch407: mozilla-1097592.patch
Patch408: mozilla-1110211.patch
Patch409: mozilla-1073117-entry-button-size.patch
Patch410: mozilla-1073117-button-focus.patch
@ -299,14 +297,12 @@ cd %{tarballdir}
%patch221 -p2 -b .fedora-ua
# Upstream patches
%patch300 -p1 -b .858919
%patch301 -p1 -b .1097550-dict-fix
%patch301 -p1 -b .dict-fix
%if %{toolkit_gtk3}
%patch404 -p1 -b .1101582
%patch405 -p1 -b .1073117-check
%patch406 -p1 -b .1073117-color
%patch407 -p1 -b .1097592
%patch408 -p2 -b .1110211
%patch409 -p1 -b .1073117-entry-button-size
%patch410 -p1 -b .1073117-button-focus
@ -750,10 +746,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/defaults/pref/channel-prefs.js
%{mozappdir}/dependentlibs.list
%{mozappdir}/dictionaries
%{mozappdir}/mozilla-xremote-client
#%{mozappdir}/mozilla-xremote-client
%{mozappdir}/omni.ja
%{mozappdir}/platform.ini
%{mozappdir}/plugin-container
%{mozappdir}/gmp-clearkey
%exclude %{_includedir}
%exclude %{_libdir}/firefox-devel-%{version}
%exclude %{_datadir}/idl
@ -766,6 +763,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Fri Feb 20 2015 Jan Horak <jhorak@redhat.com> - 36.0-1
- Update to 36.0
* Mon Feb 9 2015 Martin Stransky <stransky@redhat.com> - 35.0.1-5
- Fixed rhbz#1190774 - update usear agent string for Fedora

View File

@ -1,72 +0,0 @@
diff -up mozilla-release/editor/composer/nsEditorSpellCheck.cpp.1097550-dict-fix mozilla-release/editor/composer/nsEditorSpellCheck.cpp
--- mozilla-release/editor/composer/nsEditorSpellCheck.cpp.1097550-dict-fix 2014-11-26 03:17:14.000000000 +0100
+++ mozilla-release/editor/composer/nsEditorSpellCheck.cpp 2014-12-04 16:45:07.192923283 +0100
@@ -103,6 +103,23 @@ GetLoadContext(nsIEditor* aEditor)
}
/**
+ * Helper function for converting underscore to dash in dictionary name,
+ * ie. en_CA to en-CA. This is required for some Linux distributions which
+ * use underscore as separator in system-wide installed dictionaries.
+ * We use it for nsStyleUtil::DashMatchCompare.
+ */
+static nsString
+GetDictNameWithDash(const nsAString& aDictName)
+{
+ nsString dictNameWithDash(aDictName);
+ int32_t underScore = dictNameWithDash.FindChar('_');
+ if (underScore != -1) {
+ dictNameWithDash.Replace(underScore, 1, '-');
+ }
+ return dictNameWithDash;
+}
+
+/**
* Fetches the dictionary stored in content prefs and maintains state during the
* fetch, which is asynchronous.
*/
@@ -606,8 +623,8 @@ nsEditorSpellCheck::SetCurrentDictionary
} else {
langCode.Assign(aDictionary);
}
-
- if (mPreferredLang.IsEmpty() || !nsStyleUtil::DashMatchCompare(mPreferredLang, langCode, comparator)) {
+ if (mPreferredLang.IsEmpty() ||
+ !nsStyleUtil::DashMatchCompare(GetDictNameWithDash(mPreferredLang), langCode, comparator)) {
// When user sets dictionary manually, we store this value associated
// with editor url.
StoreCurrentDictionary(mEditor, aDictionary);
@@ -763,12 +780,6 @@ nsEditorSpellCheck::DictionaryFetched(Di
// otherwise, get language from preferences
nsAutoString preferedDict(Preferences::GetLocalizedString("spellchecker.dictionary"));
- // Replace '_' with '-' in case the user has an underscore stored in their
- // pref, see bug 992118 for how this could have happened.
- int32_t underScore = preferedDict.FindChar('_');
- if (underScore != -1) {
- preferedDict.Replace(underScore, 1, '-');
- }
if (dictName.IsEmpty()) {
dictName.Assign(preferedDict);
}
@@ -807,8 +818,8 @@ nsEditorSpellCheck::DictionaryFetched(Di
// try dictionary.spellchecker preference if it starts with langCode (and
// if we haven't tried it already)
- if (!preferedDict.IsEmpty() && !dictName.Equals(preferedDict) &&
- nsStyleUtil::DashMatchCompare(preferedDict, langCode, comparator)) {
+ if (!preferedDict.IsEmpty() && !dictName.Equals(preferedDict) &&
+ nsStyleUtil::DashMatchCompare(GetDictNameWithDash(preferedDict), langCode, comparator)) {
rv = SetCurrentDictionary(preferedDict);
}
@@ -836,8 +847,7 @@ nsEditorSpellCheck::DictionaryFetched(Di
// We have already tried it
continue;
}
-
- if (nsStyleUtil::DashMatchCompare(dictStr, langCode, comparator) &&
+ if (nsStyleUtil::DashMatchCompare(GetDictNameWithDash(dictStr), langCode, comparator) &&
NS_SUCCEEDED(SetCurrentDictionary(dictStr))) {
break;
}

View File

@ -1,56 +0,0 @@
# HG changeset patch
# Parent 64206634959a2e84eefec40d1da0122c7a63bc20
# User Martin Stransky <stransky@redhat.com>
Bug 1097592 - Don't use PR_FindFunctionSymbolAndLibrary to avoid app freeze, r=?karlt
diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c
--- a/widget/gtk/mozgtk/mozgtk.c
+++ b/widget/gtk/mozgtk/mozgtk.c
@@ -116,16 +116,17 @@ STUB(gdk_x11_display_get_user_time)
STUB(gdk_x11_display_get_xdisplay)
STUB(gdk_x11_get_default_root_xwindow)
STUB(gdk_x11_get_default_xdisplay)
STUB(gdk_x11_get_xatom_by_name)
STUB(gdk_x11_lookup_xdisplay)
STUB(gdk_x11_screen_get_xscreen)
STUB(gdk_x11_visual_get_xvisual)
STUB(gdk_x11_window_lookup_for_display)
+STUB(gdk_x11_window_set_user_time)
STUB(gdk_x11_xatom_to_atom)
STUB(gtk_accel_label_new)
STUB(gtk_alignment_get_type)
STUB(gtk_alignment_new)
STUB(gtk_alignment_set_padding)
STUB(gtk_arrow_get_type)
STUB(gtk_arrow_new)
STUB(gtk_bindings_activate)
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1290,24 +1290,18 @@ SetUserTimeAndStartupIDForActivatedWindo
sn_launchee_context_new(snd, gdk_screen_get_number(screen),
desktopStartupID.get());
if (!ctx) {
sn_display_unref(snd);
return;
}
if (sn_launchee_context_get_id_has_timestamp(ctx)) {
- PRLibrary* gtkLibrary;
- SetUserTimeFunc setUserTimeFunc = (SetUserTimeFunc)
- PR_FindFunctionSymbolAndLibrary("gdk_x11_window_set_user_time", &gtkLibrary);
- if (setUserTimeFunc) {
- setUserTimeFunc(gdkWindow, sn_launchee_context_get_timestamp(ctx));
- PR_UnloadLibrary(gtkLibrary);
- }
- }
+ gdk_x11_window_set_user_time(gdkWindow, sn_launchee_context_get_timestamp(ctx));
+ }
sn_launchee_context_setup_window(ctx, gdk_x11_window_get_xid(gdkWindow));
sn_launchee_context_complete(ctx);
sn_launchee_context_unref(ctx);
sn_display_unref(snd);
#endif

View File

@ -0,0 +1,419 @@
# HG changeset patch
# Parent 58ce6051edf56ce70c1a62e88bd879a6e56d9239
# User Jan Horak <jhorak@redhat.com>
# Bug 1129859 - Always use '-' as separator between lang-region in dictionary names, fixes problems with system dictionaries which has '_' as separator
try: -b do -p all -u all -t none
diff --git a/editor/composer/nsEditorSpellCheck.cpp b/editor/composer/nsEditorSpellCheck.cpp
--- a/editor/composer/nsEditorSpellCheck.cpp
+++ b/editor/composer/nsEditorSpellCheck.cpp
diff --git a/extensions/spellcheck/hunspell/src/mozHunspell.cpp b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
--- a/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -485,16 +485,19 @@ mozHunspell::LoadDictionariesFromDir(nsI
rv = file->Exists(&check);
if (NS_FAILED(rv) || !check)
continue;
#ifdef DEBUG_bsmedberg
printf("Adding dictionary: %s\n", NS_ConvertUTF16toUTF8(dict).get());
#endif
+ // Replace '_' separator with '-'
+ dict.ReplaceChar("_", '-');
+
mDictionaries.Put(dict, file);
}
return NS_OK;
}
nsresult mozHunspell::ConvertCharset(const char16_t* aStr, char ** aDst)
{
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.aff b/extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.dic b/extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.sug b/extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.test b/extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.test
rename from extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.test
rename to extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.wrong b/extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/1463589_utf.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/1463589-utf.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.aff b/extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.dic b/extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.good b/extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.good
rename from extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.good
rename to extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.sug b/extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.test b/extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.test
rename from extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.test
rename to extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.wrong b/extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/allcaps_utf.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/allcaps-utf.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/base_utf.aff b/extensions/spellcheck/hunspell/tests/unit/data/base-utf.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/base_utf.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/base-utf.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/base_utf.dic b/extensions/spellcheck/hunspell/tests/unit/data/base-utf.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/base_utf.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/base-utf.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/base_utf.good b/extensions/spellcheck/hunspell/tests/unit/data/base-utf.good
rename from extensions/spellcheck/hunspell/tests/unit/data/base_utf.good
rename to extensions/spellcheck/hunspell/tests/unit/data/base-utf.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/base_utf.sug b/extensions/spellcheck/hunspell/tests/unit/data/base-utf.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/base_utf.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/base-utf.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/base_utf.test b/extensions/spellcheck/hunspell/tests/unit/data/base-utf.test
rename from extensions/spellcheck/hunspell/tests/unit/data/base_utf.test
rename to extensions/spellcheck/hunspell/tests/unit/data/base-utf.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/base_utf.wrong b/extensions/spellcheck/hunspell/tests/unit/data/base-utf.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/base_utf.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/base-utf.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/colons_in_words.aff b/extensions/spellcheck/hunspell/tests/unit/data/colons-in-words.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/colons_in_words.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/colons-in-words.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/colons_in_words.dic b/extensions/spellcheck/hunspell/tests/unit/data/colons-in-words.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/colons_in_words.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/colons-in-words.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/colons_in_words.test b/extensions/spellcheck/hunspell/tests/unit/data/colons-in-words.test
rename from extensions/spellcheck/hunspell/tests/unit/data/colons_in_words.test
rename to extensions/spellcheck/hunspell/tests/unit/data/colons-in-words.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/condition_utf.aff b/extensions/spellcheck/hunspell/tests/unit/data/condition-utf.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/condition_utf.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/condition-utf.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/condition_utf.dic b/extensions/spellcheck/hunspell/tests/unit/data/condition-utf.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/condition_utf.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/condition-utf.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/condition_utf.good b/extensions/spellcheck/hunspell/tests/unit/data/condition-utf.good
rename from extensions/spellcheck/hunspell/tests/unit/data/condition_utf.good
rename to extensions/spellcheck/hunspell/tests/unit/data/condition-utf.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/condition_utf.test b/extensions/spellcheck/hunspell/tests/unit/data/condition-utf.test
rename from extensions/spellcheck/hunspell/tests/unit/data/condition_utf.test
rename to extensions/spellcheck/hunspell/tests/unit/data/condition-utf.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/condition_utf.wrong b/extensions/spellcheck/hunspell/tests/unit/data/condition-utf.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/condition_utf.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/condition-utf.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.aff b/extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.dic b/extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.test b/extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.test
rename from extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.test
rename to extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.wrong b/extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/digits_in_words.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/digits-in-words.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.aff b/extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.dic b/extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.good b/extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.good
rename from extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.good
rename to extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.sug b/extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.test b/extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.test
rename from extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.test
rename to extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.wrong b/extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/ngram_utf_fix.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/ngram-utf-fix.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.aff b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.dic b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.good b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.good
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.good
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.test b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.test
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.test
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.wrong b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.aff b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.dic b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.good b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.good
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.good
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.test b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.test
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.test
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.wrong b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_cpdpat2.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-cpdpat2.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.aff b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.dic b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.good b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.good
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.good
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.sug b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.test b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.test
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.test
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.wrong b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword1.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword1.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.aff b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.dic b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.good b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.good
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.good
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.sug b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.test b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.test
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.test
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.wrong b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_forbiddenword2.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-forbiddenword2.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.aff b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.dic b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.good b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.good
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.good
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.sug b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.test b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.test
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.test
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.wrong b/extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/opentaal_keepcase.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/opentaal-keepcase.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.aff b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.dic b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.good b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.good
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.good
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.test b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.test
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom.test
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.aff b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.dic b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.good b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.good
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.good
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.test b/extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.test
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_bom2.test
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-bom2.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.aff b/extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.aff
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.aff
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.aff
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.dic b/extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.dic
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.dic
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.dic
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.good b/extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.good
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.good
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.good
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.sug b/extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.sug
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.sug
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.sug
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.test b/extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.test
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.test
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.test
diff --git a/extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.wrong b/extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.wrong
rename from extensions/spellcheck/hunspell/tests/unit/data/utf8_nonbmp.wrong
rename to extensions/spellcheck/hunspell/tests/unit/data/utf8-nonbmp.wrong
diff --git a/extensions/spellcheck/hunspell/tests/unit/test_hunspell.js b/extensions/spellcheck/hunspell/tests/unit/test_hunspell.js
--- a/extensions/spellcheck/hunspell/tests/unit/test_hunspell.js
+++ b/extensions/spellcheck/hunspell/tests/unit/test_hunspell.js
@@ -3,21 +3,21 @@
*/
const Cc = Components.classes;
const Ci = Components.interfaces;
const tests = [
["affixes", "iso-8859-1"],
["condition", "iso-8859-1"],
- ["condition_utf", "UTF-8"],
+ ["condition-utf", "UTF-8"],
["base", "iso-8859-1"],
- ["base_utf", "UTF-8"],
+ ["base-utf", "UTF-8"],
["allcaps", "iso-8859-1"],
- ["allcaps_utf", "UTF-8"],
+ ["allcaps-utf", "UTF-8"],
["allcaps2", "iso-8859-1"],
["allcaps3", "iso-8859-1"],
["keepcase", "iso-8859-1"],
["i58202", "iso-8859-1"],
["map", "iso-8859-1"],
["rep", "iso-8859-1"],
["sug", "iso-8859-1"],
["sugutf", "UTF-8"],
@@ -43,19 +43,19 @@ const tests = [
["fogemorpheme", "iso-8859-1"],
["onlyincompound", "iso-8859-1"],
["complexprefixes", "iso-8859-1"],
["complexprefixes2", "iso-8859-1"],
["complexprefixesutf", "UTF-8"],
["conditionalprefix", "iso-8859-1"],
["zeroaffix", "iso-8859-1"],
["utf8", "UTF-8"],
- ["utf8_bom", "UTF-8", {1: "todo"}],
- ["utf8_bom2", "UTF-8", {1: "todo"}],
- ["utf8_nonbmp", "UTF-8", {1: "todo", 2: "todo", 3: "todo", 4: "todo"}],
+ ["utf8-bom", "UTF-8", {1: "todo"}],
+ ["utf8-bom2", "UTF-8", {1: "todo"}],
+ ["utf8-nonbmp", "UTF-8", {1: "todo", 2: "todo", 3: "todo", 4: "todo"}],
["compoundflag", "iso-8859-1"],
["compoundrule", "iso-8859-1"],
["compoundrule2", "iso-8859-1"],
["compoundrule3", "iso-8859-1"],
["compoundrule4", "iso-8859-1"],
["compoundrule5", "UTF-8"],
["compoundrule6", "iso-8859-1"],
["compoundrule7", "iso-8859-1"],
@@ -86,43 +86,43 @@ const tests = [
["reputf", "UTF-8"],
["ignore", "iso-8859-1"],
["ignoreutf", "UTF-8",
{1: "todo", 2: "todo", 3: "todo", 4: "todo", 5: "todo", 6: "todo",
7: "todo", 8: "todo"}],
["1592880", "iso-8859-1"],
["1695964", "iso-8859-1"],
["1463589", "iso-8859-1"],
- ["1463589_utf", "UTF-8"],
+ ["1463589-utf", "UTF-8"],
["IJ", "iso-8859-1"],
["i68568", "iso-8859-1"],
["i68568utf", "UTF-8"],
["1706659", "iso-8859-1"],
- ["digits_in_words", "iso-8859-1"],
-// ["colons_in_words", "iso-8859-1"], Suggestion test only
- ["ngram_utf_fix", "UTF-8"],
+ ["digits-in-words", "iso-8859-1"],
+// ["colons-in-words", "iso-8859-1"], Suggestion test only
+ ["ngram-utf-fix", "UTF-8"],
["morph", "us-ascii",
{11: "todo", 12: "todo", 13: "todo", 14: "todo", 15: "todo", 16: "todo",
17: "todo", 18: "todo", 19: "todo", 20: "todo", 21: "todo", 22: "todo",
23: "todo", 24: "todo", 25: "todo", 26: "todo", 27: "todo"}],
["1975530", "UTF-8"],
["fullstrip", "iso-8859-1"],
["iconv", "UTF-8"],
["oconv", "UTF-8"],
["encoding", "iso-8859-1", {1: "todo", 3: "todo"}],
["korean", "UTF-8"],
- ["opentaal_forbiddenword1", "UTF-8"],
- ["opentaal_forbiddenword2", "UTF-8"],
- ["opentaal_keepcase", "UTF-8"],
+ ["opentaal-forbiddenword1", "UTF-8"],
+ ["opentaal-forbiddenword2", "UTF-8"],
+ ["opentaal-keepcase", "UTF-8"],
["arabic", "UTF-8"],
["2970240", "iso-8859-1"],
["2970242", "iso-8859-1"],
["breakoff", "iso-8859-1"],
- ["opentaal_cpdpat", "iso-8859-1"],
- ["opentaal_cpdpat2", "iso-8859-1"],
+ ["opentaal-cpdpat", "iso-8859-1"],
+ ["opentaal-cpdpat2", "iso-8859-1"],
["2999225", "iso-8859-1"],
["onlyincompound2", "iso-8859-1"],
["forceucase", "iso-8859-1"],
["warn", "iso-8859-1"]
];
function do_get_file_by_line(file, charset) {
dump("getting file by line for file " + file.path + "\n");
diff --git a/extensions/spellcheck/tests/chrome/test_add_remove_dictionaries.xul b/extensions/spellcheck/tests/chrome/test_add_remove_dictionaries.xul
--- a/extensions/spellcheck/tests/chrome/test_add_remove_dictionaries.xul
+++ b/extensions/spellcheck/tests/chrome/test_add_remove_dictionaries.xul
@@ -63,26 +63,26 @@ function RunTest() {
ok(map.exists());
hunspell.addDirectory(map);
Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
onSpellCheck(textbox, function () {
// test that base and map dictionaries are available
var dicts = getDictionaryList(editor);
- isnot(dicts.indexOf("base_utf"), -1, "base is available");
+ isnot(dicts.indexOf("base-utf"), -1, "base is available");
isnot(dicts.indexOf("maputf"), -1, "map is available");
// select base dictionary
- setCurrentDictionary(editor, "base_utf");
+ setCurrentDictionary(editor, "base-utf");
onSpellCheck(textbox, function () {
// test that base dictionary is in use
is(getMisspelledWords(editor), "Frühstück" + "qwertyu", "base misspellings");
- is(getCurrentDictionary(editor), "base_utf", "current dictionary");
+ is(getCurrentDictionary(editor), "base-utf", "current dictionary");
// select map dictionary
setCurrentDictionary(editor, "maputf");
onSpellCheck(textbox, function () {
// test that map dictionary is in use
is(getMisspelledWords(editor), "created" + "imply" + "tomorrow" + "qwertyu", "map misspellings");
is(getCurrentDictionary(editor), "maputf", "current dictionary");
@@ -92,17 +92,17 @@ function RunTest() {
onSpellCheck(textbox, function () {
// test that map dictionary is not in use
isnot(getMisspelledWords(editor), "created" + "imply" + "tomorrow" + "qwertyu", "map misspellings");
isnot(getCurrentDictionary(editor), "maputf", "current dictionary");
// test that base dictionary is available and map dictionary is unavailable
var dicts = getDictionaryList(editor);
- isnot(dicts.indexOf("base_utf"), -1, "base is available");
+ isnot(dicts.indexOf("base-utf"), -1, "base is available");
is(dicts.indexOf("maputf"), -1, "map is unavailable");
// uninstall base dictionary
hunspell.removeDirectory(base);
onSpellCheck(textbox, function () {
SimpleTest.finish();
});

View File

@ -1,365 +0,0 @@
diff -up mozilla-release/toolkit/components/alerts/nsAlertsService.cpp.858919 mozilla-release/toolkit/components/alerts/nsAlertsService.cpp
--- mozilla-release/toolkit/components/alerts/nsAlertsService.cpp.858919 2014-11-26 03:17:37.000000000 +0100
+++ mozilla-release/toolkit/components/alerts/nsAlertsService.cpp 2014-12-01 11:58:31.896101722 +0100
@@ -100,10 +100,12 @@ NS_IMETHODIMP nsAlertsService::ShowAlert
nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));
nsresult rv;
if (sysAlerts) {
- return sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
- aAlertCookie, aAlertListener, aAlertName,
- aBidi, aLang, aData,
- IPC::Principal(aPrincipal));
+ rv = sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
+ aAlertCookie, aAlertListener, aAlertName,
+ aBidi, aLang, aData,
+ IPC::Principal(aPrincipal));
+ if (NS_SUCCEEDED(rv))
+ return NS_OK;
}
if (!ShouldShowAlert()) {
diff -up mozilla-release/toolkit/system/gnome/moz.build.858919 mozilla-release/toolkit/system/gnome/moz.build
--- mozilla-release/toolkit/system/gnome/moz.build.858919 2014-11-26 03:17:39.000000000 +0100
+++ mozilla-release/toolkit/system/gnome/moz.build 2014-12-01 11:58:31.896101722 +0100
@@ -5,7 +5,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
+ 'nsAlertsIconListener.cpp',
'nsGnomeModule.cpp',
+ 'nsSystemAlertsService.cpp',
]
if CONFIG['MOZ_ENABLE_GCONF']:
diff -up mozilla-release/toolkit/system/gnome/nsAlertsIconListener.cpp.858919 mozilla-release/toolkit/system/gnome/nsAlertsIconListener.cpp
--- mozilla-release/toolkit/system/gnome/nsAlertsIconListener.cpp.858919 2014-11-26 03:17:39.000000000 +0100
+++ mozilla-release/toolkit/system/gnome/nsAlertsIconListener.cpp 2014-12-01 12:00:39.455960137 +0100
@@ -51,6 +51,21 @@ static void notify_closed_marshal(GClosu
NS_RELEASE(alert);
}
+static GdkPixbuf*
+GetPixbufFromImgRequest(imgIRequest* aRequest)
+{
+ nsCOMPtr<imgIContainer> image;
+ nsresult rv = aRequest->GetImage(getter_AddRefs(image));
+ if (NS_FAILED(rv)) {
+ return nullptr;
+ }
+
+ nsCOMPtr<nsIImageToPixbuf> imgToPixbuf =
+ do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1");
+
+ return imgToPixbuf->ConvertImageToPixbuf(image);
+}
+
NS_IMPL_ISUPPORTS(nsAlertsIconListener, imgINotificationObserver,
nsIObserver, nsISupportsWeakReference)
@@ -106,15 +121,15 @@ nsAlertsIconListener::Notify(imgIRequest
nsresult
nsAlertsIconListener::OnStopRequest(imgIRequest* aRequest)
{
+ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!");
+
uint32_t imgStatus = imgIRequest::STATUS_ERROR;
nsresult rv = aRequest->GetImageStatus(&imgStatus);
NS_ENSURE_SUCCESS(rv, rv);
if (imgStatus == imgIRequest::STATUS_ERROR && !mLoadedFrame) {
// We have an error getting the image. Display the notification with no icon.
ShowAlert(nullptr);
- }
- if (mIconRequest) {
mIconRequest->Cancel(NS_BINDING_ABORTED);
mIconRequest = nullptr;
}
@@ -124,29 +139,25 @@ nsAlertsIconListener::OnStopRequest(imgI
nsresult
nsAlertsIconListener::OnStopFrame(imgIRequest* aRequest)
{
- if (aRequest != mIconRequest)
- return NS_ERROR_FAILURE;
+ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!");
if (mLoadedFrame)
return NS_OK; // only use one frame
- nsCOMPtr<imgIContainer> image;
- nsresult rv = aRequest->GetImage(getter_AddRefs(image));
- if (NS_FAILED(rv))
- return rv;
-
- nsCOMPtr<nsIImageToPixbuf> imgToPixbuf =
- do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1");
-
- GdkPixbuf* imagePixbuf = imgToPixbuf->ConvertImageToPixbuf(image);
- if (!imagePixbuf)
- return NS_ERROR_FAILURE;
+ GdkPixbuf* imagePixbuf = GetPixbufFromImgRequest(aRequest);
+ if (!imagePixbuf) {
+ ShowAlert(nullptr);
+ } else {
+ ShowAlert(imagePixbuf);
+ g_object_unref(imagePixbuf);
+ }
- ShowAlert(imagePixbuf);
+ mLoadedFrame = true;
- g_object_unref(imagePixbuf);
+ // Cancel any pending request (multipart image loading/decoding for instance)
+ mIconRequest->Cancel(NS_BINDING_ABORTED);
+ mIconRequest = nullptr;
- mLoadedFrame = true;
return NS_OK;
}
@@ -180,6 +191,9 @@ nsAlertsIconListener::ShowAlert(GdkPixbu
mClosureHandler = g_signal_connect_closure(mNotification, "closed", closure, FALSE);
gboolean result = notify_notification_show(mNotification, nullptr);
+ if (result && mAlertListener)
+ mAlertListener->Observe(nullptr, "alertshow", mAlertCookie.get());
+
return result ? NS_OK : NS_ERROR_FAILURE;
}
@@ -201,9 +215,15 @@ nsAlertsIconListener::StartRequest(const
if (!il)
return ShowAlert(nullptr);
- return il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr,
- this, nullptr, nsIRequest::LOAD_NORMAL, nullptr,
- nullptr, getter_AddRefs(mIconRequest));
+ nsresult rv = il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr,
+ this, nullptr, nsIRequest::LOAD_NORMAL, nullptr,
+ 0 /* use default */, getter_AddRefs(mIconRequest));
+ if (NS_FAILED(rv))
+ return rv;
+
+ mIconRequest->StartDecoding();
+
+ return NS_OK;
}
void
diff -up mozilla-release/toolkit/system/gnome/nsAlertsIconListener.h.858919 mozilla-release/toolkit/system/gnome/nsAlertsIconListener.h
--- mozilla-release/toolkit/system/gnome/nsAlertsIconListener.h.858919 2014-12-01 11:58:31.896101722 +0100
+++ mozilla-release/toolkit/system/gnome/nsAlertsIconListener.h 2014-12-01 11:58:31.896101722 +0100
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsAlertsIconListener_h__
+#define nsAlertsIconListener_h__
+
+#include "nsCOMPtr.h"
+#include "imgINotificationObserver.h"
+#include "nsStringAPI.h"
+#include "nsIObserver.h"
+#include "nsWeakReference.h"
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+class imgIRequest;
+
+struct NotifyNotification;
+
+class nsAlertsIconListener : public imgINotificationObserver,
+ public nsIObserver,
+ public nsSupportsWeakReference
+{
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_IMGINOTIFICATIONOBSERVER
+ NS_DECL_NSIOBSERVER
+
+ nsAlertsIconListener();
+
+ nsresult InitAlertAsync(const nsAString & aImageUrl,
+ const nsAString & aAlertTitle,
+ const nsAString & aAlertText,
+ bool aAlertTextClickable,
+ const nsAString & aAlertCookie,
+ nsIObserver * aAlertListener);
+
+ void SendCallback();
+ void SendClosed();
+
+protected:
+ virtual ~nsAlertsIconListener();
+
+ nsresult OnStopRequest(imgIRequest* aRequest);
+ nsresult OnStopFrame(imgIRequest* aRequest);
+
+ /**
+ * The only difference between libnotify.so.4 and libnotify.so.1 for these symbols
+ * is that notify_notification_new takes three arguments in libnotify.so.4 and
+ * four in libnotify.so.1.
+ * Passing the fourth argument as NULL is binary compatible.
+ */
+ typedef void (*NotifyActionCallback)(NotifyNotification*, char*, gpointer);
+ typedef bool (*notify_is_initted_t)(void);
+ typedef bool (*notify_init_t)(const char*);
+ typedef GList* (*notify_get_server_caps_t)(void);
+ typedef NotifyNotification* (*notify_notification_new_t)(const char*, const char*, const char*, const char*);
+ typedef bool (*notify_notification_show_t)(void*, char*);
+ typedef void (*notify_notification_set_icon_from_pixbuf_t)(void*, GdkPixbuf*);
+ typedef void (*notify_notification_add_action_t)(void*, const char*, const char*, NotifyActionCallback, gpointer, GFreeFunc);
+
+ nsCOMPtr<imgIRequest> mIconRequest;
+ nsCString mAlertTitle;
+ nsCString mAlertText;
+
+ nsCOMPtr<nsIObserver> mAlertListener;
+ nsString mAlertCookie;
+
+ bool mLoadedFrame;
+ bool mAlertHasAction;
+
+ static void* libNotifyHandle;
+ static bool libNotifyNotAvail;
+ static notify_is_initted_t notify_is_initted;
+ static notify_init_t notify_init;
+ static notify_get_server_caps_t notify_get_server_caps;
+ static notify_notification_new_t notify_notification_new;
+ static notify_notification_show_t notify_notification_show;
+ static notify_notification_set_icon_from_pixbuf_t notify_notification_set_icon_from_pixbuf;
+ static notify_notification_add_action_t notify_notification_add_action;
+ NotifyNotification* mNotification;
+ gulong mClosureHandler;
+
+ nsresult StartRequest(const nsAString & aImageUrl);
+ nsresult ShowAlert(GdkPixbuf* aPixbuf);
+};
+
+#endif
diff -up mozilla-release/toolkit/system/gnome/nsGnomeModule.cpp.858919 mozilla-release/toolkit/system/gnome/nsGnomeModule.cpp
--- mozilla-release/toolkit/system/gnome/nsGnomeModule.cpp.858919 2014-11-26 03:17:39.000000000 +0100
+++ mozilla-release/toolkit/system/gnome/nsGnomeModule.cpp 2014-12-01 11:58:31.896101722 +0100
@@ -22,6 +22,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGn
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init)
#endif
+#include "nsSystemAlertsService.h"
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init)
#ifdef MOZ_ENABLE_GCONF
NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID);
@@ -33,6 +35,7 @@ NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_C
NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID);
#endif
+NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID);
static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
#ifdef MOZ_ENABLE_GCONF
@@ -45,6 +48,7 @@ static const mozilla::Module::CIDEntry k
{ &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor },
{ &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor },
#endif
+ { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor },
{ nullptr }
};
@@ -59,6 +63,7 @@ static const mozilla::Module::ContractID
{ NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
{ NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID },
#endif
+ { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID },
{ nullptr }
};
diff -up mozilla-release/toolkit/system/gnome/nsSystemAlertsService.cpp.858919 mozilla-release/toolkit/system/gnome/nsSystemAlertsService.cpp
--- mozilla-release/toolkit/system/gnome/nsSystemAlertsService.cpp.858919 2014-12-01 11:58:31.897101728 +0100
+++ mozilla-release/toolkit/system/gnome/nsSystemAlertsService.cpp 2014-12-01 11:58:31.896101722 +0100
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsXULAppAPI.h"
+#include "nsSystemAlertsService.h"
+#include "nsAlertsIconListener.h"
+#include "nsAutoPtr.h"
+
+NS_IMPL_ADDREF(nsSystemAlertsService)
+NS_IMPL_RELEASE(nsSystemAlertsService)
+
+NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService)
+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService)
+ NS_INTERFACE_MAP_ENTRY(nsIAlertsService)
+NS_INTERFACE_MAP_END_THREADSAFE
+
+nsSystemAlertsService::nsSystemAlertsService()
+{
+}
+
+nsSystemAlertsService::~nsSystemAlertsService()
+{}
+
+nsresult
+nsSystemAlertsService::Init()
+{
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsSystemAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle,
+ const nsAString & aAlertText, bool aAlertTextClickable,
+ const nsAString & aAlertCookie,
+ nsIObserver * aAlertListener,
+ const nsAString & aAlertName,
+ const nsAString & aBidi,
+ const nsAString & aLang,
+ const nsAString & aData,
+ nsIPrincipal * aPrincipal)
+{
+ nsRefPtr<nsAlertsIconListener> alertListener = new nsAlertsIconListener();
+ if (!alertListener)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ return alertListener->InitAlertAsync(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
+ aAlertCookie, aAlertListener);
+}
+
+NS_IMETHODIMP nsSystemAlertsService::CloseAlert(const nsAString& aAlertName,
+ nsIPrincipal* aPrincipal)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
diff -up mozilla-release/toolkit/system/gnome/nsSystemAlertsService.h.858919 mozilla-release/toolkit/system/gnome/nsSystemAlertsService.h
--- mozilla-release/toolkit/system/gnome/nsSystemAlertsService.h.858919 2014-12-01 11:58:31.897101728 +0100
+++ mozilla-release/toolkit/system/gnome/nsSystemAlertsService.h 2014-12-01 11:58:31.897101728 +0100
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsSystemAlertsService_h__
+#define nsSystemAlertsService_h__
+
+#include "nsIAlertsService.h"
+#include "nsCOMPtr.h"
+
+class nsSystemAlertsService : public nsIAlertsService
+{
+public:
+ NS_DECL_NSIALERTSSERVICE
+ NS_DECL_ISUPPORTS
+
+ nsSystemAlertsService();
+
+ nsresult Init();
+
+protected:
+ virtual ~nsSystemAlertsService();
+
+};
+
+#endif /* nsSystemAlertsService_h__ */

View File

@ -1,2 +1,2 @@
82eda528e4570b181aadcee602afda2d firefox-35.0.1.source.tar.bz2
ce85a89a8f631da6d37f0b6976cf3741 firefox-langpacks-35.0.1-20150123.tar.xz
7a700ea0eaa32ebdf539005fd3f7686e firefox-36.0.source.tar.bz2
5f4995c18442dda6b9af399a51fce77e firefox-langpacks-36.0-20150220.tar.xz