Diff
Modified: trunk/Source/WebCore/ChangeLog (170624 => 170625)
--- trunk/Source/WebCore/ChangeLog 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebCore/ChangeLog 2014-07-01 01:06:35 UTC (rev 170625)
@@ -1,3 +1,12 @@
+2014-06-30 Anders Carlsson <[email protected]>
+
+ Change the AddBackForwardItem message to take a page state object
+ https://bugs.webkit.org/show_bug.cgi?id=134475
+
+ Reviewed by Andreas Kling.
+
+ * WebCore.exp.in:
+
2014-06-30 Benjamin Poulain <[email protected]>
[iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
Modified: trunk/Source/WebCore/WebCore.exp.in (170624 => 170625)
--- trunk/Source/WebCore/WebCore.exp.in 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-07-01 01:06:35 UTC (rev 170625)
@@ -1583,6 +1583,7 @@
__ZNK7WebCore11HistoryItem12redirectURLsEv
__ZNK7WebCore11HistoryItem13documentStateEv
__ZNK7WebCore11HistoryItem14alternateTitleEv
+__ZNK7WebCore11HistoryItem15formContentTypeEv
__ZNK7WebCore11HistoryItem15pageScaleFactorEv
__ZNK7WebCore11HistoryItem17originalURLStringEv
__ZNK7WebCore11HistoryItem19childItemWithTargetERKN3WTF6StringE
Modified: trunk/Source/WebKit2/ChangeLog (170624 => 170625)
--- trunk/Source/WebKit2/ChangeLog 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/ChangeLog 2014-07-01 01:06:35 UTC (rev 170625)
@@ -1,3 +1,25 @@
+2014-06-30 Anders Carlsson <[email protected]>
+
+ Change the AddBackForwardItem message to take a page state object
+ https://bugs.webkit.org/show_bug.cgi?id=134475
+
+ Reviewed by Andreas Kling.
+
+ * Scripts/webkit2/messages.py:
+ (struct_or_class):
+ (headers_for_type):
+ * Shared/WebBackForwardListItem.cpp:
+ (WebKit::WebBackForwardListItem::create):
+ (WebKit::WebBackForwardListItem::WebBackForwardListItem):
+ * Shared/WebBackForwardListItem.h:
+ (WebKit::WebBackForwardListItem::setPageState):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::addBackForwardItem):
+ * UIProcess/WebProcessProxy.h:
+ * UIProcess/WebProcessProxy.messages.in:
+ * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+ (WebKit::updateBackForwardItem):
+
2014-06-30 Tim Horton <[email protected]>
[WK2] Add a flatter find-in-page current match indicator style
Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (170624 => 170625)
--- trunk/Source/WebKit2/Scripts/webkit2/messages.py 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py 2014-07-01 01:06:35 UTC (rev 170625)
@@ -203,6 +203,7 @@
'WebKit::InteractionInformationAtPosition',
'WebKit::NavigationActionData',
'WebKit::NetworkProcessCreationParameters',
+ 'WebKit::PageState',
'WebKit::PlatformPopupMenuData',
'WebKit::PluginCreationParameters',
'WebKit::PluginProcessCreationParameters',
@@ -437,6 +438,7 @@
'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
'WebCore::ViewportAttributes': ['<WebCore/ViewportArguments.h>'],
'WebKit::InjectedBundleUserMessageEncoder': [],
+ 'WebKit::PageState': ['"SessionState.h"'],
'WebKit::WebContextUserMessageEncoder': [],
'WebKit::WebGestureEvent': ['"WebEvent.h"'],
'WebKit::WebKeyboardEvent': ['"WebEvent.h"'],
Modified: trunk/Source/WebKit2/Shared/WebBackForwardListItem.cpp (170624 => 170625)
--- trunk/Source/WebKit2/Shared/WebBackForwardListItem.cpp 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/Shared/WebBackForwardListItem.cpp 2014-07-01 01:06:35 UTC (rev 170625)
@@ -35,6 +35,17 @@
static uint64_t highestUsedItemID = 0;
+PassRefPtr<WebBackForwardListItem> WebBackForwardListItem::create(uint64_t itemID, PageState pageState)
+{
+ return adoptRef(new WebBackForwardListItem(itemID, std::move(pageState)));
+}
+
+WebBackForwardListItem::WebBackForwardListItem(uint64_t itemID, PageState pageState)
+ : m_itemID(itemID)
+ , m_pageState(std::move(pageState))
+{
+}
+
WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID)
: m_itemID(itemID)
{
Modified: trunk/Source/WebKit2/Shared/WebBackForwardListItem.h (170624 => 170625)
--- trunk/Source/WebKit2/Shared/WebBackForwardListItem.h 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/Shared/WebBackForwardListItem.h 2014-07-01 01:06:35 UTC (rev 170625)
@@ -42,8 +42,12 @@
namespace WebKit {
+struct PageState;
+
class WebBackForwardListItem : public API::ObjectImpl<API::Object::Type::BackForwardListItem> {
public:
+ static PassRefPtr<WebBackForwardListItem> create(uint64_t itemID, PageState);
+
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, backForwardDataSize, itemID));
@@ -53,6 +57,8 @@
uint64_t itemID() const { return m_itemID; }
+ void setPageState(PageState pageState) { m_pageState = std::move(pageState); }
+
void setOriginalURL(const String& originalURL) { m_pageState.mainFrameState.originalURLString = originalURL; }
const String& originalURL() const { return m_pageState.mainFrameState.originalURLString; }
@@ -74,10 +80,12 @@
static uint64_t highedUsedItemID();
private:
+ WebBackForwardListItem(uint64_t itemID, PageState);
+
WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID);
+ uint64_t m_itemID;
PageState m_pageState;
- uint64_t m_itemID;
String m_snapshotUUID;
};
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (170624 => 170625)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2014-07-01 01:06:35 UTC (rev 170625)
@@ -310,22 +310,19 @@
}
#endif
-void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const IPC::DataReference& backForwardData)
+void WebProcessProxy::addBackForwardItem(uint64_t itemID, const PageState& pageState)
{
- MESSAGE_CHECK_URL(originalURL);
- MESSAGE_CHECK_URL(url);
+ MESSAGE_CHECK_URL(pageState.mainFrameState.originalURLString);
+ MESSAGE_CHECK_URL(pageState.mainFrameState.urlString);
- WebBackForwardListItemMap::AddResult result = m_backForwardListItemMap.add(itemID, nullptr);
- if (result.isNewEntry) {
- result.iterator->value = WebBackForwardListItem::create(originalURL, url, title, backForwardData.data(), backForwardData.size(), itemID);
+ auto& backForwardListItem = m_backForwardListItemMap.add(itemID, nullptr).iterator->value;
+ if (!backForwardListItem) {
+ backForwardListItem = WebBackForwardListItem::create(itemID, pageState);
return;
}
// Update existing item.
- result.iterator->value->setOriginalURL(originalURL);
- result.iterator->value->setURL(url);
- result.iterator->value->setTitle(title);
- result.iterator->value->setBackForwardData(backForwardData.data(), backForwardData.size());
+ backForwardListItem->setPageState(pageState);
}
#if ENABLE(NETSCAPE_PLUGIN_API)
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (170624 => 170625)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h 2014-07-01 01:06:35 UTC (rev 170625)
@@ -156,7 +156,7 @@
void disconnect();
// IPC message handlers.
- void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title, const IPC::DataReference& backForwardData);
+ void addBackForwardItem(uint64_t itemID, const PageState&);
void didDestroyFrame(uint64_t);
void shouldTerminate(bool& shouldTerminate);
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in (170624 => 170625)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in 2014-07-01 01:06:35 UTC (rev 170625)
@@ -28,7 +28,7 @@
DidPerformServerRedirect(uint64_t pageID, String sourceURLString, String destinationURLString, uint64_t frameID)
DidUpdateHistoryTitle(uint64_t pageID, String title, String url, uint64_t frameID)
- AddBackForwardItem(uint64_t itemID, String originalURL, String url, String title, IPC::DataReference backForwardData)
+ AddBackForwardItem(uint64_t itemID, WebKit::PageState pageState)
DidDestroyFrame(uint64_t frameID)
ShouldTerminate() -> (bool shouldTerminate)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (170624 => 170625)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp 2014-07-01 00:50:07 UTC (rev 170624)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp 2014-07-01 01:06:35 UTC (rev 170625)
@@ -26,8 +26,8 @@
#include "config.h"
#include "WebBackForwardListProxy.h"
-#include "DataReference.h"
-#include "EncoderAdapter.h"
+#include "SessionState.h"
+#include "SessionStateConversion.h"
#include "WebCoreArgumentCoders.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
@@ -84,10 +84,7 @@
static void updateBackForwardItem(uint64_t itemID, HistoryItem* item)
{
- EncoderAdapter encoder;
- item->encodeBackForwardTree(encoder);
-
- WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, item->originalURLString(), item->urlString(), item->title(), encoder.dataReference()), 0);
+ WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, toPageState(*item)), 0);
}
void WebBackForwardListProxy::addItemFromUIProcess(uint64_t itemID, PassRefPtr<WebCore::HistoryItem> prpItem)