Modified: trunk/Source/WebKit2/ChangeLog (170657 => 170658)
--- trunk/Source/WebKit2/ChangeLog 2014-07-01 19:34:57 UTC (rev 170657)
+++ trunk/Source/WebKit2/ChangeLog 2014-07-01 19:42:03 UTC (rev 170658)
@@ -1,5 +1,17 @@
2014-07-01 Anders Carlsson <[email protected]>
+ Temporarily encode and decode the snapshot UUID
+ https://bugs.webkit.org/show_bug.cgi?id=134507
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/mac/LegacySessionStateCoding.cpp:
+ (WebKit::encodeSessionHistory):
+ (WebKit::decodeSessionHistoryEntry):
+ (WebKit::decodeSessionHistoryEntries):
+
+2014-07-01 Anders Carlsson <[email protected]>
+
Implement encodeSessionHistoryEntryData
https://bugs.webkit.org/show_bug.cgi?id=134505
Modified: trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp (170657 => 170658)
--- trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp 2014-07-01 19:34:57 UTC (rev 170657)
+++ trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp 2014-07-01 19:42:03 UTC (rev 170658)
@@ -437,7 +437,7 @@
auto originalURL = item.pageState.mainFrameState.originalURLString.createCFString();
auto data = ""
- auto entryDictionary = createDictionary({ { sessionHistoryEntryURLKey, url.get() }, { sessionHistoryEntryTitleKey, title.get() }, { sessionHistoryEntryDataKey, data.get() }});
+ auto entryDictionary = createDictionary({ { sessionHistoryEntryURLKey, url.get() }, { sessionHistoryEntryTitleKey, title.get() }, { sessionHistoryEntryDataKey, data.get() }, { sessionHistoryEntrySnapshotUUIDKey, item.snapshotUUID.createCFString().get() }});
CFArrayAppendValue(entries.get(), entryDictionary.get());
}
@@ -933,7 +933,7 @@
return decodeSessionHistoryEntryData(CFDataGetBytePtr(historyEntryData), static_cast<size_t>(CFDataGetLength(historyEntryData)), mainFrameState);
}
-static bool decodeSessionHistoryEntry(CFDictionaryRef entryDictionary, PageState& pageState)
+static bool decodeSessionHistoryEntry(CFDictionaryRef entryDictionary, BackForwardListItemState& backForwardListItemState)
{
auto title = dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(entryDictionary, sessionHistoryEntryTitleKey));
if (!title)
@@ -951,13 +951,16 @@
if (!historyEntryData)
return false;
- if (!decodeSessionHistoryEntryData(historyEntryData, pageState.mainFrameState))
+ if (!decodeSessionHistoryEntryData(historyEntryData, backForwardListItemState.pageState.mainFrameState))
return false;
- pageState.title = title;
- pageState.mainFrameState.urlString = urlString;
- pageState.mainFrameState.originalURLString = originalURLString;
+ if (auto snapshotUUID = WTF::dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(entryDictionary, sessionHistoryEntrySnapshotUUIDKey)))
+ backForwardListItemState.snapshotUUID = snapshotUUID;
+ backForwardListItemState.pageState.title = title;
+ backForwardListItemState.pageState.mainFrameState.urlString = urlString;
+ backForwardListItemState.pageState.mainFrameState.originalURLString = originalURLString;
+
return true;
}
@@ -969,7 +972,7 @@
return false;
BackForwardListItemState entry;
- if (!decodeSessionHistoryEntry(entryDictionary, entry.pageState))
+ if (!decodeSessionHistoryEntry(entryDictionary, entry))
return false;
entries.append(std::move(entry));