Move all PDFJS.xxx settings into display/global.

This commit is contained in:
Yury Delendik 2016-03-28 14:49:22 -05:00
parent 6c9f418aae
commit 1d12aed5ca
17 changed files with 538 additions and 403 deletions

View file

@ -592,6 +592,17 @@ function isLittleEndian() {
return (buffer16[0] === 1);
}
// Checks if it's possible to eval JS expressions.
function isEvalSupported() {
try {
/* jshint evil: true */
new Function('');
return true;
} catch (e) {
return false;
}
}
//#if !(FIREFOX || MOZCENTRAL || CHROME)
var Uint32ArrayView = (function Uint32ArrayViewClosure() {
@ -889,7 +900,7 @@ var Util = (function UtilClosure() {
/**
* PDF page viewport created based on scale, rotation and offset.
* @class
* @alias PDFJS.PageViewport
* @alias PageViewport
*/
var PageViewport = (function PageViewportClosure() {
/**
@ -965,13 +976,13 @@ var PageViewport = (function PageViewportClosure() {
this.height = height;
this.fontScale = scale;
}
PageViewport.prototype = /** @lends PDFJS.PageViewport.prototype */ {
PageViewport.prototype = /** @lends PageViewport.prototype */ {
/**
* Clones viewport with additional properties.
* @param args {Object} (optional) If specified, may contain the 'scale' or
* 'rotation' properties to override the corresponding properties in
* the cloned viewport.
* @returns {PDFJS.PageViewport} Cloned viewport.
* @returns {PageViewport} Cloned viewport.
*/
clone: function PageViewPort_clone(args) {
args = args || {};
@ -1101,7 +1112,7 @@ function isArrayBuffer(v) {
/**
* Creates a promise capability object.
* @alias PDFJS.createPromiseCapability
* @alias createPromiseCapability
*
* @return {PromiseCapability} A capability object contains:
* - a Promise, resolve and reject methods.
@ -2347,6 +2358,7 @@ exports.isString = isString;
exports.isSameOrigin = isSameOrigin;
exports.isValidUrl = isValidUrl;
exports.isLittleEndian = isLittleEndian;
exports.isEvalSupported = isEvalSupported;
exports.loadJpegStream = loadJpegStream;
exports.log2 = log2;
exports.readInt8 = readInt8;