|
|
@ -3489,7 +3489,7 @@ var PDFHistory = function () { |
|
|
|
this._blockHashChange = 0; |
|
|
|
this._blockHashChange = 0; |
|
|
|
this._currentHash = getCurrentHash(); |
|
|
|
this._currentHash = getCurrentHash(); |
|
|
|
this._numPositionUpdates = 0; |
|
|
|
this._numPositionUpdates = 0; |
|
|
|
this._currentUid = this._uid = 0; |
|
|
|
this._uid = this._maxUid = 0; |
|
|
|
this._destination = null; |
|
|
|
this._destination = null; |
|
|
|
this._position = null; |
|
|
|
this._position = null; |
|
|
|
if (!this._isValidState(state) || resetHistory) { |
|
|
|
if (!this._isValidState(state) || resetHistory) { |
|
|
@ -3592,7 +3592,7 @@ var PDFHistory = function () { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var state = window.history.state; |
|
|
|
var state = window.history.state; |
|
|
|
if (this._isValidState(state) && state.uid < this._uid - 1) { |
|
|
|
if (this._isValidState(state) && state.uid < this._maxUid) { |
|
|
|
window.history.forward(); |
|
|
|
window.history.forward(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3604,13 +3604,14 @@ var PDFHistory = function () { |
|
|
|
var shouldReplace = forceReplace || !this._destination; |
|
|
|
var shouldReplace = forceReplace || !this._destination; |
|
|
|
var newState = { |
|
|
|
var newState = { |
|
|
|
fingerprint: this.fingerprint, |
|
|
|
fingerprint: this.fingerprint, |
|
|
|
uid: shouldReplace ? this._currentUid : this._uid, |
|
|
|
uid: shouldReplace ? this._uid : this._uid + 1, |
|
|
|
destination: destination |
|
|
|
destination: destination |
|
|
|
}; |
|
|
|
}; |
|
|
|
this._updateInternalState(destination, newState.uid); |
|
|
|
this._updateInternalState(destination, newState.uid); |
|
|
|
if (shouldReplace) { |
|
|
|
if (shouldReplace) { |
|
|
|
window.history.replaceState(newState, '', document.URL); |
|
|
|
window.history.replaceState(newState, '', document.URL); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
this._maxUid = this._uid; |
|
|
|
window.history.pushState(newState, '', document.URL); |
|
|
|
window.history.pushState(newState, '', document.URL); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3680,8 +3681,7 @@ var PDFHistory = function () { |
|
|
|
delete destination.temporary; |
|
|
|
delete destination.temporary; |
|
|
|
} |
|
|
|
} |
|
|
|
this._destination = destination; |
|
|
|
this._destination = destination; |
|
|
|
this._currentUid = uid; |
|
|
|
this._uid = uid; |
|
|
|
this._uid = this._currentUid + 1; |
|
|
|
|
|
|
|
this._numPositionUpdates = 0; |
|
|
|
this._numPositionUpdates = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
}, { |
|
|
|
}, { |
|
|
@ -3727,7 +3727,7 @@ var PDFHistory = function () { |
|
|
|
hashChanged = this._currentHash !== newHash; |
|
|
|
hashChanged = this._currentHash !== newHash; |
|
|
|
this._currentHash = newHash; |
|
|
|
this._currentHash = newHash; |
|
|
|
if (!state || false) { |
|
|
|
if (!state || false) { |
|
|
|
this._currentUid = this._uid; |
|
|
|
this._uid++; |
|
|
|
|
|
|
|
|
|
|
|
var _parseCurrentHash2 = parseCurrentHash(this.linkService), |
|
|
|
var _parseCurrentHash2 = parseCurrentHash(this.linkService), |
|
|
|
hash = _parseCurrentHash2.hash, |
|
|
|
hash = _parseCurrentHash2.hash, |
|
|
|