[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
beidson at apple.com
beidson at apple.com
Fri Jan 21 14:55:57 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 7d1d6abb1291acac7677328a39bb63014c986499
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 4 23:35:06 2011 +0000
Store more data per history entry in the session state blob.
Reviewed by Darin Adler.
* UIProcess/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* UIProcess/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* UIProcess/cf/WebPageProxyCF.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index fedee38..54e3fbf 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-04 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Darin Adler.
+
+ Store more data per history entry in the session state blob.
+
+ * UIProcess/WebBackForwardListItem.cpp:
+ (WebKit::WebBackForwardListItem::WebBackForwardListItem):
+ * UIProcess/WebBackForwardListItem.h:
+ (WebKit::WebBackForwardListItem::create):
+
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::addBackForwardItem):
+
+ * UIProcess/cf/WebBackForwardListCF.cpp:
+ (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
+
+ * UIProcess/cf/WebPageProxyCF.cpp:
+
2011-01-04 Darin Adler <darin at apple.com>
Reviewed by Brady Eidson.
diff --git a/WebKit2/UIProcess/WebBackForwardListItem.cpp b/WebKit2/UIProcess/WebBackForwardListItem.cpp
index 14edb81..423a544 100644
--- a/WebKit2/UIProcess/WebBackForwardListItem.cpp
+++ b/WebKit2/UIProcess/WebBackForwardListItem.cpp
@@ -27,13 +27,14 @@
namespace WebKit {
-WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID)
+WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID)
: m_originalURL(originalURL)
, m_url(url)
, m_title(title)
, m_itemID(itemID)
- , m_backForwardData(backForwardData)
{
+ m_backForwardData.reserveCapacity(backForwardDataSize);
+ m_backForwardData.append(backForwardData, backForwardDataSize);
}
WebBackForwardListItem::~WebBackForwardListItem()
diff --git a/WebKit2/UIProcess/WebBackForwardListItem.h b/WebKit2/UIProcess/WebBackForwardListItem.h
index 7106c87..72f126c 100644
--- a/WebKit2/UIProcess/WebBackForwardListItem.h
+++ b/WebKit2/UIProcess/WebBackForwardListItem.h
@@ -38,9 +38,9 @@ class WebBackForwardListItem : public APIObject {
public:
static const Type APIType = TypeBackForwardListItem;
- static PassRefPtr<WebBackForwardListItem> create(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID)
+ static PassRefPtr<WebBackForwardListItem> create(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID)
{
- return adoptRef(new WebBackForwardListItem(originalURL, url, title, backForwardData, itemID));
+ return adoptRef(new WebBackForwardListItem(originalURL, url, title, backForwardData, backForwardDataSize, itemID));
}
virtual ~WebBackForwardListItem();
@@ -60,7 +60,7 @@ public:
const Vector<uint8_t>& backForwardData() const { return m_backForwardData; }
private:
- WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID);
+ WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID);
virtual Type type() const { return APIType; }
diff --git a/WebKit2/UIProcess/WebProcessProxy.cpp b/WebKit2/UIProcess/WebProcessProxy.cpp
index 9ee923a..11f2529 100644
--- a/WebKit2/UIProcess/WebProcessProxy.cpp
+++ b/WebKit2/UIProcess/WebProcessProxy.cpp
@@ -188,7 +188,7 @@ void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& original
std::pair<WebBackForwardListItemMap::iterator, bool> result = m_backForwardListItemMap.add(itemID, 0);
if (result.second) {
// New item.
- result.first->second = WebBackForwardListItem::create(originalURL, url, title, backForwardData, itemID);
+ result.first->second = WebBackForwardListItem::create(originalURL, url, title, backForwardData.data(), backForwardData.size(), itemID);
return;
}
diff --git a/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp b/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp
index 6a214df..9b0a437 100644
--- a/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp
+++ b/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp
@@ -36,6 +36,8 @@ DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryCurrentIndexKey, (CFSTR("Session
DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryEntriesKey, (CFSTR("SessionHistoryEntries")));
DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryEntryTitleKey, (CFSTR("SessionHistoryEntryTitle")));
DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryEntryURLKey, (CFSTR("SessionHistoryEntryURL")));
+DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryEntryOriginalURLKey, (CFSTR("SessionHistoryEntryOriginalURL")));
+DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryEntryDataKey, (CFSTR("SessionHistoryEntryData")));
CFDictionaryRef WebBackForwardList::createCFDictionaryRepresentation(WebPageProxy::WebPageProxySessionStateFilterCallback filter, void* context) const
{
@@ -54,11 +56,13 @@ CFDictionaryRef WebBackForwardList::createCFDictionaryRepresentation(WebPageProx
RetainPtr<CFStringRef> url(AdoptCF, m_entries[i]->url().createCFString());
RetainPtr<CFStringRef> title(AdoptCF, m_entries[i]->title().createCFString());
+ RetainPtr<CFStringRef> originalURL(AdoptCF, m_entries[i]->originalURL().createCFString());
+ RetainPtr<CFDataRef> entryData(AdoptCF, CFDataCreate(kCFAllocatorDefault, m_entries[i]->backForwardData().data(), m_entries[i]->backForwardData().size()));
- const void* keys[2] = { SessionHistoryEntryURLKey(), SessionHistoryEntryTitleKey() };
- const void* values[2] = { url.get(), title.get() };
+ const void* keys[4] = { SessionHistoryEntryURLKey(), SessionHistoryEntryTitleKey(), SessionHistoryEntryOriginalURLKey(), SessionHistoryEntryDataKey() };
+ const void* values[4] = { url.get(), title.get(), originalURL.get(), entryData.get() };
- RetainPtr<CFDictionaryRef> entryDictionary(AdoptCF, CFDictionaryCreate(0, keys, values, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+ RetainPtr<CFDictionaryRef> entryDictionary(AdoptCF, CFDictionaryCreate(0, keys, values, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
CFArrayAppendValue(entries.get(), entryDictionary.get());
}
diff --git a/WebKit2/UIProcess/cf/WebPageProxyCF.cpp b/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
index 6f60d85..72bf8fb 100644
--- a/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
+++ b/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
@@ -38,7 +38,7 @@ namespace WebKit {
DEFINE_STATIC_GETTER(CFStringRef, SessionHistoryKey, (CFSTR("SessionHistory")));
-static const UInt32 CurrentSessionStateDataVersion = 1;
+static const UInt32 CurrentSessionStateDataVersion = 2;
PassRefPtr<WebData> WebPageProxy::sessionStateData(WebPageProxySessionStateFilterCallback filter, void* context) const
{
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list