Skip to content

Commit

Permalink
Merge pull request mozilla#2614 from yurydelendik/intermit-fullscreen
Browse files Browse the repository at this point in the history
Fixes intermittent rendering stop
  • Loading branch information
brendandahl committed Jan 30, 2013
2 parents 0f9b63e + ddcbc4d commit f18655f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,12 @@ var PageView = function pageView(container, pdfPage, id, scale,
// Rendering area

var self = this;
var renderingWasReset = false;
function pageViewDrawCallback(error) {
if (renderingWasReset) {
return;
}

self.renderingState = RenderingStates.FINISHED;

if (self.loadingIconDiv) {
Expand Down Expand Up @@ -2128,6 +2133,12 @@ var PageView = function pageView(container, pdfPage, id, scale,
viewport: this.viewport,
textLayer: textLayer,
continueCallback: function pdfViewcContinueCallback(cont) {
if (self.renderingState === RenderingStates.INITIAL) {
// The page update() was called, we just need to abort any rendering.
renderingWasReset = true;
return;
}

if (PDFView.highestPriorityPage !== 'page' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function resumeCallback() {
Expand Down

0 comments on commit f18655f

Please sign in to comment.