Browse Source

PDF.js version 1.9.534 - See mozilla/pdf.js@c8b5ba277af0464227724486262d14ea4c5a384c

master v1.9.534
pdfjsbot 7 years ago
parent
commit
365e406451
  1. 2
      bower.json
  2. 12
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 12
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 4
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 4
      lib/display/api.js
  10. 4
      lib/display/global.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 50
      lib/web/pdf_history.js
  14. 2
      package.json
  15. 50
      web/pdf_viewer.js
  16. 2
      web/pdf_viewer.js.map

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.530",
"version": "1.9.534",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

12
build/pdf.combined.js

@ -13443,8 +13443,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -13443,8 +13443,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.530';
exports.build = build = 'd1089a28';
exports.version = version = '1.9.534';
exports.build = build = 'c8b5ba27';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -29207,8 +29207,8 @@ exports.SVGGraphics = SVGGraphics; @@ -29207,8 +29207,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.530';
var pdfjsBuild = 'd1089a28';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(98);
var pdfjsDisplayAPI = __w_pdfjs_require__(55);
@ -35070,8 +35070,8 @@ if (!_global_scope2.default.PDFJS) { @@ -35070,8 +35070,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.530';
PDFJS.build = 'd1089a28';
PDFJS.version = '1.9.534';
PDFJS.build = 'c8b5ba27';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

12
build/pdf.js

@ -4173,8 +4173,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -4173,8 +4173,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.530';
exports.build = build = 'd1089a28';
exports.version = version = '1.9.534';
exports.build = build = 'c8b5ba27';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7052,8 +7052,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7052,8 +7052,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.530';
var pdfjsBuild = 'd1089a28';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(82);
var pdfjsDisplayAPI = __w_pdfjs_require__(48);
@ -12915,8 +12915,8 @@ if (!_global_scope2.default.PDFJS) { @@ -12915,8 +12915,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.530';
PDFJS.build = 'd1089a28';
PDFJS.version = '1.9.534';
PDFJS.build = 'c8b5ba27';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

4
build/pdf.worker.js vendored

@ -24512,8 +24512,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph; @@ -24512,8 +24512,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph;
"use strict";
var pdfjsVersion = '1.9.530';
var pdfjsBuild = 'd1089a28';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsCoreWorker = __w_pdfjs_require__(62);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

4
lib/display/api.js

@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.530';
exports.build = build = 'd1089a28';
exports.version = version = '1.9.534';
exports.build = build = 'c8b5ba27';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) { @@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.530';
PDFJS.build = 'd1089a28';
PDFJS.version = '1.9.534';
PDFJS.build = 'c8b5ba27';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.9.530';
var pdfjsBuild = 'd1089a28';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
*/
'use strict';
var pdfjsVersion = '1.9.530';
var pdfjsBuild = 'd1089a28';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

50
lib/web/pdf_history.js

@ -31,7 +31,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons @@ -31,7 +31,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var HASH_CHANGE_TIMEOUT = 1000;
var POSITION_UPDATED_THRESHOLD = 50;
var UPDATE_VIEWAREA_TIMEOUT = 2000;
var UPDATE_VIEWAREA_TIMEOUT = 1000;
function getCurrentHash() {
return document.location.hash;
}
@ -125,6 +125,8 @@ var PDFHistory = function () { @@ -125,6 +125,8 @@ var PDFHistory = function () {
}, {
key: 'push',
value: function push(_ref2) {
var _this2 = this;
var namedDest = _ref2.namedDest,
explicitDest = _ref2.explicitDest,
pageNumber = _ref2.pageNumber;
@ -155,6 +157,12 @@ var PDFHistory = function () { @@ -155,6 +157,12 @@ var PDFHistory = function () {
hash: hash,
page: pageNumber
}, forceReplace);
if (!this._popStateInProgress) {
this._popStateInProgress = true;
Promise.resolve().then(function () {
_this2._popStateInProgress = false;
});
}
}
}, {
key: 'pushCurrentPosition',
@ -262,6 +270,10 @@ var PDFHistory = function () { @@ -262,6 +270,10 @@ var PDFHistory = function () {
value: function _updateInternalState(destination, uid) {
var removeTemporary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (this._updateViewareaTimeout) {
clearTimeout(this._updateViewareaTimeout);
this._updateViewareaTimeout = null;
}
if (removeTemporary && destination && destination.temporary) {
delete destination.temporary;
}
@ -273,7 +285,7 @@ var PDFHistory = function () { @@ -273,7 +285,7 @@ var PDFHistory = function () {
}, {
key: '_updateViewarea',
value: function _updateViewarea(_ref3) {
var _this2 = this;
var _this3 = this;
var location = _ref3.location;
@ -294,17 +306,17 @@ var PDFHistory = function () { @@ -294,17 +306,17 @@ var PDFHistory = function () {
}
if (UPDATE_VIEWAREA_TIMEOUT > 0) {
this._updateViewareaTimeout = setTimeout(function () {
if (!_this2._popStateInProgress) {
_this2._tryPushCurrentPosition(true);
if (!_this3._popStateInProgress) {
_this3._tryPushCurrentPosition(true);
}
_this2._updateViewareaTimeout = null;
_this3._updateViewareaTimeout = null;
}, UPDATE_VIEWAREA_TIMEOUT);
}
}
}, {
key: '_popState',
value: function _popState(_ref4) {
var _this3 = this;
var _this4 = this;
var state = _ref4.state;
@ -335,25 +347,9 @@ var PDFHistory = function () { @@ -335,25 +347,9 @@ var PDFHistory = function () {
name: 'hashchange',
delay: HASH_CHANGE_TIMEOUT
}).then(function () {
_this3._blockHashChange--;
_this4._blockHashChange--;
});
}
if (state.uid < this._currentUid && this._position && this._destination) {
var shouldGoBack = false;
if (this._destination.temporary) {
this._pushOrReplaceState(this._position);
shouldGoBack = true;
} else if (this._destination.page && this._destination.page !== this._position.first && this._destination.page !== this._position.page) {
this._pushOrReplaceState(this._destination);
this._pushOrReplaceState(this._position);
shouldGoBack = true;
}
if (shouldGoBack) {
this._currentUid = state.uid;
window.history.back();
return;
}
}
var destination = state.destination;
this._updateInternalState(destination, state.uid, true);
if (destination.dest) {
@ -364,13 +360,13 @@ var PDFHistory = function () { @@ -364,13 +360,13 @@ var PDFHistory = function () {
this.linkService.page = destination.page;
}
Promise.resolve().then(function () {
_this3._popStateInProgress = false;
_this4._popStateInProgress = false;
});
}
}, {
key: '_bindEvents',
value: function _bindEvents() {
var _this4 = this;
var _this5 = this;
var _boundEvents = this._boundEvents,
eventBus = this.eventBus;
@ -378,8 +374,8 @@ var PDFHistory = function () { @@ -378,8 +374,8 @@ var PDFHistory = function () {
_boundEvents.updateViewarea = this._updateViewarea.bind(this);
_boundEvents.popState = this._popState.bind(this);
_boundEvents.pageHide = function (evt) {
if (!_this4._destination) {
_this4._tryPushCurrentPosition();
if (!_this5._destination) {
_this5._tryPushCurrentPosition();
}
};
eventBus.on('updateviewarea', _boundEvents.updateViewarea);

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.530",
"version": "1.9.534",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

50
web/pdf_viewer.js

@ -3131,7 +3131,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons @@ -3131,7 +3131,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var HASH_CHANGE_TIMEOUT = 1000;
var POSITION_UPDATED_THRESHOLD = 50;
var UPDATE_VIEWAREA_TIMEOUT = 2000;
var UPDATE_VIEWAREA_TIMEOUT = 1000;
function getCurrentHash() {
return document.location.hash;
}
@ -3225,6 +3225,8 @@ var PDFHistory = function () { @@ -3225,6 +3225,8 @@ var PDFHistory = function () {
}, {
key: 'push',
value: function push(_ref2) {
var _this2 = this;
var namedDest = _ref2.namedDest,
explicitDest = _ref2.explicitDest,
pageNumber = _ref2.pageNumber;
@ -3255,6 +3257,12 @@ var PDFHistory = function () { @@ -3255,6 +3257,12 @@ var PDFHistory = function () {
hash: hash,
page: pageNumber
}, forceReplace);
if (!this._popStateInProgress) {
this._popStateInProgress = true;
Promise.resolve().then(function () {
_this2._popStateInProgress = false;
});
}
}
}, {
key: 'pushCurrentPosition',
@ -3362,6 +3370,10 @@ var PDFHistory = function () { @@ -3362,6 +3370,10 @@ var PDFHistory = function () {
value: function _updateInternalState(destination, uid) {
var removeTemporary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (this._updateViewareaTimeout) {
clearTimeout(this._updateViewareaTimeout);
this._updateViewareaTimeout = null;
}
if (removeTemporary && destination && destination.temporary) {
delete destination.temporary;
}
@ -3373,7 +3385,7 @@ var PDFHistory = function () { @@ -3373,7 +3385,7 @@ var PDFHistory = function () {
}, {
key: '_updateViewarea',
value: function _updateViewarea(_ref3) {
var _this2 = this;
var _this3 = this;
var location = _ref3.location;
@ -3394,17 +3406,17 @@ var PDFHistory = function () { @@ -3394,17 +3406,17 @@ var PDFHistory = function () {
}
if (UPDATE_VIEWAREA_TIMEOUT > 0) {
this._updateViewareaTimeout = setTimeout(function () {
if (!_this2._popStateInProgress) {
_this2._tryPushCurrentPosition(true);
if (!_this3._popStateInProgress) {
_this3._tryPushCurrentPosition(true);
}
_this2._updateViewareaTimeout = null;
_this3._updateViewareaTimeout = null;
}, UPDATE_VIEWAREA_TIMEOUT);
}
}
}, {
key: '_popState',
value: function _popState(_ref4) {
var _this3 = this;
var _this4 = this;
var state = _ref4.state;
@ -3435,25 +3447,9 @@ var PDFHistory = function () { @@ -3435,25 +3447,9 @@ var PDFHistory = function () {
name: 'hashchange',
delay: HASH_CHANGE_TIMEOUT
}).then(function () {
_this3._blockHashChange--;
_this4._blockHashChange--;
});
}
if (state.uid < this._currentUid && this._position && this._destination) {
var shouldGoBack = false;
if (this._destination.temporary) {
this._pushOrReplaceState(this._position);
shouldGoBack = true;
} else if (this._destination.page && this._destination.page !== this._position.first && this._destination.page !== this._position.page) {
this._pushOrReplaceState(this._destination);
this._pushOrReplaceState(this._position);
shouldGoBack = true;
}
if (shouldGoBack) {
this._currentUid = state.uid;
window.history.back();
return;
}
}
var destination = state.destination;
this._updateInternalState(destination, state.uid, true);
if (destination.dest) {
@ -3464,13 +3460,13 @@ var PDFHistory = function () { @@ -3464,13 +3460,13 @@ var PDFHistory = function () {
this.linkService.page = destination.page;
}
Promise.resolve().then(function () {
_this3._popStateInProgress = false;
_this4._popStateInProgress = false;
});
}
}, {
key: '_bindEvents',
value: function _bindEvents() {
var _this4 = this;
var _this5 = this;
var _boundEvents = this._boundEvents,
eventBus = this.eventBus;
@ -3478,8 +3474,8 @@ var PDFHistory = function () { @@ -3478,8 +3474,8 @@ var PDFHistory = function () {
_boundEvents.updateViewarea = this._updateViewarea.bind(this);
_boundEvents.popState = this._popState.bind(this);
_boundEvents.pageHide = function (evt) {
if (!_this4._destination) {
_this4._tryPushCurrentPosition();
if (!_this5._destination) {
_this5._tryPushCurrentPosition();
}
};
eventBus.on('updateviewarea', _boundEvents.updateViewarea);

2
web/pdf_viewer.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save