<!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>[168085] 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/168085">168085</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-04-30 22:49:09 -0700 (Wed, 30 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
Clean up unnecessary methods in the BackForwardClient interface

It broke a regression test and an API test.


Source/WebCore: 
* WebCore.exp.in:
* history/BackForwardClient.h:
(WebCore::BackForwardClient::backItem):
(WebCore::BackForwardClient::currentItem):
(WebCore::BackForwardClient::forwardItem):
* history/BackForwardController.cpp:
(WebCore::BackForwardController::BackForwardController):
* history/BackForwardController.h:
(WebCore::BackForwardController::client):
* history/BackForwardList.cpp:
(WebCore::BackForwardList::BackForwardList):
(WebCore::BackForwardList::close):
* history/BackForwardList.h:
(WebCore::BackForwardList::create):
(WebCore::BackForwardList::page):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::PageClients::PageClients):
* page/Page.h:

Source/WebKit/efl: 
* ewk/ewk_history.cpp:
(ewk_history_clear):
(ewk_history_new):
(ewk_history_free):
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
(ewk_view_history_enable_get):
(ewk_view_history_enable_set):
(ewk_view_history_get):

Source/WebKit/mac: 
* History/WebBackForwardList.mm:
(-[WebBackForwardList initWithBackForwardList:]):
(-[WebBackForwardList init]):
(-[WebBackForwardList dealloc]):
(-[WebBackForwardList finalize]):
(-[WebBackForwardList setPageCacheSize:]):
(-[WebBackForwardList pageCacheSize]):
* History/WebBackForwardListInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::canCachePage):
* WebView/WebFrameView.mm:
(-[WebFrameView keyDown:keyDown:]):
* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView initWithCoder:]):
(-[WebView encodeWithCoder:]):
(-[WebView backForwardList]):
(-[WebView setMaintainsBackForwardList:]):

Source/WebKit/win: 
* WebBackForwardList.cpp:
(WebBackForwardList::WebBackForwardList):
(WebBackForwardList::~WebBackForwardList):
(WebBackForwardList::createInstance):
* WebBackForwardList.h:
* WebView.cpp:
(WebView::backForwardList):
(WebView::canGoBack):
(WebView::canGoForward):
(WebView::loadBackForwardListFromOtherView):

Source/WebKit2: 
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
(WebKit::InjectedBundleBackForwardList::clear):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::backListCount):
(WebKit::WebBackForwardListProxy::forwardListCount):
(WebKit::WebBackForwardListProxy::close):
(WebKit::WebBackForwardListProxy::clear):
* WebProcess/WebPage/WebBackForwardListProxy.h:
(WebKit::WebBackForwardListProxy::create):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Copied from Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm.</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="#trunkSourceWebCorehistoryBackForwardClienth">trunk/Source/WebCore/history/BackForwardClient.h</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardControllercpp">trunk/Source/WebCore/history/BackForwardController.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardControllerh">trunk/Source/WebCore/history/BackForwardController.h</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardListcpp">trunk/Source/WebCore/history/BackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardListh">trunk/Source/WebCore/history/BackForwardList.h</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebKiteflChangeLog">trunk/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_historycpp">trunk/Source/WebKit/efl/ewk/ewk_history.cpp</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_viewcpp">trunk/Source/WebKit/efl/ewk/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebBackForwardListmm">trunk/Source/WebKit/mac/History/WebBackForwardList.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebBackForwardListInternalh">trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFrameViewmm">trunk/Source/WebKit/mac/WebView/WebFrameView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebBackForwardListcpp">trunk/Source/WebKit/win/WebBackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebBackForwardListh">trunk/Source/WebKit/win/WebBackForwardList.h</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundleBackForwardListcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp">trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxyh">trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/ChangeLog        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2014-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
+        Clean up unnecessary methods in the BackForwardClient interface
+
+        It broke a regression test and an API test.
+
+        * WebCore.exp.in:
+        * history/BackForwardClient.h:
+        (WebCore::BackForwardClient::backItem):
+        (WebCore::BackForwardClient::currentItem):
+        (WebCore::BackForwardClient::forwardItem):
+        * history/BackForwardController.cpp:
+        (WebCore::BackForwardController::BackForwardController):
+        * history/BackForwardController.h:
+        (WebCore::BackForwardController::client):
+        * history/BackForwardList.cpp:
+        (WebCore::BackForwardList::BackForwardList):
+        (WebCore::BackForwardList::close):
+        * history/BackForwardList.h:
+        (WebCore::BackForwardList::create):
+        (WebCore::BackForwardList::page):
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::PageClients::PageClients):
+        * page/Page.h:
+
</ins><span class="cx"> 2014-04-30  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         More iOS build fixing. MediaPlayerPrivateIOS is defunct and can be removed.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx"> __ZN7WebCore15BackForwardList8backItemEv
</span><span class="cx"> __ZN7WebCore15BackForwardList8capacityEv
</span><span class="cx"> __ZN7WebCore15BackForwardList9goForwardEv
</span><del>-__ZN7WebCore15BackForwardListC1Ev
</del><ins>+__ZN7WebCore15BackForwardListC1EPNS_4PageE
</ins><span class="cx"> __ZN7WebCore15CertificateInfoC1EPK9__CFArray
</span><span class="cx"> __ZN7WebCore15CertificateInfoC1ERKNS_16ResourceResponseE
</span><span class="cx"> __ZN7WebCore15CertificateInfoC1Ev
</span><span class="lines">@@ -867,7 +867,6 @@
</span><span class="cx"> __ZN7WebCore21AudioHardwareListener6createERNS0_6ClientE
</span><span class="cx"> __ZN7WebCore21BackForwardController11itemAtIndexEi
</span><span class="cx"> __ZN7WebCore21BackForwardController6goBackEv
</span><del>-__ZN7WebCore21BackForwardController7addItemEN3WTF10PassRefPtrINS_11HistoryItemEEE
</del><span class="cx"> __ZN7WebCore21BackForwardController9goForwardEv
</span><span class="cx"> __ZN7WebCore21CrossThreadCopierBaseILb0ELb0EN3WTF6StringEE4copyERKS2_
</span><span class="cx"> __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_19IDBDatabaseMetadataEE4copyERKS1_
</span><span class="lines">@@ -2497,9 +2496,6 @@
</span><span class="cx"> __ZN7WebCore14ResourceHandleD1Ev
</span><span class="cx"> __ZN7WebCore14areRangesEqualEPKNS_5RangeES2_
</span><span class="cx"> __ZN7WebCore14cookiesEnabledERKNS_21NetworkStorageSessionERKNS_3URLES5_
</span><del>-__ZN7WebCore15BackForwardList7currentEv
-__ZN7WebCore15BackForwardList10setCurrentEj
-__ZN7WebCore15BackForwardList18clearAllPageCachesEv
</del><span class="cx"> __ZN7WebCore15DatabaseTracker18setDatabasesPausedEb
</span><span class="cx"> __ZN7WebCore15DatabaseTracker25deleteDatabaseFileIfEmptyERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore15DatabaseTracker28removeDeletedOpenedDatabasesEv
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardClient.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardClient.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/history/BackForwardClient.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -29,13 +29,14 @@
</span><span class="cx"> #define BackForwardClient_h
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><ins>+#include &lt;wtf/RefCounted.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class HistoryItem;
</span><span class="cx"> 
</span><del>-class BackForwardClient {
-public:
</del><ins>+class BackForwardClient : public RefCounted&lt;BackForwardClient&gt; {
+public: 
</ins><span class="cx">     virtual ~BackForwardClient()
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -43,12 +44,27 @@
</span><span class="cx">     virtual void addItem(PassRefPtr&lt;HistoryItem&gt;) = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void goToItem(HistoryItem*) = 0;
</span><del>-
</del><ins>+        
</ins><span class="cx">     virtual HistoryItem* itemAtIndex(int) = 0;
</span><span class="cx">     virtual int backListCount() = 0;
</span><span class="cx">     virtual int forwardListCount() = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void close() = 0;
</span><ins>+
+#if PLATFORM(IOS)
+    // FIXME: These methods seem to violate the encapsulation of this class.
+    virtual unsigned current() = 0;
+    virtual void setCurrent(unsigned newCurrent) = 0;
+
+    // FIXME: Consider renaming this method once we upstream the iOS changes to WebView.mm.
+    virtual bool clearAllPageCaches() = 0;
+#endif
+
+    // FIXME: Delete these once all callers are using BackForwardController
+    // instead of calling this directly.
+    HistoryItem* backItem() { return itemAtIndex(-1); }
+    HistoryItem* currentItem() { return itemAtIndex(0); }
+    HistoryItem* forwardItem() { return itemAtIndex(1); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardController.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardController.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/history/BackForwardController.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -32,12 +32,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-BackForwardController::BackForwardController(Page&amp; page, std::unique_ptr&lt;BackForwardClient&gt; client)
</del><ins>+BackForwardController::BackForwardController(Page&amp; page, PassRefPtr&lt;BackForwardClient&gt; client)
</ins><span class="cx">     : m_page(page)
</span><del>-    , m_client(std::move(client))
</del><ins>+    , m_client(client)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client)
</span><del>-        m_client = std::make_unique&lt;BackForwardList&gt;();
</del><ins>+        m_client = BackForwardList::create(&amp;page);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> BackForwardController::~BackForwardController()
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardController.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardController.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/history/BackForwardController.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><ins>+#include &lt;wtf/RefPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -38,11 +39,10 @@
</span><span class="cx"> class BackForwardController {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(BackForwardController); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    BackForwardController(Page&amp;, std::unique_ptr&lt;BackForwardClient&gt;);
</del><ins>+    BackForwardController(Page&amp;, PassRefPtr&lt;BackForwardClient&gt;);
</ins><span class="cx">     ~BackForwardController();
</span><span class="cx"> 
</span><del>-    // FIXME: Remove uses of this getter. &lt;https://webkit.org/b/132027&gt;
-    BackForwardClient&amp; client() const { return *m_client; }
</del><ins>+    BackForwardClient* client() const { return m_client.get(); }
</ins><span class="cx"> 
</span><span class="cx">     bool canGoBackOrForward(int distance) const;
</span><span class="cx">     void goBackOrForward(int distance);
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx">     void addItem(PassRefPtr&lt;HistoryItem&gt;);
</span><span class="cx">     void setCurrentItem(HistoryItem*);
</span><del>-
</del><ins>+        
</ins><span class="cx">     int count() const;
</span><span class="cx">     int backCount() const;
</span><span class="cx">     int forwardCount() const;
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     Page&amp; m_page;
</span><del>-    std::unique_ptr&lt;BackForwardClient&gt; m_client;
</del><ins>+    RefPtr&lt;BackForwardClient&gt; m_client;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardList.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardList.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/history/BackForwardList.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;FrameLoaderClient.h&quot;
</span><span class="cx"> #include &quot;HistoryItem.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;Page.h&quot;
</ins><span class="cx"> #include &quot;PageCache.h&quot;
</span><span class="cx"> #include &quot;SerializedScriptValue.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -40,8 +41,9 @@
</span><span class="cx"> static const unsigned DefaultCapacity = 100;
</span><span class="cx"> static const unsigned NoCurrentItemIndex = UINT_MAX;
</span><span class="cx"> 
</span><del>-BackForwardList::BackForwardList()
-    : m_current(NoCurrentItemIndex)
</del><ins>+BackForwardList::BackForwardList(Page* page)
+    : m_page(page)
+    , m_current(NoCurrentItemIndex)
</ins><span class="cx">     , m_capacity(DefaultCapacity)
</span><span class="cx">     , m_closed(true)
</span><span class="cx">     , m_enabled(true)
</span><span class="lines">@@ -259,6 +261,7 @@
</span><span class="cx">         pageCache()-&gt;remove(m_entries[i].get());
</span><span class="cx">     m_entries.clear();
</span><span class="cx">     m_entryHash.clear();
</span><ins>+    m_page = 0;
</ins><span class="cx">     m_closed = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardList.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardList.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/history/BackForwardList.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -34,19 +34,23 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class Page;
+
</ins><span class="cx"> typedef Vector&lt;RefPtr&lt;HistoryItem&gt;&gt; HistoryItemVector;
</span><span class="cx"> typedef HashSet&lt;RefPtr&lt;HistoryItem&gt;&gt; HistoryItemHashSet;
</span><span class="cx"> 
</span><span class="cx"> class BackForwardList : public BackForwardClient {
</span><del>-public:
-    BackForwardList();
</del><ins>+public: 
+    static PassRefPtr&lt;BackForwardList&gt; create(Page* page) { return adoptRef(new BackForwardList(page)); }
</ins><span class="cx">     virtual ~BackForwardList();
</span><span class="cx"> 
</span><ins>+    Page* page() { return m_page; }
+
</ins><span class="cx">     virtual void addItem(PassRefPtr&lt;HistoryItem&gt;) override;
</span><span class="cx">     void goBack();
</span><span class="cx">     void goForward();
</span><span class="cx">     virtual void goToItem(HistoryItem*) override;
</span><del>-
</del><ins>+        
</ins><span class="cx">     HistoryItem* backItem();
</span><span class="cx">     HistoryItem* currentItem();
</span><span class="cx">     HistoryItem* forwardItem();
</span><span class="lines">@@ -70,13 +74,16 @@
</span><span class="cx">     HistoryItemVector&amp; entries();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    unsigned current();
-    void setCurrent(unsigned newCurrent);
</del><ins>+    virtual unsigned current() override;
+    virtual void setCurrent(unsigned newCurrent) override;
</ins><span class="cx"> 
</span><del>-    bool clearAllPageCaches();
</del><ins>+    virtual bool clearAllPageCaches() override;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    explicit BackForwardList(Page*);
+
+    Page* m_page;
</ins><span class="cx">     HistoryItemVector m_entries;
</span><span class="cx">     HistoryItemHashSet m_entryHash;
</span><span class="cx">     unsigned m_current;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/page/Page.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_settings(Settings::create(this))
</span><span class="cx">     , m_progress(std::make_unique&lt;ProgressTracker&gt;(*pageClients.progressTrackerClient))
</span><del>-    , m_backForwardController(std::make_unique&lt;BackForwardController&gt;(*this, std::move(pageClients.backForwardClient)))
</del><ins>+    , m_backForwardController(std::make_unique&lt;BackForwardController&gt;(*this, pageClients.backForwardClient))
</ins><span class="cx">     , m_mainFrame(MainFrame::create(*this, *pageClients.loaderClientForMainFrame))
</span><span class="cx">     , m_theme(RenderTheme::themeForPage(this))
</span><span class="cx">     , m_editorClient(pageClients.editorClient)
</span><span class="lines">@@ -1605,7 +1605,6 @@
</span><span class="cx">     , inspectorClient(nullptr)
</span><span class="cx">     , plugInClient(nullptr)
</span><span class="cx">     , progressTrackerClient(nullptr)
</span><del>-    , backForwardClient(nullptr)
</del><span class="cx">     , validationMessageClient(nullptr)
</span><span class="cx">     , loaderClientForMainFrame(nullptr)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebCore/page/Page.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">         InspectorClient* inspectorClient;
</span><span class="cx">         PlugInClient* plugInClient;
</span><span class="cx">         ProgressTrackerClient* progressTrackerClient;
</span><del>-        std::unique_ptr&lt;BackForwardClient&gt; backForwardClient;
</del><ins>+        RefPtr&lt;BackForwardClient&gt; backForwardClient;
</ins><span class="cx">         ValidationMessageClient* validationMessageClient;
</span><span class="cx">         FrameLoaderClient* loaderClientForMainFrame;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ChangeLog (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ChangeLog        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/efl/ChangeLog        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
+        Clean up unnecessary methods in the BackForwardClient interface
+
+        It broke a regression test and an API test.
+
+        * ewk/ewk_history.cpp:
+        (ewk_history_clear):
+        (ewk_history_new):
+        (ewk_history_free):
+        * ewk/ewk_view.cpp:
+        (_ewk_view_priv_new):
+        (ewk_view_history_enable_get):
+        (ewk_view_history_enable_set):
+        (ewk_view_history_get):
+
</ins><span class="cx"> 2014-04-30  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
</span><span class="cx"> 
</span><span class="cx">         Clean up unnecessary methods in the BackForwardClient interface
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_historycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_history.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_history.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/efl/ewk/ewk_history.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -92,8 +92,12 @@
</span><span class="cx"> 
</span><span class="cx"> Eina_Bool ewk_history_clear(Ewk_History* history)
</span><span class="cx"> {
</span><del>-    WebCore::PageGroup::removeAllVisitedLinks();
</del><ins>+    EWK_HISTORY_CORE_GET_OR_RETURN(history, core, false);
</ins><span class="cx"> 
</span><ins>+    WebCore::Page* page = core-&gt;page();
+    if (page &amp;&amp; page-&gt;groupPtr())
+        page-&gt;groupPtr()-&gt;removeVisitedLinks();
+
</ins><span class="cx">     const int limit = ewk_history_limit_get(history);
</span><span class="cx">     ewk_history_limit_set(history, 0);
</span><span class="cx">     ewk_history_limit_set(history, limit);
</span><span class="lines">@@ -368,6 +372,7 @@
</span><span class="cx"> 
</span><span class="cx">     history = new Ewk_History;
</span><span class="cx">     history-&gt;core = core;
</span><ins>+    core-&gt;ref();
</ins><span class="cx"> 
</span><span class="cx">     return history;
</span><span class="cx"> }
</span><span class="lines">@@ -383,6 +388,7 @@
</span><span class="cx"> void ewk_history_free(Ewk_History* history)
</span><span class="cx"> {
</span><span class="cx">     DBG(&quot;history=%p&quot;, history);
</span><ins>+    history-&gt;core-&gt;deref();
</ins><span class="cx">     delete history;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -752,7 +752,7 @@
</span><span class="cx">     priv-&gt;settings.allowUniversalAccessFromFileURLs = pageSettings.allowUniversalAccessFromFileURLs();
</span><span class="cx">     priv-&gt;settings.allowFileAccessFromFileURLs = pageSettings.allowFileAccessFromFileURLs();
</span><span class="cx"> 
</span><del>-    priv-&gt;history = ewk_history_new(static_cast&lt;WebCore::BackForwardList*&gt;(&amp;priv-&gt;page-&gt;backForward().client()));
</del><ins>+    priv-&gt;history = ewk_history_new(static_cast&lt;WebCore::BackForwardList*&gt;(priv-&gt;page-&gt;backForward().client()));
</ins><span class="cx"> 
</span><span class="cx"> #ifdef HAVE_ECORE_X
</span><span class="cx">     priv-&gt;isUsingEcoreX = WebCore::isUsingEcoreX(smartData-&gt;base.evas);
</span><span class="lines">@@ -1653,14 +1653,14 @@
</span><span class="cx"> {
</span><span class="cx">     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
</span><del>-    return static_cast&lt;WebCore::BackForwardList&amp;&gt;(priv-&gt;page-&gt;backForward().client()).enabled();
</del><ins>+    return static_cast&lt;WebCore::BackForwardList*&gt;(priv-&gt;page-&gt;backForward().client())-&gt;enabled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Eina_Bool ewk_view_history_enable_set(Evas_Object* ewkView, Eina_Bool enable)
</span><span class="cx"> {
</span><span class="cx">     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
</span><del>-    static_cast&lt;WebCore::BackForwardList&amp;&gt;(priv-&gt;page-&gt;backForward().client()).setEnabled(enable);
</del><ins>+    static_cast&lt;WebCore::BackForwardList*&gt;(priv-&gt;page-&gt;backForward().client())-&gt;setEnabled(enable);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1668,7 +1668,7 @@
</span><span class="cx"> {
</span><span class="cx">     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
</span><del>-    if (!static_cast&lt;WebCore::BackForwardList&amp;&gt;(priv-&gt;page-&gt;backForward().client()).enabled()) {
</del><ins>+    if (!static_cast&lt;WebCore::BackForwardList*&gt;(priv-&gt;page-&gt;backForward().client())-&gt;enabled()) {
</ins><span class="cx">         ERR(&quot;asked history, but it's disabled! Returning 0!&quot;);
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
+        Clean up unnecessary methods in the BackForwardClient interface
+
+        It broke a regression test and an API test.
+
+        * History/WebBackForwardList.mm:
+        (-[WebBackForwardList initWithBackForwardList:]):
+        (-[WebBackForwardList init]):
+        (-[WebBackForwardList dealloc]):
+        (-[WebBackForwardList finalize]):
+        (-[WebBackForwardList setPageCacheSize:]):
+        (-[WebBackForwardList pageCacheSize]):
+        * History/WebBackForwardListInternal.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::canCachePage):
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView keyDown:keyDown:]):
+        * WebView/WebView.mm:
+        (-[WebView _loadBackForwardListFromOtherView:]):
+        (-[WebView initWithCoder:]):
+        (-[WebView encodeWithCoder:]):
+        (-[WebView backForwardList]):
+        (-[WebView setMaintainsBackForwardList:]):
+
</ins><span class="cx"> 2014-04-30  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebBackForwardListmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebBackForwardList.mm (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebBackForwardList.mm        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/mac/History/WebBackForwardList.mm        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -85,14 +85,14 @@
</span><span class="cx">     return [[[WebBackForwardList alloc] initWithBackForwardList:backForwardList] autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (id)initWithBackForwardList:(BackForwardList*)backForwardList
</del><ins>+- (id)initWithBackForwardList:(PassRefPtr&lt;BackForwardList&gt;)backForwardList
</ins><span class="cx"> {   
</span><span class="cx">     WebCoreThreadViolationCheckRoundOne();
</span><span class="cx">     self = [super init];
</span><span class="cx">     if (!self)
</span><span class="cx">         return nil;
</span><span class="cx"> 
</span><del>-    _private = reinterpret_cast&lt;WebBackForwardListPrivate*&gt;(backForwardList);
</del><ins>+    _private = reinterpret_cast&lt;WebBackForwardListPrivate*&gt;(backForwardList.leakRef());
</ins><span class="cx">     backForwardLists().set(core(self), self);
</span><span class="cx">     return self;
</span><span class="cx"> }
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (id)init
</span><span class="cx"> {
</span><del>-    return [self initWithBackForwardList:new BackForwardList];
</del><ins>+    return [self initWithBackForwardList:BackForwardList::create(0)];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)dealloc
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">     if (backForwardList) {
</span><span class="cx">         ASSERT(backForwardList-&gt;closed());
</span><span class="cx">         backForwardLists().remove(backForwardList);
</span><del>-        delete backForwardList;
</del><ins>+        backForwardList-&gt;deref();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     [super dealloc];
</span><span class="lines">@@ -140,9 +140,9 @@
</span><span class="cx">     if (backForwardList) {
</span><span class="cx">         ASSERT(backForwardList-&gt;closed());
</span><span class="cx">         backForwardLists().remove(backForwardList);
</span><del>-        delete backForwardList;
</del><ins>+        backForwardList-&gt;deref();
</ins><span class="cx">     }
</span><del>-
</del><ins>+        
</ins><span class="cx">     [super finalize];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -348,6 +348,16 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)setPageCacheSize:(NSUInteger)size
+{
+    [kit(core(self)-&gt;page()) setUsesPageCache:size != 0];
+}
+
+- (NSUInteger)pageCacheSize
+{
+    return [kit(core(self)-&gt;page()) usesPageCache] ? pageCache()-&gt;capacity() : 0;
+}
+
</ins><span class="cx"> - (int)backListCount
</span><span class="cx"> {
</span><span class="cx">     return core(self)-&gt;backListCount();
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebBackForwardListInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #import &lt;WebKitLegacy/WebBackForwardList.h&gt;
</span><ins>+#import &lt;wtf/PassRefPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class BackForwardList;
</span><span class="lines">@@ -36,5 +37,5 @@
</span><span class="cx"> WebBackForwardList *kit(WebCore::BackForwardList*);
</span><span class="cx"> 
</span><span class="cx"> @interface WebBackForwardList (WebBackForwardListInternal)
</span><del>-- (id)initWithBackForwardList:(WebCore::BackForwardList*)backForwardList;
</del><ins>+- (id)initWithBackForwardList:(PassRefPtr&lt;WebCore::BackForwardList&gt;)backForwardList;
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -1563,11 +1563,11 @@
</span><span class="cx">     if (!page)
</span><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    BackForwardList&amp; backForwardList = static_cast&lt;BackForwardList&amp;&gt;(page-&gt;backForward().client());
-    if (!backForwardList.enabled())
</del><ins>+    BackForwardList *backForwardList = static_cast&lt;BackForwardList*&gt;(page-&gt;backForward().client());
+    if (!backForwardList-&gt;enabled())
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    if (!backForwardList.capacity())
</del><ins>+    if (!backForwardList-&gt;capacity())
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFrameViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -927,7 +927,7 @@
</span><span class="cx">     int index, count;
</span><span class="cx">     BOOL callSuper = YES;
</span><span class="cx">     Frame* coreFrame = [self _web_frame];
</span><del>-    BOOL maintainsBackForwardList = coreFrame &amp;&amp; static_cast&lt;BackForwardList&amp;&gt;(coreFrame-&gt;page()-&gt;backForward().client()).enabled() ? YES : NO;
</del><ins>+    BOOL maintainsBackForwardList = coreFrame &amp;&amp; static_cast&lt;BackForwardList*&gt;(coreFrame-&gt;page()-&gt;backForward().client())-&gt;enabled() ? YES : NO;
</ins><span class="cx">     
</span><span class="cx">     count = [characters length];
</span><span class="cx">     for (index = 0; index &lt; count; ++index) {
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -2001,31 +2001,32 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     // It turns out the right combination of behavior is done with the back/forward load
</span><del>-    // type. (See behavior matrix at the top of WebFramePrivate.)  So we copy all the items
</del><ins>+    // type.  (See behavior matrix at the top of WebFramePrivate.)  So we copy all the items
</ins><span class="cx">     // in the back forward list, and go to the current one.
</span><del>-    BackForwardController&amp; backForward = _private-&gt;page-&gt;backForward();
-    ASSERT(!backForward.currentItem()); // destination list should be empty
</del><span class="cx"> 
</span><del>-    BackForwardController&amp; otherBackForward = otherView-&gt;_private-&gt;page-&gt;backForward();
-    if (!otherBackForward.currentItem())
</del><ins>+    BackForwardClient* backForwardClient = _private-&gt;page-&gt;backForward().client();
+    ASSERT(!backForwardClient-&gt;currentItem()); // destination list should be empty
+
+    BackForwardClient* otherBackForwardClient = otherView-&gt;_private-&gt;page-&gt;backForward().client();
+    if (!otherBackForwardClient-&gt;currentItem())
</ins><span class="cx">         return; // empty back forward list, bail
</span><del>-
</del><ins>+    
</ins><span class="cx">     HistoryItem* newItemToGoTo = 0;
</span><span class="cx"> 
</span><del>-    int lastItemIndex = otherBackForward.forwardCount();
-    for (int i = -otherBackForward.backCount(); i &lt;= lastItemIndex; ++i) {
</del><ins>+    int lastItemIndex = otherBackForwardClient-&gt;forwardListCount();
+    for (int i = -otherBackForwardClient-&gt;backListCount(); i &lt;= lastItemIndex; ++i) {
</ins><span class="cx">         if (i == 0) {
</span><del>-            // If this item is showing, save away its current scroll and form state,
</del><ins>+            // If this item is showing , save away its current scroll and form state,
</ins><span class="cx">             // since that might have changed since loading and it is normally not saved
</span><span class="cx">             // until we leave that page.
</span><span class="cx">             otherView-&gt;_private-&gt;page-&gt;mainFrame().loader().history().saveDocumentAndScrollState();
</span><span class="cx">         }
</span><del>-        RefPtr&lt;HistoryItem&gt; newItem = otherBackForward.itemAtIndex(i)-&gt;copy();
-        if (i == 0)
</del><ins>+        RefPtr&lt;HistoryItem&gt; newItem = otherBackForwardClient-&gt;itemAtIndex(i)-&gt;copy();
+        if (i == 0) 
</ins><span class="cx">             newItemToGoTo = newItem.get();
</span><del>-        backForward.addItem(newItem.release());
</del><ins>+        backForwardClient-&gt;addItem(newItem.release());
</ins><span class="cx">     }
</span><del>-
</del><ins>+    
</ins><span class="cx">     ASSERT(newItemToGoTo);
</span><span class="cx">     _private-&gt;page-&gt;goToItem(newItemToGoTo, FrameLoadTypeIndexedBackForward);
</span><span class="cx"> }
</span><span class="lines">@@ -5095,7 +5096,7 @@
</span><span class="cx"> 
</span><span class="cx">         LOG(Encoding, &quot;FrameName = %@, GroupName = %@, useBackForwardList = %d\n&quot;, frameName, groupName, (int)useBackForwardList);
</span><span class="cx">         [result _commonInitializationWithFrameName:frameName groupName:groupName];
</span><del>-        static_cast&lt;BackForwardList&amp;&gt;([result page]-&gt;backForward().client()).setEnabled(useBackForwardList);
</del><ins>+        static_cast&lt;BackForwardList*&gt;([result page]-&gt;backForward().client())-&gt;setEnabled(useBackForwardList);
</ins><span class="cx">         result-&gt;_private-&gt;allowsUndo = allowsUndo;
</span><span class="cx">         if (preferences)
</span><span class="cx">             [result setPreferences:preferences];
</span><span class="lines">@@ -5119,7 +5120,7 @@
</span><span class="cx">     // Restore the subviews we set aside.
</span><span class="cx">     _subviews = originalSubviews;
</span><span class="cx"> 
</span><del>-    BOOL useBackForwardList = _private-&gt;page &amp;&amp; static_cast&lt;BackForwardList&amp;&gt;(_private-&gt;page-&gt;backForward().client()).enabled();
</del><ins>+    BOOL useBackForwardList = _private-&gt;page &amp;&amp; static_cast&lt;BackForwardList*&gt;(_private-&gt;page-&gt;backForward().client())-&gt;enabled();
</ins><span class="cx">     if ([encoder allowsKeyedCoding]) {
</span><span class="cx">         [encoder encodeObject:[[self mainFrame] name] forKey:@&quot;FrameName&quot;];
</span><span class="cx">         [encoder encodeObject:[self groupName] forKey:@&quot;GroupName&quot;];
</span><span class="lines">@@ -5589,17 +5590,17 @@
</span><span class="cx"> {
</span><span class="cx">     if (!_private-&gt;page)
</span><span class="cx">         return nil;
</span><del>-    BackForwardList&amp; list = static_cast&lt;BackForwardList&amp;&gt;(_private-&gt;page-&gt;backForward().client());
-    if (!list.enabled())
</del><ins>+    BackForwardList* list = static_cast&lt;BackForwardList*&gt;(_private-&gt;page-&gt;backForward().client());
+    if (!list-&gt;enabled())
</ins><span class="cx">         return nil;
</span><del>-    return kit(&amp;list);
</del><ins>+    return kit(list);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setMaintainsBackForwardList:(BOOL)flag
</span><span class="cx"> {
</span><span class="cx">     if (!_private-&gt;page)
</span><span class="cx">         return;
</span><del>-    static_cast&lt;BackForwardList&amp;&gt;(_private-&gt;page-&gt;backForward().client()).setEnabled(flag);
</del><ins>+    static_cast&lt;BackForwardList*&gt;(_private-&gt;page-&gt;backForward().client())-&gt;setEnabled(flag);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)goBack
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/win/ChangeLog        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
+        Clean up unnecessary methods in the BackForwardClient interface
+
+        It broke a regression test and an API test.
+
+        * WebBackForwardList.cpp:
+        (WebBackForwardList::WebBackForwardList):
+        (WebBackForwardList::~WebBackForwardList):
+        (WebBackForwardList::createInstance):
+        * WebBackForwardList.h:
+        * WebView.cpp:
+        (WebView::backForwardList):
+        (WebView::canGoBack):
+        (WebView::canGoForward):
+        (WebView::loadBackForwardListFromOtherView):
+
</ins><span class="cx"> 2014-04-30  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
</span><span class="cx"> 
</span><span class="cx">         Clean up unnecessary methods in the BackForwardClient interface
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebBackForwardList.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebBackForwardList.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/win/WebBackForwardList.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -48,12 +48,12 @@
</span><span class="cx">     return staticBackForwardListWrappers;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebBackForwardList::WebBackForwardList(BackForwardList* backForwardList)
</del><ins>+WebBackForwardList::WebBackForwardList(PassRefPtr&lt;BackForwardList&gt; backForwardList)
</ins><span class="cx">     : m_refCount(0)
</span><span class="cx">     , m_backForwardList(backForwardList)
</span><span class="cx"> {
</span><del>-    ASSERT(!backForwardListWrappers().contains(m_backForwardList));
-    backForwardListWrappers().set(m_backForwardList, this);
</del><ins>+    ASSERT(!backForwardListWrappers().contains(m_backForwardList.get()));
+    backForwardListWrappers().set(m_backForwardList.get(), this);
</ins><span class="cx"> 
</span><span class="cx">     gClassCount++;
</span><span class="cx">     gClassNameCount.add(&quot;WebBackForwardList&quot;);
</span><span class="lines">@@ -63,18 +63,18 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_backForwardList-&gt;closed());
</span><span class="cx"> 
</span><del>-    ASSERT(backForwardListWrappers().contains(m_backForwardList));
-    backForwardListWrappers().remove(m_backForwardList);
</del><ins>+    ASSERT(backForwardListWrappers().contains(m_backForwardList.get()));
+    backForwardListWrappers().remove(m_backForwardList.get());
</ins><span class="cx"> 
</span><span class="cx">     gClassCount--;
</span><span class="cx">     gClassNameCount.remove(&quot;WebBackForwardList&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebBackForwardList* WebBackForwardList::createInstance(BackForwardList* backForwardList)
</del><ins>+WebBackForwardList* WebBackForwardList::createInstance(PassRefPtr&lt;BackForwardList&gt; backForwardList)
</ins><span class="cx"> {
</span><span class="cx">     WebBackForwardList* instance;
</span><span class="cx"> 
</span><del>-    instance = backForwardListWrappers().get(backForwardList);
</del><ins>+    instance = backForwardListWrappers().get(backForwardList.get());
</ins><span class="cx"> 
</span><span class="cx">     if (!instance)
</span><span class="cx">         instance = new WebBackForwardList(backForwardList);
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebBackForwardListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebBackForwardList.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebBackForwardList.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/win/WebBackForwardList.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -40,9 +40,9 @@
</span><span class="cx"> class WebBackForwardList : public IWebBackForwardList, IWebBackForwardListPrivate
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>-    static WebBackForwardList* createInstance(WebCore::BackForwardList*);
</del><ins>+    static WebBackForwardList* createInstance(PassRefPtr&lt;WebCore::BackForwardList&gt;);
</ins><span class="cx"> protected:
</span><del>-    WebBackForwardList(WebCore::BackForwardList*);
</del><ins>+    WebBackForwardList(PassRefPtr&lt;WebCore::BackForwardList&gt;);
</ins><span class="cx">     ~WebBackForwardList();
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     ULONG m_refCount;
</span><del>-    WebCore::BackForwardList* m_backForwardList;
</del><ins>+    RefPtr&lt;WebCore::BackForwardList&gt; m_backForwardList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit/win/WebView.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -3071,7 +3071,7 @@
</span><span class="cx">     if (!m_useBackForwardList)
</span><span class="cx">         return E_FAIL;
</span><span class="cx">  
</span><del>-    *list = WebBackForwardList::createInstance(static_cast&lt;WebCore::BackForwardList*&gt;(&amp;m_page-&gt;backForward().client()));
</del><ins>+    *list = WebBackForwardList::createInstance(static_cast&lt;WebCore::BackForwardList*&gt;(m_page-&gt;backForward().client()));
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -3904,7 +3904,7 @@
</span><span class="cx">         /* [in] */ IUnknown* /*sender*/,
</span><span class="cx">         /* [retval][out] */ BOOL* result)
</span><span class="cx"> {
</span><del>-    *result = !!(m_page-&gt;backForward().backItem() &amp;&amp; !m_page-&gt;defersLoading());
</del><ins>+    *result = !!(m_page-&gt;backForward().client()-&gt;backItem() &amp;&amp; !m_page-&gt;defersLoading());
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="lines">@@ -3919,7 +3919,7 @@
</span><span class="cx">         /* [in] */ IUnknown* /*sender*/,
</span><span class="cx">         /* [retval][out] */ BOOL* result)
</span><span class="cx"> {
</span><del>-    *result = !!(m_page-&gt;backForward().forwardItem() &amp;&amp; !m_page-&gt;defersLoading());
</del><ins>+    *result = !!(m_page-&gt;backForward().client()-&gt;forwardItem() &amp;&amp; !m_page-&gt;defersLoading());
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="lines">@@ -5391,41 +5391,41 @@
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HRESULT STDMETHODCALLTYPE WebView::loadBackForwardListFromOtherView(
</del><ins>+HRESULT STDMETHODCALLTYPE WebView::loadBackForwardListFromOtherView( 
</ins><span class="cx">     /* [in] */ IWebView* otherView)
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return E_FAIL;
</span><del>-
</del><ins>+    
</ins><span class="cx">     // It turns out the right combination of behavior is done with the back/forward load
</span><del>-    // type. (See behavior matrix at the top of WebFramePrivate.) So we copy all the items
</del><ins>+    // type.  (See behavior matrix at the top of WebFramePrivate.)  So we copy all the items
</ins><span class="cx">     // in the back forward list, and go to the current one.
</span><del>-    BackForwardController&amp; backForward = m_page-&gt;backForward();
-    ASSERT(!backForward.currentItem()); // Destination list should be empty.
</del><ins>+    BackForwardClient* backForwardClient = m_page-&gt;backForward().client();
+    ASSERT(!backForwardClient-&gt;currentItem()); // destination list should be empty
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;WebView&gt; otherWebView;
</span><span class="cx">     if (FAILED(otherView-&gt;QueryInterface(&amp;otherWebView)))
</span><span class="cx">         return E_FAIL;
</span><del>-    BackForwardController&amp; otherBackForward = otherWebView-&gt;m_page-&gt;backForward();
-    if (!otherBackForward.currentItem())
-        return S_OK; // If the back forward list is empty, bail.
-
</del><ins>+    BackForwardClient* otherBackForwardClient = otherWebView-&gt;m_page-&gt;backForward().client();
+    if (!otherBackForwardClient-&gt;currentItem())
+        return S_OK; // empty back forward list, bail
+    
</ins><span class="cx">     HistoryItem* newItemToGoTo = 0;
</span><span class="cx"> 
</span><del>-    int lastItemIndex = otherBackForward.forwardCount();
-    for (int i = -otherBackForward.backCount(); i &lt;= lastItemIndex; ++i) {
</del><ins>+    int lastItemIndex = otherBackForwardClient-&gt;forwardListCount();
+    for (int i = -otherBackForwardClient-&gt;backListCount(); i &lt;= lastItemIndex; ++i) {
</ins><span class="cx">         if (!i) {
</span><del>-            // If this item is showing, save away its current scroll and form state,
</del><ins>+            // If this item is showing , save away its current scroll and form state,
</ins><span class="cx">             // since that might have changed since loading and it is normally not saved
</span><span class="cx">             // until we leave that page.
</span><span class="cx">             otherWebView-&gt;m_page-&gt;mainFrame().loader().history().saveDocumentAndScrollState();
</span><span class="cx">         }
</span><del>-        RefPtr&lt;HistoryItem&gt; newItem = otherBackForward.itemAtIndex(i)-&gt;copy();
-        if (!i)
</del><ins>+        RefPtr&lt;HistoryItem&gt; newItem = otherBackForwardClient-&gt;itemAtIndex(i)-&gt;copy();
+        if (!i) 
</ins><span class="cx">             newItemToGoTo = newItem.get();
</span><del>-        backForward.addItem(newItem.release());
</del><ins>+        backForwardClient-&gt;addItem(newItem.release());
</ins><span class="cx">     }
</span><del>-
</del><ins>+    
</ins><span class="cx">     ASSERT(newItemToGoTo);
</span><span class="cx">     m_page-&gt;goToItem(newItemToGoTo, FrameLoadTypeIndexedBackForward);
</span><span class="cx">     return S_OK;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
+        Clean up unnecessary methods in the BackForwardClient interface
+
+        It broke a regression test and an API test.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
+        (WebKit::InjectedBundleBackForwardList::clear):
+        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+        (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
+        (WebKit::WebBackForwardListProxy::addItem):
+        (WebKit::WebBackForwardListProxy::goToItem):
+        (WebKit::WebBackForwardListProxy::itemAtIndex):
+        (WebKit::WebBackForwardListProxy::backListCount):
+        (WebKit::WebBackForwardListProxy::forwardListCount):
+        (WebKit::WebBackForwardListProxy::close):
+        (WebKit::WebBackForwardListProxy::clear):
+        * WebProcess/WebPage/WebBackForwardListProxy.h:
+        (WebKit::WebBackForwardListProxy::create):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Copied from Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm.
+
</ins><span class="cx"> 2014-04-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Only reveal selection service UI after a short delay.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -545,6 +545,7 @@
</span><span class="cx">                 2DA944AE1884E9BA00ED86DB /* WebInspectorProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AA1884E9BA00ED86DB /* WebInspectorProxyIOS.mm */; };
</span><span class="cx">                 2DA944AF1884E9BA00ED86DB /* WebPageProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */; };
</span><span class="cx">                 2DA944B01884E9BA00ED86DB /* WebProcessProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */; };
</span><ins>+                2DA944B91884EA3900ED86DB /* WebBackForwardListProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */; };
</ins><span class="cx">                 2DA944BA1884EA3C00ED86DB /* WebPageIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944B61884EA3500ED86DB /* WebPageIOS.mm */; };
</span><span class="cx">                 2DA944BD188511E700ED86DB /* NetworkProcessIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */; };
</span><span class="cx">                 2DACE64E18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DACE64D18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h */; };
</span><span class="lines">@@ -2374,6 +2375,7 @@
</span><span class="cx">                 2DA944AA1884E9BA00ED86DB /* WebInspectorProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorProxyIOS.mm; path = ios/WebInspectorProxyIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageProxyIOS.mm; path = ios/WebPageProxyIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebProcessProxyIOS.mm; path = ios/WebProcessProxyIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebBackForwardListProxyIOS.mm; path = ios/WebBackForwardListProxyIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2DA944B61884EA3500ED86DB /* WebPageIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageIOS.mm; path = ios/WebPageIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessIOS.mm; path = NetworkProcess/ios/NetworkProcessIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DACE64D18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKThumbnailViewInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4541,6 +4543,7 @@
</span><span class="cx">                 2DA944B41884EA2A00ED86DB /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */,
</ins><span class="cx">                                 2DA944B61884EA3500ED86DB /* WebPageIOS.mm */,
</span><span class="cx">                                 29232DF518B29DCE00D0596F /* WKAccessibilityWebPageObjectIOS.h */,
</span><span class="cx">                                 29232DF618B29DCE00D0596F /* WKAccessibilityWebPageObjectIOS.mm */,
</span><span class="lines">@@ -8160,6 +8163,7 @@
</span><span class="cx">                                 2DA944A31884E4F000ED86DB /* WebTouchEventIOS.cpp in Sources */,
</span><span class="cx">                                 1A30EAC6115D7DA30053E937 /* ConnectionMac.cpp in Sources */,
</span><span class="cx">                                 5136183D163126DA00A99DDE /* ConnectionStack.cpp in Sources */,
</span><ins>+                                2DA944B91884EA3900ED86DB /* WebBackForwardListProxyIOS.mm in Sources */,
</ins><span class="cx">                                 515E773318402D510007203F /* UniqueIDBDatabaseIdentifier.cpp in Sources */,
</span><span class="cx">                                 2DA049B7180CCD0A00AAFA9E /* GraphicsLayerCARemote.cpp in Sources */,
</span><span class="cx">                                 378E1A4D18208D700031007A /* WKNSURL.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundleBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     Page* page = m_page-&gt;corePage();
</span><span class="cx">     if (!page)
</span><span class="cx">         return;
</span><del>-    static_cast&lt;WebBackForwardListProxy&amp;&gt;(page-&gt;backForward().client()).clear();
</del><ins>+    static_cast&lt;WebBackForwardListProxy*&gt;(page-&gt;backForward().client())-&gt;clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">     historyItemToIDMap().remove(item);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebBackForwardListProxy::WebBackForwardListProxy(WebPage&amp; page)
</del><ins>+WebBackForwardListProxy::WebBackForwardListProxy(WebPage* page)
</ins><span class="cx">     : m_page(page)
</span><span class="cx"> {
</span><span class="cx">     WebCore::notifyHistoryItemChanged = WK2NotifyHistoryItemChanged;
</span><span class="lines">@@ -144,6 +144,9 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!historyItemToIDMap().contains(item));
</span><span class="cx"> 
</span><ins>+    if (!m_page)
+        return;
+
</ins><span class="cx">     uint64_t itemID = generateHistoryItemID();
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!idToHistoryItemMap().contains(itemID));
</span><span class="lines">@@ -154,32 +157,41 @@
</span><span class="cx">     idToHistoryItemMap().set(itemID, item);
</span><span class="cx"> 
</span><span class="cx">     updateBackForwardItem(itemID, item.get());
</span><del>-    m_page.send(Messages::WebPageProxy::BackForwardAddItem(itemID));
</del><ins>+    m_page-&gt;send(Messages::WebPageProxy::BackForwardAddItem(itemID));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebBackForwardListProxy::goToItem(HistoryItem* item)
</span><span class="cx"> {
</span><ins>+    if (!m_page)
+        return;
+
</ins><span class="cx">     SandboxExtension::Handle sandboxExtensionHandle;
</span><del>-    m_page.sendSync(Messages::WebPageProxy::BackForwardGoToItem(historyItemToIDMap().get(item)), Messages::WebPageProxy::BackForwardGoToItem::Reply(sandboxExtensionHandle));
-    m_page.sandboxExtensionTracker().beginLoad(m_page.mainWebFrame(), sandboxExtensionHandle);
</del><ins>+    m_page-&gt;sendSync(Messages::WebPageProxy::BackForwardGoToItem(historyItemToIDMap().get(item)), Messages::WebPageProxy::BackForwardGoToItem::Reply(sandboxExtensionHandle));
+    m_page-&gt;sandboxExtensionTracker().beginLoad(m_page-&gt;mainWebFrame(), sandboxExtensionHandle);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> HistoryItem* WebBackForwardListProxy::itemAtIndex(int itemIndex)
</span><span class="cx"> {
</span><ins>+    if (!m_page)
+        return 0;
+
</ins><span class="cx">     uint64_t itemID = 0;
</span><del>-    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page.pageID()))
-        return nullptr;
</del><ins>+    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page-&gt;pageID()))
+        return 0;
</ins><span class="cx"> 
</span><span class="cx">     if (!itemID)
</span><del>-        return nullptr;
</del><ins>+        return 0;
</ins><span class="cx"> 
</span><span class="cx">     return idToHistoryItemMap().get(itemID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int WebBackForwardListProxy::backListCount()
</span><span class="cx"> {
</span><ins>+    if (!m_page)
+        return 0;
+
</ins><span class="cx">     int backListCount = 0;
</span><del>-    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page.pageID()))
</del><ins>+    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page-&gt;pageID()))
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     return backListCount;
</span><span class="lines">@@ -187,8 +199,11 @@
</span><span class="cx"> 
</span><span class="cx"> int WebBackForwardListProxy::forwardListCount()
</span><span class="cx"> {
</span><ins>+    if (!m_page)
+        return 0;
+
</ins><span class="cx">     int forwardListCount = 0;
</span><del>-    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page.pageID()))
</del><ins>+    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page-&gt;pageID()))
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     return forwardListCount;
</span><span class="lines">@@ -201,6 +216,8 @@
</span><span class="cx">         WebCore::pageCache()-&gt;remove(itemForID(*i));
</span><span class="cx"> 
</span><span class="cx">     m_associatedItemIDs.clear();
</span><ins>+
+    m_page = 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebBackForwardListProxy::isActive()
</span><span class="lines">@@ -211,7 +228,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebBackForwardListProxy::clear()
</span><span class="cx"> {
</span><del>-    m_page.send(Messages::WebPageProxy::BackForwardClear());
</del><ins>+    m_page-&gt;send(Messages::WebPageProxy::BackForwardClear());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> class WebPage;
</span><span class="cx"> 
</span><span class="cx"> class WebBackForwardListProxy : public WebCore::BackForwardClient {
</span><del>-public:
-    explicit WebBackForwardListProxy(WebPage&amp;);
</del><ins>+public: 
+    static PassRefPtr&lt;WebBackForwardListProxy&gt; create(WebPage* page) { return adoptRef(new WebBackForwardListProxy(page)); }
</ins><span class="cx"> 
</span><span class="cx">     static WebCore::HistoryItem* itemForID(uint64_t);
</span><span class="cx">     static uint64_t idForItem(WebCore::HistoryItem*);
</span><span class="lines">@@ -44,15 +44,16 @@
</span><span class="cx"> 
</span><span class="cx">     static void addItemFromUIProcess(uint64_t itemID, PassRefPtr&lt;WebCore::HistoryItem&gt;);
</span><span class="cx">     static void setHighestItemIDFromUIProcess(uint64_t itemID);
</span><del>-
</del><ins>+    
</ins><span class="cx">     void clear();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    WebBackForwardListProxy(WebPage*);
</ins><span class="cx"> 
</span><span class="cx">     virtual void addItem(PassRefPtr&lt;WebCore::HistoryItem&gt;);
</span><span class="cx"> 
</span><span class="cx">     virtual void goToItem(WebCore::HistoryItem*);
</span><del>-
</del><ins>+        
</ins><span class="cx">     virtual WebCore::HistoryItem* itemAtIndex(int);
</span><span class="cx">     virtual int backListCount();
</span><span class="cx">     virtual int forwardListCount();
</span><span class="lines">@@ -61,7 +62,13 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void close();
</span><span class="cx"> 
</span><del>-    WebPage&amp; m_page;
</del><ins>+#if PLATFORM(IOS)
+    virtual unsigned current() override;
+    virtual void setCurrent(unsigned newCurrent) override;
+    virtual bool clearAllPageCaches() override;
+#endif
+
+    WebPage* m_page;
</ins><span class="cx">     HashSet&lt;uint64_t&gt; m_associatedItemIDs;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (168084 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-05-01 04:48:35 UTC (rev 168084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx">     pageClients.dragClient = new WebDragClient(this);
</span><span class="cx"> #endif
</span><del>-    pageClients.backForwardClient = std::make_unique&lt;WebBackForwardListProxy&gt;(*this);
</del><ins>+    pageClients.backForwardClient = WebBackForwardListProxy::create(this);
</ins><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     m_inspectorClient = new WebInspectorClient(this);
</span><span class="cx">     pageClients.inspectorClient = m_inspectorClient;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmmfromrev168040trunkSourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm (from rev 168040, trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm) (0 => 168085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm        2014-05-01 05:49:09 UTC (rev 168085)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;WebBackForwardListProxy.h&quot;
+
+#if PLATFORM(IOS)
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+namespace WebKit {
+
+unsigned WebBackForwardListProxy::current()
+{
+    notImplemented();
+    return 0;
+}
+
+void WebBackForwardListProxy::setCurrent(unsigned)
+{
+    notImplemented();
+}
+
+bool WebBackForwardListProxy::clearAllPageCaches()
+{
+    notImplemented();
+    return false;
+}
+
+} // namespace WebKit
+
+#endif // PLATFORM(IOS)
</ins></span></pre>
</div>
</div>

</body>
</html>