Bug 686514 - Make ctrl-plus and ctrl-minus scale image documents. r=gavin.sharp,jonas

This commit is contained in:
Timothy Zhu 2011-11-16 23:25:00 -05:00
parent 34b242cb5e
commit 8d34e9a692
3 changed files with 7 additions and 4 deletions

View File

@ -1601,6 +1601,8 @@ public:
virtual void PostVisibilityUpdateEvent() = 0;
bool IsSyntheticDocument() { return mIsSyntheticDocument; }
void SetNeedLayoutFlush() {
mNeedLayoutFlush = true;
if (mDisplayDocument) {

View File

@ -2516,7 +2516,7 @@ nsEventStateManager::DoScrollZoom(nsIFrame *aTargetFrame,
// positive adjustment to decrease zoom, negative to increase
PRInt32 change = (adjustment > 0) ? -1 : 1;
if (Preferences::GetBool("browser.zoom.full")) {
if (Preferences::GetBool("browser.zoom.full") || content->GetCurrentDoc()->IsSyntheticDocument()) {
ChangeFullZoom(change);
} else {
ChangeTextSize(change);

View File

@ -79,8 +79,9 @@ var ZoomManager = {
getZoomForBrowser: function ZoomManager_getZoomForBrowser(aBrowser) {
var markupDocumentViewer = aBrowser.markupDocumentViewer;
return this.useFullZoom ? markupDocumentViewer.fullZoom
: markupDocumentViewer.textZoom;
return this.useFullZoom ||
aBrowser.contentDocument.mozSyntheticDocument ?
markupDocumentViewer.fullZoom : markupDocumentViewer.textZoom;
},
set zoom(aVal) {
@ -94,7 +95,7 @@ var ZoomManager = {
var markupDocumentViewer = aBrowser.markupDocumentViewer;
if (this.useFullZoom) {
if (this.useFullZoom || aBrowser.contentDocument.mozSyntheticDocument) {
markupDocumentViewer.textZoom = 1;
markupDocumentViewer.fullZoom = aVal;
} else {