зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1233762 - Use the nsIImageDocument's built-in shrink-to-fit feature, rather than reimplementing it poorly in Fennec front-end code. r=esawin
--HG-- extra : commitid : KiWag7NVRQN
This commit is contained in:
Родитель
2d36b4b55c
Коммит
5a036ab130
|
@ -4691,17 +4691,14 @@ Tab.prototype = {
|
|||
}
|
||||
this.contentDocumentIsDisplayed = true;
|
||||
|
||||
if (contentDocument instanceof Ci.nsIImageDocument) {
|
||||
contentDocument.shrinkToFit();
|
||||
}
|
||||
|
||||
let zoom = this.restoredSessionZoom();
|
||||
if (zoom) {
|
||||
this.setResolution(zoom, true);
|
||||
}
|
||||
|
||||
if (!this.restoredSessionZoom() && contentDocument.mozSyntheticDocument) {
|
||||
let fitZoom = Math.min(gScreenWidth / contentDocument.body.scrollWidth,
|
||||
gScreenHeight / contentDocument.body.scrollHeight);
|
||||
this.setResolution(fitZoom, false);
|
||||
this.sendViewportUpdate(); // recompute displayport
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче