Commit a70779f8 authored by beidson@apple.com's avatar beidson@apple.com

https://bugs.webkit.org/show_bug.cgi?id=51856

Pass encoded back/forward tree data from the WebProcess to the UIProcess

Reviewed by Darin Adler.

Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:
* UIProcess/API/C/WKBackForwardListItem.cpp:
* UIProcess/API/C/WKBackForwardListItem.h:
* UIProcess/API/qt/qwkhistory.cpp:
* UIProcess/API/qt/qwkhistory.h:
        
* UIProcess/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* UIProcess/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::backForwardData):
        
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
        
* UIProcess/WebProcessProxy.messages.in:
        
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 987a93b5
2011-01-04 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=51856
Pass encoded back/forward tree data from the WebProcess to the UIProcess
Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:
* UIProcess/API/C/WKBackForwardListItem.cpp:
* UIProcess/API/C/WKBackForwardListItem.h:
* UIProcess/API/qt/qwkhistory.cpp:
* UIProcess/API/qt/qwkhistory.h:
* UIProcess/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* UIProcess/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::backForwardData):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
2011-01-04 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -35,11 +35,6 @@ WKTypeID WKBackForwardListItemGetTypeID()
return toAPI(WebBackForwardListItem::APIType);
}
WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef itemRef)
{
return toCopiedURLAPI(toImpl(itemRef)->originalURL());
}
WKURLRef WKBackForwardListItemCopyURL(WKBackForwardListItemRef itemRef)
{
return toCopiedURLAPI(toImpl(itemRef)->url());
......
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -34,7 +34,6 @@ extern "C" {
WK_EXPORT WKTypeID WKBackForwardListItemGetTypeID();
WK_EXPORT WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef item);
WK_EXPORT WKURLRef WKBackForwardListItemCopyURL(WKBackForwardListItemRef item);
WK_EXPORT WKStringRef WKBackForwardListItemCopyTitle(WKBackForwardListItemRef item);
......
......@@ -84,14 +84,6 @@ QUrl QWKHistoryItem::url() const
return WKURLCopyQUrl(url.get());
}
QUrl QWKHistoryItem::originalUrl() const
{
if (!d->m_backForwardListItem)
return QUrl();
WKRetainPtr<WKURLRef> url = WKBackForwardListItemCopyOriginalURL(d->m_backForwardListItem.get());
return WKURLCopyQUrl(url.get());
}
QWKHistoryPrivate::QWKHistoryPrivate(WebKit::WebBackForwardList* list)
: m_backForwardList(list)
{
......
......@@ -47,7 +47,6 @@ public:
~QWKHistoryItem();
QString title() const;
QUrl url() const;
QUrl originalUrl() const;
private:
QWKHistoryItem(WKBackForwardListItemRef item);
......
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -27,11 +27,12 @@
namespace WebKit {
WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, uint64_t itemID)
WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID)
: m_originalURL(originalURL)
, m_url(url)
, m_title(title)
, m_itemID(itemID)
, m_backForwardData(backForwardData)
{
}
......
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -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, uint64_t itemID)
static PassRefPtr<WebBackForwardListItem> create(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID)
{
return adoptRef(new WebBackForwardListItem(originalURL, url, title, itemID));
return adoptRef(new WebBackForwardListItem(originalURL, url, title, backForwardData, itemID));
}
virtual ~WebBackForwardListItem();
......@@ -55,9 +55,12 @@ public:
void setTitle(const String& title) { m_title = title; }
const String& title() const { return m_title; }
void setBackForwardData(const Vector<uint8_t>& backForwardData) { m_backForwardData = backForwardData; }
const Vector<uint8_t>& backForwardData() const { return m_backForwardData; }
private:
WebBackForwardListItem(const String& originalURL, const String& url, const String& title, uint64_t itemID);
WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID);
virtual Type type() const { return APIType; }
......@@ -65,6 +68,7 @@ private:
String m_url;
String m_title;
uint64_t m_itemID;
Vector<uint8_t> m_backForwardData;
};
} // namespace WebKit
......
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -181,12 +181,12 @@ WebBackForwardListItem* WebProcessProxy::webBackForwardItem(uint64_t itemID) con
return m_backForwardListItemMap.get(itemID).get();
}
void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title)
void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData)
{
std::pair<WebBackForwardListItemMap::iterator, bool> result = m_backForwardListItemMap.add(itemID, 0);
if (result.second) {
// New item.
result.first->second = WebBackForwardListItem::create(originalURL, url, title, itemID);
result.first->second = WebBackForwardListItem::create(originalURL, url, title, backForwardData, itemID);
return;
}
......@@ -194,6 +194,7 @@ void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& original
result.first->second->setOriginalURL(originalURL);
result.first->second->setURL(url);
result.first->second->setTitle(title);
result.first->second->setBackForwardData(backForwardData);
}
#if ENABLE(PLUGIN_PROCESS)
......
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -109,7 +109,7 @@ private:
bool sendMessage(CoreIPC::MessageID, PassOwnPtr<CoreIPC::ArgumentEncoder>);
void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title);
void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title, const Vector<uint8_t>& encodedData);
#if ENABLE(PLUGIN_PROCESS)
void getPluginProcessConnection(const String& pluginPath, CoreIPC::ArgumentEncoder* reply);
......
# Copyright (C) 2010 Apple Inc. All rights reserved.
# Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
......@@ -22,7 +22,7 @@
messages -> WebProcessProxy {
AddBackForwardItem(uint64_t itemID, WTF::String originalURL, WTF::String url, WTF::String title)
AddBackForwardItem(uint64_t itemID, WTF::String originalURL, WTF::String url, WTF::String title, WTF::Vector<uint8_t> backForwardData)
DidDestroyFrame(uint64_t frameID)
}
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -87,7 +87,8 @@ static void updateBackForwardItem(HistoryItem* item)
const String& urlString = item->urlString();
const String& title = item->title();
WebProcess::shared().connection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, originalURLString, urlString, title), 0);
// FIXME: Pass the encoded backForwardData to the message here.
WebProcess::shared().connection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, originalURLString, urlString, title, Vector<uint8_t>()), 0);
}
static void WK2NotifyHistoryItemChanged(HistoryItem* item)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment