Bug 952401 - Collect scroll and pageStyle data as soon as the frame tree is available r=smacleod

From 84ca4ca357b94a5dc9449627e88bb4e3cde69557 Mon Sep 17 00:00:00 2001
This commit is contained in:
Tim Taubert 2013-12-20 11:13:49 +01:00
Родитель 258661df4d
Коммит 055be4025e
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -229,6 +229,10 @@ let ScrollPositionListener = {
}
},
onFrameTreeCollected: function () {
MessageQueue.push("scroll", () => this.collect());
},
onFrameTreeReset: function () {
MessageQueue.push("scroll", () => null);
},
@ -268,6 +272,10 @@ let PageStyleListener = {
return PageStyle.collect(docShell, gFrameTree);
},
onFrameTreeCollected: function () {
MessageQueue.push("pageStyle", () => this.collect());
},
onFrameTreeReset: function () {
MessageQueue.push("pageStyle", () => null);
},

Просмотреть файл

@ -2983,10 +2983,10 @@ let SessionStoreInternal = {
if (typeof(pageStyle) === "string") {
PageStyle.restore(aBrowser.docShell, frameList, pageStyle);
} else {
ScrollPosition.restoreTree(aBrowser.contentWindow, scrollPositions);
PageStyle.restoreTree(aBrowser.docShell, pageStyle);
}
PageStyle.restoreTree(aBrowser.docShell, pageStyle);
ScrollPosition.restoreTree(aBrowser.contentWindow, scrollPositions);
TextAndScrollData.restore(frameList);
let tab = aBrowser.__SS_restore_tab;