<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170625] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170625">170625</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-06-30 18:06:35 -0700 (Mon, 30 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Change the AddBackForwardItem message to take a page state object
https://bugs.webkit.org/show_bug.cgi?id=134475
Reviewed by Andreas Kling.
Source/WebCore:
* WebCore.exp.in:
Source/WebKit2:
* 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):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2messagespy">trunk/Source/WebKit2/Scripts/webkit2/messages.py</a></li>
<li><a href="#trunkSourceWebKit2SharedWebBackForwardListItemcpp">trunk/Source/WebKit2/Shared/WebBackForwardListItem.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebBackForwardListItemh">trunk/Source/WebKit2/Shared/WebBackForwardListItem.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxyh">trunk/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxymessagesin">trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp">trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-06-30 Anders Carlsson <andersca@apple.com>
+
+ 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:
+
</ins><span class="cx"> 2014-06-30 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><span class="cx"> [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1583,6 +1583,7 @@
</span><span class="cx"> __ZNK7WebCore11HistoryItem12redirectURLsEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem13documentStateEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem14alternateTitleEv
</span><ins>+__ZNK7WebCore11HistoryItem15formContentTypeEv
</ins><span class="cx"> __ZNK7WebCore11HistoryItem15pageScaleFactorEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem17originalURLStringEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem19childItemWithTargetERKN3WTF6StringE
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-06-30 Anders Carlsson <andersca@apple.com>
+
+ 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):
+
</ins><span class="cx"> 2014-06-30 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> [WK2] Add a flatter find-in-page current match indicator style
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2messagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -203,6 +203,7 @@
</span><span class="cx"> 'WebKit::InteractionInformationAtPosition',
</span><span class="cx"> 'WebKit::NavigationActionData',
</span><span class="cx"> 'WebKit::NetworkProcessCreationParameters',
</span><ins>+ 'WebKit::PageState',
</ins><span class="cx"> 'WebKit::PlatformPopupMenuData',
</span><span class="cx"> 'WebKit::PluginCreationParameters',
</span><span class="cx"> 'WebKit::PluginProcessCreationParameters',
</span><span class="lines">@@ -437,6 +438,7 @@
</span><span class="cx"> 'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
</span><span class="cx"> 'WebCore::ViewportAttributes': ['<WebCore/ViewportArguments.h>'],
</span><span class="cx"> 'WebKit::InjectedBundleUserMessageEncoder': [],
</span><ins>+ 'WebKit::PageState': ['"SessionState.h"'],
</ins><span class="cx"> 'WebKit::WebContextUserMessageEncoder': [],
</span><span class="cx"> 'WebKit::WebGestureEvent': ['"WebEvent.h"'],
</span><span class="cx"> 'WebKit::WebKeyboardEvent': ['"WebEvent.h"'],
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebBackForwardListItemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebBackForwardListItem.cpp (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -35,6 +35,17 @@
</span><span class="cx">
</span><span class="cx"> static uint64_t highestUsedItemID = 0;
</span><span class="cx">
</span><ins>+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))
+{
+}
+
</ins><span class="cx"> WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID)
</span><span class="cx"> : m_itemID(itemID)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebBackForwardListItemh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebBackForwardListItem.h (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -42,8 +42,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+struct PageState;
+
</ins><span class="cx"> class WebBackForwardListItem : public API::ObjectImpl<API::Object::Type::BackForwardListItem> {
</span><span class="cx"> public:
</span><ins>+ static PassRefPtr<WebBackForwardListItem> create(uint64_t itemID, PageState);
+
</ins><span class="cx"> static PassRefPtr<WebBackForwardListItem> create(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(new WebBackForwardListItem(originalURL, url, title, backForwardData, backForwardDataSize, itemID));
</span><span class="lines">@@ -53,6 +57,8 @@
</span><span class="cx">
</span><span class="cx"> uint64_t itemID() const { return m_itemID; }
</span><span class="cx">
</span><ins>+ void setPageState(PageState pageState) { m_pageState = std::move(pageState); }
+
</ins><span class="cx"> void setOriginalURL(const String& originalURL) { m_pageState.mainFrameState.originalURLString = originalURL; }
</span><span class="cx"> const String& originalURL() const { return m_pageState.mainFrameState.originalURLString; }
</span><span class="cx">
</span><span class="lines">@@ -74,10 +80,12 @@
</span><span class="cx"> static uint64_t highedUsedItemID();
</span><span class="cx">
</span><span class="cx"> private:
</span><ins>+ WebBackForwardListItem(uint64_t itemID, PageState);
+
</ins><span class="cx"> WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const uint8_t* backForwardData, size_t backForwardDataSize, uint64_t itemID);
</span><span class="cx">
</span><ins>+ uint64_t m_itemID;
</ins><span class="cx"> PageState m_pageState;
</span><del>- uint64_t m_itemID;
</del><span class="cx"> String m_snapshotUUID;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -310,22 +310,19 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const IPC::DataReference& backForwardData)
</del><ins>+void WebProcessProxy::addBackForwardItem(uint64_t itemID, const PageState& pageState)
</ins><span class="cx"> {
</span><del>- MESSAGE_CHECK_URL(originalURL);
- MESSAGE_CHECK_URL(url);
</del><ins>+ MESSAGE_CHECK_URL(pageState.mainFrameState.originalURLString);
+ MESSAGE_CHECK_URL(pageState.mainFrameState.urlString);
</ins><span class="cx">
</span><del>- WebBackForwardListItemMap::AddResult result = m_backForwardListItemMap.add(itemID, nullptr);
- if (result.isNewEntry) {
- result.iterator->value = WebBackForwardListItem::create(originalURL, url, title, backForwardData.data(), backForwardData.size(), itemID);
</del><ins>+ auto& backForwardListItem = m_backForwardListItemMap.add(itemID, nullptr).iterator->value;
+ if (!backForwardListItem) {
+ backForwardListItem = WebBackForwardListItem::create(itemID, pageState);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Update existing item.
</span><del>- result.iterator->value->setOriginalURL(originalURL);
- result.iterator->value->setURL(url);
- result.iterator->value->setTitle(title);
- result.iterator->value->setBackForwardData(backForwardData.data(), backForwardData.size());
</del><ins>+ backForwardListItem->setPageState(pageState);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> void disconnect();
</span><span class="cx">
</span><span class="cx"> // IPC message handlers.
</span><del>- void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title, const IPC::DataReference& backForwardData);
</del><ins>+ void addBackForwardItem(uint64_t itemID, const PageState&);
</ins><span class="cx"> void didDestroyFrame(uint64_t);
</span><span class="cx">
</span><span class="cx"> void shouldTerminate(bool& shouldTerminate);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> DidPerformServerRedirect(uint64_t pageID, String sourceURLString, String destinationURLString, uint64_t frameID)
</span><span class="cx"> DidUpdateHistoryTitle(uint64_t pageID, String title, String url, uint64_t frameID)
</span><span class="cx">
</span><del>- AddBackForwardItem(uint64_t itemID, String originalURL, String url, String title, IPC::DataReference backForwardData)
</del><ins>+ AddBackForwardItem(uint64_t itemID, WebKit::PageState pageState)
</ins><span class="cx"> DidDestroyFrame(uint64_t frameID)
</span><span class="cx">
</span><span class="cx"> ShouldTerminate() -> (bool shouldTerminate)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (170624 => 170625)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WebBackForwardListProxy.h"
</span><span class="cx">
</span><del>-#include "DataReference.h"
-#include "EncoderAdapter.h"
</del><ins>+#include "SessionState.h"
+#include "SessionStateConversion.h"
</ins><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include "WebPageProxyMessages.h"
</span><span class="lines">@@ -84,10 +84,7 @@
</span><span class="cx">
</span><span class="cx"> static void updateBackForwardItem(uint64_t itemID, HistoryItem* item)
</span><span class="cx"> {
</span><del>- EncoderAdapter encoder;
- item->encodeBackForwardTree(encoder);
-
- WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, item->originalURLString(), item->urlString(), item->title(), encoder.dataReference()), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, toPageState(*item)), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebBackForwardListProxy::addItemFromUIProcess(uint64_t itemID, PassRefPtr<WebCore::HistoryItem> prpItem)
</span></span></pre>
</div>
</div>
</body>
</html>