From 904da039c92e402a4ead59f7a4ed2fc4efaeba80 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Fri, 15 Apr 2016 21:49:19 +0100 Subject: [PATCH] PDF.js version 1.4.241 - See mozilla/pdf.js@4a601ffc2867854dc82f51d947b677ad4754ce14 --- bower.json | 2 +- build/pdf.combined.js | 17 +++-------------- build/pdf.js | 19 ++++--------------- build/pdf.worker.js | 14 ++------------ package.json | 2 +- 5 files changed, 11 insertions(+), 43 deletions(-) diff --git a/bower.json b/bower.json index 27ae5aede..b3b4b0571 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.4.239", + "version": "1.4.241", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 9cf0de4f9..da281fb6e 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.4.239'; -var pdfjsBuild = '5c17df9'; +var pdfjsVersion = '1.4.241'; +var pdfjsBuild = '4a601ff'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -2337,15 +2337,6 @@ var UNSUPPORTED_FEATURES = { font: 'font' }; -// Combines two URLs. The baseUrl shall be absolute URL. If the url is an -// absolute URL, it will be returned as is. -function combineUrl(baseUrl, url) { - if (!url) { - return baseUrl; - } - return new URL(url, baseUrl).href; -} - // Checks if URLs have the same origin. For non-HTTP based URLs, returns false. function isSameOrigin(baseUrl, otherUrl) { try { @@ -4372,7 +4363,6 @@ exports.arrayByteLength = arrayByteLength; exports.arraysToBytes = arraysToBytes; exports.assert = assert; exports.bytesToString = bytesToString; -exports.combineUrl = combineUrl; exports.createBlob = createBlob; exports.createPromiseCapability = createPromiseCapability; exports.createObjectURL = createObjectURL; @@ -38613,7 +38603,6 @@ var UnexpectedResponseException = sharedUtil.UnexpectedResponseException; var UnknownErrorException = sharedUtil.UnknownErrorException; var Util = sharedUtil.Util; var createPromiseCapability = sharedUtil.createPromiseCapability; -var combineUrl = sharedUtil.combineUrl; var error = sharedUtil.error; var deprecated = sharedUtil.deprecated; var getVerbosityLevel = sharedUtil.getVerbosityLevel; @@ -38747,7 +38736,7 @@ function getDocument(src, pdfDataRangeTransport, for (var key in source) { if (key === 'url' && typeof window !== 'undefined') { // The full path is required in the 'url' field. - params[key] = combineUrl(window.location.href, source[key]); + params[key] = new URL(source[key], window.location).href; continue; } else if (key === 'range') { rangeTransport = source[key]; diff --git a/build/pdf.js b/build/pdf.js index df5d62966..0c7390554 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.4.239'; -var pdfjsBuild = '5c17df9'; +var pdfjsVersion = '1.4.241'; +var pdfjsBuild = '4a601ff'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -316,15 +316,6 @@ var UNSUPPORTED_FEATURES = { font: 'font' }; -// Combines two URLs. The baseUrl shall be absolute URL. If the url is an -// absolute URL, it will be returned as is. -function combineUrl(baseUrl, url) { - if (!url) { - return baseUrl; - } - return new URL(url, baseUrl).href; -} - // Checks if URLs have the same origin. For non-HTTP based URLs, returns false. function isSameOrigin(baseUrl, otherUrl) { try { @@ -2351,7 +2342,6 @@ exports.arrayByteLength = arrayByteLength; exports.arraysToBytes = arraysToBytes; exports.assert = assert; exports.bytesToString = bytesToString; -exports.combineUrl = combineUrl; exports.createBlob = createBlob; exports.createPromiseCapability = createPromiseCapability; exports.createObjectURL = createObjectURL; @@ -8577,7 +8567,6 @@ var UnexpectedResponseException = sharedUtil.UnexpectedResponseException; var UnknownErrorException = sharedUtil.UnknownErrorException; var Util = sharedUtil.Util; var createPromiseCapability = sharedUtil.createPromiseCapability; -var combineUrl = sharedUtil.combineUrl; var error = sharedUtil.error; var deprecated = sharedUtil.deprecated; var getVerbosityLevel = sharedUtil.getVerbosityLevel; @@ -8739,7 +8728,7 @@ function getDocument(src, pdfDataRangeTransport, for (var key in source) { if (key === 'url' && typeof window !== 'undefined') { // The full path is required in the 'url' field. - params[key] = combineUrl(window.location.href, source[key]); + params[key] = new URL(source[key], window.location).href; continue; } else if (key === 'range') { rangeTransport = source[key]; @@ -9649,7 +9638,7 @@ var PDFWorker = (function PDFWorkerClosure() { // to the same origin. if (!isSameOrigin(window.location.href, workerSrc)) { workerSrc = createCDNWrapper( - combineUrl(window.location.href, workerSrc)); + new URL(workerSrc, window.location).href); } // Some versions of FF can't create a worker on localhost, see: // https://bugzilla.mozilla.org/show_bug.cgi?id=683280 diff --git a/build/pdf.worker.js b/build/pdf.worker.js index e8aee9e03..e4379e332 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.4.239'; -var pdfjsBuild = '5c17df9'; +var pdfjsVersion = '1.4.241'; +var pdfjsBuild = '4a601ff'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -2337,15 +2337,6 @@ var UNSUPPORTED_FEATURES = { font: 'font' }; -// Combines two URLs. The baseUrl shall be absolute URL. If the url is an -// absolute URL, it will be returned as is. -function combineUrl(baseUrl, url) { - if (!url) { - return baseUrl; - } - return new URL(url, baseUrl).href; -} - // Checks if URLs have the same origin. For non-HTTP based URLs, returns false. function isSameOrigin(baseUrl, otherUrl) { try { @@ -4372,7 +4363,6 @@ exports.arrayByteLength = arrayByteLength; exports.arraysToBytes = arraysToBytes; exports.assert = assert; exports.bytesToString = bytesToString; -exports.combineUrl = combineUrl; exports.createBlob = createBlob; exports.createPromiseCapability = createPromiseCapability; exports.createObjectURL = createObjectURL; diff --git a/package.json b/package.json index c97748274..2bcdba2bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.4.239", + "version": "1.4.241", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [