[Pkg-javascript-commits] [pdf.js] 53/204: Adds DEFAULT_PREFERENCES to the PdfjsChromeUtils

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 7ae7fd3d1a84d27932ab1248a2b19f04f4bad3b3
Author: Yury Delendik <ydelendik at mozilla.com>
Date:   Mon Sep 8 15:41:57 2014 -0500

    Adds DEFAULT_PREFERENCES to the PdfjsChromeUtils
---
 extensions/firefox/content/PdfjsChromeUtils.jsm  | 16 ++++------------
 extensions/firefox/content/PdfjsContentUtils.jsm |  4 +---
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/extensions/firefox/content/PdfjsChromeUtils.jsm b/extensions/firefox/content/PdfjsChromeUtils.jsm
index 64f757d..89e995b 100644
--- a/extensions/firefox/content/PdfjsChromeUtils.jsm
+++ b/extensions/firefox/content/PdfjsChromeUtils.jsm
@@ -12,6 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+ /*globals DEFAULT_PREFERENCES */
 
 'use strict';
 
@@ -36,21 +37,12 @@ XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
                                    '@mozilla.org/mime;1',
                                    'nsIMIMEService');
 
+//#include ../../../web/default_preferences.js
+
 let PdfjsChromeUtils = {
   // For security purposes when running remote, we restrict preferences
   // content can access.
-  _allowedPrefNames: [
-    "showPreviousViewOnLoad",
-    "defaultZoomValue",
-    "sidebarViewOnLoad",
-    "enableHandToolOnLoad",
-    "enableWebGL",
-    "disableRange",
-    "disableAutoFetch",
-    "disableFontFace",
-    "disableTextLayer",
-    "useOnlyCssZoom"
-  ],
+  _allowedPrefNames: Object.keys(DEFAULT_PREFERENCES),
   _ppmm: null,
   _mmg: null,
 
diff --git a/extensions/firefox/content/PdfjsContentUtils.jsm b/extensions/firefox/content/PdfjsContentUtils.jsm
index b381692..d8a5acd 100644
--- a/extensions/firefox/content/PdfjsContentUtils.jsm
+++ b/extensions/firefox/content/PdfjsContentUtils.jsm
@@ -60,9 +60,7 @@ let PdfjsContentUtils = {
   /*
    * prefs utilities - the child does not have write access to prefs.
    * note, the pref names here are cross-checked against a list of
-   * approved pdfjs prefs in chrome utils. If you add additional pdfjs
-   * prefs update the defaults in DEFAULT_PREFERENCES and in chrome
-   * utils _allowedPrefNames.
+   * approved pdfjs prefs in chrome utils.
    */
 
   clearUserPref: function (aPrefName) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list