Backed out changeset 5de79bf87514 (bug 1354081)

This commit is contained in:
Ryan VanderMeulen 2017-04-06 09:50:40 -04:00
Родитель 2ad48ad061
Коммит 91cbca3e88
8 изменённых файлов: 28 добавлений и 67 удалений

Просмотреть файл

@ -1,3 +1,3 @@
This is the pdf.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 1.7.418
Current extension version is: 1.7.401

Просмотреть файл

@ -190,9 +190,9 @@ var PdfJs = {
updateRegistration: function updateRegistration() {
if (this.enabled) {
this.ensureRegistered();
this._ensureRegistered();
} else {
this.ensureUnregistered();
this._ensureUnregistered();
}
},
@ -205,7 +205,7 @@ var PdfJs = {
Services.obs.removeObserver(this, TOPIC_PLUGIN_INFO_UPDATED);
this._initialized = false;
}
this.ensureUnregistered();
this._ensureUnregistered();
},
_migrate: function migrate() {
@ -324,7 +324,7 @@ var PdfJs = {
return !enabledPluginFound;
},
ensureRegistered: function ensureRegistered() {
_ensureRegistered: function _ensureRegistered() {
if (this._registered) {
return;
}
@ -335,7 +335,7 @@ var PdfJs = {
this._registered = true;
},
ensureUnregistered: function ensureUnregistered() {
_ensureUnregistered: function _ensureUnregistered() {
if (!this._registered) {
return;
}

Просмотреть файл

@ -33,9 +33,7 @@ const MAX_STRING_PREF_LENGTH = 128;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetworkManager",
"resource://pdf.js/PdfJsNetwork.jsm");

Просмотреть файл

@ -1292,16 +1292,6 @@ var CustomStyle = function CustomStyleClosure() {
};
return CustomStyle;
}();
var RenderingCancelledException = function RenderingCancelledException() {
function RenderingCancelledException(msg, type) {
this.message = msg;
this.type = type;
}
RenderingCancelledException.prototype = new Error();
RenderingCancelledException.prototype.name = 'RenderingCancelledException';
RenderingCancelledException.constructor = RenderingCancelledException;
return RenderingCancelledException;
}();
var hasCanvasTypedArrays;
hasCanvasTypedArrays = function () {
return true;
@ -1390,8 +1380,6 @@ function getDefaultSetting(id) {
return globalSettings ? globalSettings.externalLinkRel : DEFAULT_LINK_REL;
case 'enableStats':
return !!(globalSettings && globalSettings.enableStats);
case 'pdfjsNext':
return !!(globalSettings && globalSettings.pdfjsNext);
default:
throw new Error('Unknown default setting: ' + id);
}
@ -1419,7 +1407,6 @@ exports.isExternalLinkTargetSet = isExternalLinkTargetSet;
exports.isValidUrl = isValidUrl;
exports.getFilenameFromUrl = getFilenameFromUrl;
exports.LinkTarget = LinkTarget;
exports.RenderingCancelledException = RenderingCancelledException;
exports.hasCanvasTypedArrays = hasCanvasTypedArrays;
exports.getDefaultSetting = getDefaultSetting;
exports.DEFAULT_LINK_REL = DEFAULT_LINK_REL;
@ -2081,7 +2068,6 @@ var FontFaceObject = displayFontLoader.FontFaceObject;
var FontLoader = displayFontLoader.FontLoader;
var CanvasGraphics = displayCanvas.CanvasGraphics;
var Metadata = displayMetadata.Metadata;
var RenderingCancelledException = displayDOMUtils.RenderingCancelledException;
var getDefaultSetting = displayDOMUtils.getDefaultSetting;
var DOMCanvasFactory = displayDOMUtils.DOMCanvasFactory;
var DOMCMapReaderFactory = displayDOMUtils.DOMCMapReaderFactory;
@ -3312,7 +3298,7 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
cancel: function InternalRenderTask_cancel() {
this.running = false;
this.cancelled = true;
this.callback(new RenderingCancelledException('Rendering cancelled, page ' + this.pageNumber, 'canvas'));
this.callback('cancelled');
},
operatorListChanged: function InternalRenderTask_operatorListChanged() {
if (!this.graphicsReady) {
@ -3377,8 +3363,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}
};
}();
exports.version = '1.7.418';
exports.build = 'a662d268';
exports.version = '1.7.401';
exports.build = '57d9a64c';
exports.getDocument = getDocument;
exports.PDFDataRangeTransport = PDFDataRangeTransport;
exports.PDFWorker = PDFWorker;
@ -4345,8 +4331,8 @@ if (!globalScope.PDFJS) {
globalScope.PDFJS = {};
}
var PDFJS = globalScope.PDFJS;
PDFJS.version = '1.7.418';
PDFJS.build = 'a662d268';
PDFJS.version = '1.7.401';
PDFJS.build = '57d9a64c';
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
sharedUtil.setVerbosityLevel(PDFJS.verbosity);
@ -4406,7 +4392,6 @@ PDFJS.disableWebGL = PDFJS.disableWebGL === undefined ? true : PDFJS.disableWebG
PDFJS.externalLinkTarget = PDFJS.externalLinkTarget === undefined ? LinkTarget.NONE : PDFJS.externalLinkTarget;
PDFJS.externalLinkRel = PDFJS.externalLinkRel === undefined ? DEFAULT_LINK_REL : PDFJS.externalLinkRel;
PDFJS.isEvalSupported = PDFJS.isEvalSupported === undefined ? true : PDFJS.isEvalSupported;
PDFJS.pdfjsNext = PDFJS.pdfjsNext === undefined ? false : PDFJS.pdfjsNext;
PDFJS.getDocument = displayAPI.getDocument;
PDFJS.PDFDataRangeTransport = displayAPI.PDFDataRangeTransport;
PDFJS.PDFWorker = displayAPI.PDFWorker;
@ -6685,8 +6670,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.7.418';
var pdfjsBuild = 'a662d268';
var pdfjsVersion = '1.7.401';
var pdfjsBuild = '57d9a64c';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(8);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);
@ -6717,7 +6702,6 @@ exports.createObjectURL = pdfjsSharedUtil.createObjectURL;
exports.removeNullCharacters = pdfjsSharedUtil.removeNullCharacters;
exports.shadow = pdfjsSharedUtil.shadow;
exports.createBlob = pdfjsSharedUtil.createBlob;
exports.RenderingCancelledException = pdfjsDisplayDOMUtils.RenderingCancelledException;
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;

Просмотреть файл

@ -27676,6 +27676,9 @@ var Font = function FontClosure() {
}
glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start];
glyphId = glyphId + delta & 0xFFFF;
if (glyphId === 0) {
continue;
}
mappings.push({
charCode: j,
glyphId: glyphId
@ -36370,8 +36373,8 @@ exports.Type1Parser = Type1Parser;
"use strict";
var pdfjsVersion = '1.7.418';
var pdfjsBuild = 'a662d268';
var pdfjsVersion = '1.7.401';
var pdfjsBuild = '57d9a64c';
var pdfjsCoreWorker = __w_pdfjs_require__(17);
;
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

Просмотреть файл

@ -1,31 +0,0 @@
/* Copyright 2014 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals Components, PdfJs, Services */
"use strict";
/*
* pdfjschildbootstrap-enabled.js loads into the content process to
* take care of initializing our built-in version of pdfjs when
* running remote. It will only be run when PdfJs.enable is true.
*/
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://pdf.js/PdfJs.jsm");
if (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) {
// register various pdfjs factories that hook us into content loading.
PdfJs.ensureRegistered();
}

Просмотреть файл

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals Components, PdfjsContentUtils */
/* globals Components, PdfjsContentUtils, PdfJs, Services */
"use strict";
@ -21,7 +21,14 @@
* initializing our built-in version of pdfjs when running remote.
*/
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://pdf.js/PdfJs.jsm");
Components.utils.import("resource://pdf.js/PdfjsContentUtils.jsm");
// init content utils shim pdfjs will use to access privileged apis.
PdfjsContentUtils.init();
if (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) {
// register various pdfjs factories that hook us into content loading.
PdfJs.updateRegistration();
}

Просмотреть файл

@ -4944,7 +4944,7 @@ var PDFPageView = function PDFPageViewClosure() {
if (paintTask === self.paintTask) {
self.paintTask = null;
}
if (error instanceof pdfjsLib.RenderingCancelledException) {
if (error === 'cancelled') {
self.error = null;
return Promise.resolve(undefined);
}