зеркало из https://github.com/mozilla/gecko-dev.git
Bug 760238 - Find in page has broken viewport save/restore code. r=kats
This commit is contained in:
Родитель
67e8556642
Коммит
ba00cbb34c
|
@ -1839,6 +1839,8 @@ Tab.prototype = {
|
|||
this.userScrollPos.x = win.scrollX;
|
||||
this.userScrollPos.y = win.scrollY;
|
||||
this.setResolution(aViewport.zoom, false);
|
||||
|
||||
if (aViewport.displayPort)
|
||||
this.setDisplayPort(aViewport.displayPort);
|
||||
},
|
||||
|
||||
|
@ -3225,7 +3227,7 @@ var FindHelper = {
|
|||
this._targetTab = BrowserApp.selectedTab;
|
||||
this._find = Cc["@mozilla.org/typeaheadfind;1"].createInstance(Ci.nsITypeAheadFind);
|
||||
this._find.init(this._targetTab.browser.docShell);
|
||||
this._initialViewport = JSON.stringify(this._targetTab.viewport);
|
||||
this._initialViewport = JSON.stringify(this._targetTab.getViewport());
|
||||
this._viewportChanged = false;
|
||||
}
|
||||
|
||||
|
@ -3260,7 +3262,7 @@ var FindHelper = {
|
|||
Cu.reportError("Warning: selected tab changed during find!");
|
||||
// fall through and restore viewport on the initial tab anyway
|
||||
}
|
||||
this._targetTab.viewport = JSON.parse(this._initialViewport);
|
||||
this._targetTab.setViewport(JSON.parse(this._initialViewport));
|
||||
this._targetTab.sendViewportUpdate();
|
||||
}
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче