summaryrefslogtreecommitdiff
path: root/mozilla-440908.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2016-06-02 12:34:04 +0200
committerMartin Stransky <stransky@redhat.com>2016-06-02 12:34:04 +0200
commitcc687a15aea7294cafe0f55b3f9a440cf064376a (patch)
tree50216cc782bbcbcea30b9712dc054a481a271065 /mozilla-440908.patch
parentMerge branch 'master' into f24 (diff)
parentUpdated to 47.0 (diff)
downloadlibrewolf-fedora-ff-cc687a15aea7294cafe0f55b3f9a440cf064376a.tar.gz
librewolf-fedora-ff-cc687a15aea7294cafe0f55b3f9a440cf064376a.tar.bz2
librewolf-fedora-ff-cc687a15aea7294cafe0f55b3f9a440cf064376a.zip
Merge branch 'master' into f24
Diffstat (limited to 'mozilla-440908.patch')
-rw-r--r--mozilla-440908.patch82
1 files changed, 36 insertions, 46 deletions
diff --git a/mozilla-440908.patch b/mozilla-440908.patch
index 5fd4ed1..acebd7f 100644
--- a/mozilla-440908.patch
+++ b/mozilla-440908.patch
@@ -1,39 +1,28 @@
-From: Mike Hommey <glandium@debian.org>
-Date: Sat, 21 Jun 2008 02:48:46 +0200
-Subject: Allow .js preference files to set locked prefs with lockPref()
-
----
- modules/libpref/prefapi.cpp | 5 ++++-
- modules/libpref/prefapi.h | 3 ++-
- modules/libpref/prefread.cpp | 12 +++++++++---
- modules/libpref/prefread.h | 4 +++-
- 4 files changed, 18 insertions(+), 6 deletions(-)
-
-diff --git a/modules/libpref/prefapi.cpp b/modules/libpref/prefapi.cpp
-index dd27769..bd3f8ea 100644
---- a/modules/libpref/prefapi.cpp
-+++ b/modules/libpref/prefapi.cpp
-@@ -967,11 +967,14 @@ void PREF_ReaderCallback(void *closure,
+diff -up firefox-47.0/modules/libpref/prefapi.cpp.440908 firefox-47.0/modules/libpref/prefapi.cpp
+--- firefox-47.0/modules/libpref/prefapi.cpp.440908 2016-06-01 17:17:19.723700226 +0200
++++ firefox-47.0/modules/libpref/prefapi.cpp 2016-06-01 17:21:05.839971471 +0200
+@@ -947,8 +947,8 @@ void PREF_ReaderCallback(void *clo
PrefValue value,
PrefType type,
bool isDefault,
- bool isStickyDefault)
+-
+ bool isStickyDefault,
+ bool isLocked)
{
- uint32_t flags = isDefault ? kPrefSetDefault : kPrefForceSet;
- if (isDefault && isStickyDefault) {
- flags |= kPrefStickyDefault;
+ uint32_t flags = 0;
+ if (isDefault) {
+@@ -960,4 +960,6 @@ void PREF_ReaderCallback(void *clo
+ flags |= kPrefForceSet;
}
pref_HashPref(pref, value, type, flags);
+ if (isLocked)
+ PREF_LockPref(pref, true);
}
-diff --git a/modules/libpref/prefapi.h b/modules/libpref/prefapi.h
-index 5bd8c43..0ab0d7c 100644
---- a/modules/libpref/prefapi.h
-+++ b/modules/libpref/prefapi.h
-@@ -186,7 +186,8 @@ void PREF_ReaderCallback( void *closure,
+diff -up firefox-47.0/modules/libpref/prefapi.h.440908 firefox-47.0/modules/libpref/prefapi.h
+--- firefox-47.0/modules/libpref/prefapi.h.440908 2016-06-01 06:11:44.000000000 +0200
++++ firefox-47.0/modules/libpref/prefapi.h 2016-06-01 17:17:19.723700226 +0200
+@@ -243,7 +243,8 @@ void PREF_ReaderCallback( void *closure,
PrefValue value,
PrefType type,
bool isDefault,
@@ -43,10 +32,9 @@ index 5bd8c43..0ab0d7c 100644
#ifdef __cplusplus
}
-diff --git a/modules/libpref/prefread.cpp b/modules/libpref/prefread.cpp
-index 6c4d339..16c5057 100644
---- a/modules/libpref/prefread.cpp
-+++ b/modules/libpref/prefread.cpp
+diff -up firefox-47.0/modules/libpref/prefread.cpp.440908 firefox-47.0/modules/libpref/prefread.cpp
+--- firefox-47.0/modules/libpref/prefread.cpp.440908 2016-06-01 06:11:44.000000000 +0200
++++ firefox-47.0/modules/libpref/prefread.cpp 2016-06-01 17:29:47.017596668 +0200
@@ -43,6 +43,7 @@ enum {
#define BITS_PER_HEX_DIGIT 4
@@ -64,27 +52,30 @@ index 6c4d339..16c5057 100644
return true;
}
-@@ -191,6 +192,7 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
- ps->vtype = PREF_INVALID;
+@@ -191,6 +192,7 @@ PREF_ParseBuf(PrefParseState *ps, const
+ ps->vtype = PrefType::Invalid;
ps->fdefault = false;
ps->fstickydefault = false;
+ ps->flock = false;
}
switch (c) {
case '/': /* begin comment block or line? */
-@@ -202,8 +204,10 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
+@@ -201,11 +203,14 @@ PREF_ParseBuf(PrefParseState *ps, const
+ break;
case 'u': /* indicating user_pref */
- case 'p': /* indicating pref */
case 's': /* indicating sticky_pref */
+ case 'l': /* indicating lockPref */
- ps->smatch = (c == 'u' ? kUserPref :
-- (c == 's' ? kPrefSticky : kPref));
-+ (c == 's' ? kPrefSticky :
-+ (c == 'p' ? kPref : kLockPref)));
- ps->sindex = 1;
- ps->nextstate = PREF_PARSE_UNTIL_OPEN_PAREN;
- state = PREF_PARSE_MATCH_STRING;
-@@ -247,8 +251,10 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
+ case 'p': /* indicating pref */
+ if (c == 'u') {
+ ps->smatch = kUserPref;
+ } else if (c == 's') {
+ ps->smatch = kPrefSticky;
++ } else if (c == 'l') {
++ ps->smatch = kLockPref;
+ } else {
+ ps->smatch = kPref;
+ }
+@@ -252,8 +257,10 @@ PREF_ParseBuf(PrefParseState *ps, const
/* name parsing */
case PREF_PARSE_UNTIL_NAME:
if (c == '\"' || c == '\'') {
@@ -96,11 +87,10 @@ index 6c4d339..16c5057 100644
ps->quotechar = c;
ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */
state = PREF_PARSE_QUOTED_STRING;
-diff --git a/modules/libpref/prefread.h b/modules/libpref/prefread.h
-index 3c317ff..0c13057 100644
---- a/modules/libpref/prefread.h
-+++ b/modules/libpref/prefread.h
-@@ -34,7 +34,8 @@ typedef void (*PrefReader)(void *closure,
+diff -up firefox-47.0/modules/libpref/prefread.h.440908 firefox-47.0/modules/libpref/prefread.h
+--- firefox-47.0/modules/libpref/prefread.h.440908 2016-06-01 06:11:44.000000000 +0200
++++ firefox-47.0/modules/libpref/prefread.h 2016-06-01 17:30:32.310651004 +0200
+@@ -34,7 +34,8 @@ typedef void (*PrefReader)(void *c
PrefValue val,
PrefType type,
bool defPref,
@@ -112,7 +102,7 @@ index 3c317ff..0c13057 100644
typedef struct PrefParseState {
@@ -56,6 +57,7 @@ typedef struct PrefParseState {
PrefType vtype; /* PREF_STRING,INT,BOOL */
- bool fdefault; /* true if (default) pref */
+ bool fdefault; /* true if (default) pref */
bool fstickydefault; /* true if (sticky) pref */
+ bool flock; /* true if pref to be locked */
} PrefParseState;
bgstack15