Bug 802895 - Add srcdoc iframe support to session restore r=bz
authorJames Kitchener <jkitch.bug@gmail.com>
Fri, 28 Jun 2013 23:13:23 -0400
changeset 136885 3330a8c136b678d47de24609d5211f9bb090118c
parent 136884 3758ba469a3a30af09a1cf31a17eb0d45c2544ee
child 136886 6e0e2baaede1fa9bd4939960ce5cb41be0f832ed
push idunknown
push userunknown
push dateunknown
reviewersbz
bugs802895
milestone25.0a1
Bug 802895 - Add srcdoc iframe support to session restore r=bz
browser/components/sessionstore/src/SessionStore.jsm
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -2072,16 +2072,22 @@ let SessionStoreInternal = {
       entry.cacheKey = cacheKey.data;
     }
     entry.ID = aEntry.ID;
     entry.docshellID = aEntry.docshellID;
 
     if (aEntry.referrerURI)
       entry.referrer = aEntry.referrerURI.spec;
 
+    if (aEntry.srcdocData)
+      entry.srcdocData = aEntry.srcdocData;
+
+    if (aEntry.isSrcdocEntry)
+      entry.isSrcdocEntry = aEntry.isSrcdocEntry;
+
     if (aEntry.contentType)
       entry.contentType = aEntry.contentType;
 
     var x = {}, y = {};
     aEntry.getScrollPosition(x, y);
     if (x.value != 0 || y.value != 0)
       entry.scroll = x.value + "," + y.value;
 
@@ -3312,16 +3318,18 @@ let SessionStoreInternal = {
     shEntry.setTitle(aEntry.title || aEntry.url);
     if (aEntry.subframe)
       shEntry.setIsSubFrame(aEntry.subframe || false);
     shEntry.loadType = Ci.nsIDocShellLoadInfo.loadHistory;
     if (aEntry.contentType)
       shEntry.contentType = aEntry.contentType;
     if (aEntry.referrer)
       shEntry.referrerURI = this._getURIFromString(aEntry.referrer);
+    if (aEntry.isSrcdocEntry)
+      shEntry.srcdocData = aEntry.srcdocData;
 
     if (aEntry.cacheKey) {
       var cacheKey = Cc["@mozilla.org/supports-PRUint32;1"].
                      createInstance(Ci.nsISupportsPRUint32);
       cacheKey.data = aEntry.cacheKey;
       shEntry.cacheKey = cacheKey;
     }