зеркало из https://github.com/mozilla/gecko-dev.git
Bug 477160: fix panning bustage r=stuart
This commit is contained in:
Родитель
87dd779f0e
Коммит
81e11d6b90
|
@ -186,7 +186,6 @@ CanvasBrowser.prototype = {
|
||||||
this._clippedPageDrawing = false;
|
this._clippedPageDrawing = false;
|
||||||
this.zoomToPage();
|
this.zoomToPage();
|
||||||
this.ensureFullCanvasIsDrawn();
|
this.ensureFullCanvasIsDrawn();
|
||||||
this.flushDrawQ();
|
|
||||||
|
|
||||||
if (this._drawInterval) {
|
if (this._drawInterval) {
|
||||||
clearInterval(this._drawInterval);
|
clearInterval(this._drawInterval);
|
||||||
|
@ -196,7 +195,7 @@ CanvasBrowser.prototype = {
|
||||||
|
|
||||||
// ensure that the canvas outside of the viewport is also drawn
|
// ensure that the canvas outside of the viewport is also drawn
|
||||||
ensureFullCanvasIsDrawn: function ensureFullCanvasIsDrawn() {
|
ensureFullCanvasIsDrawn: function ensureFullCanvasIsDrawn() {
|
||||||
if (!this._partiallyDrawn) return;
|
if (this._partiallyDrawn) {
|
||||||
let v = this._visibleBounds
|
let v = this._visibleBounds
|
||||||
let r_above = new wsRect(this._pageBounds.x, this._pageBounds.y,
|
let r_above = new wsRect(this._pageBounds.x, this._pageBounds.y,
|
||||||
this._pageBounds.width, v.y - this._pageBounds.y)
|
this._pageBounds.width, v.y - this._pageBounds.y)
|
||||||
|
@ -212,20 +211,26 @@ CanvasBrowser.prototype = {
|
||||||
this._redrawRect(r_above);
|
this._redrawRect(r_above);
|
||||||
this._redrawRect(r_left);
|
this._redrawRect(r_left);
|
||||||
this._redrawRect(r_right);
|
this._redrawRect(r_right);
|
||||||
this._redrawRect(r_below)
|
this._redrawRect(r_below);
|
||||||
this._partiallyDrawn = false;
|
this._partiallyDrawn = false;
|
||||||
|
}
|
||||||
|
// flush all pending draws
|
||||||
|
this.flushDrawQ()
|
||||||
},
|
},
|
||||||
|
|
||||||
// turns off incremental mode...goes into what is typically a post-page-loading mode
|
|
||||||
|
// Turn off incremental mode if it is on.
|
||||||
|
// Switch _redrawRect to drawing the full canvas
|
||||||
prepareForPanning: function prepareForPanning() {
|
prepareForPanning: function prepareForPanning() {
|
||||||
|
if (!this._clippedPageDrawing)
|
||||||
|
return;
|
||||||
|
|
||||||
// keep checking page size
|
// keep checking page size
|
||||||
this._maybeZoomToPage = true;
|
this._maybeZoomToPage = true;
|
||||||
if (!this._clippedPageDrawing) return;
|
|
||||||
// draw the rest of the canvas
|
// draw the rest of the canvas
|
||||||
this._clippedPageDrawing = false;
|
this._clippedPageDrawing = false;
|
||||||
this.ensureFullCanvasIsDrawn();
|
this.ensureFullCanvasIsDrawn();
|
||||||
// flush it immediately
|
|
||||||
this.flushDrawQ();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
viewportHandler: function(bounds, boundsSizeChanged) {
|
viewportHandler: function(bounds, boundsSizeChanged) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче