<!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>[168089] tags/Safari-538.33/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/168089">168089</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2014-05-01 00:05:54 -0700 (Thu, 01 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/168085">r168085</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari53833SourceWebCoreChangeLog">tags/Safari-538.33/Source/WebCore/ChangeLog</a></li>
<li><a href="#tagsSafari53833SourceWebCoreWebCoreexpin">tags/Safari-538.33/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#tagsSafari53833SourceWebCorehistoryBackForwardClienth">tags/Safari-538.33/Source/WebCore/history/BackForwardClient.h</a></li>
<li><a href="#tagsSafari53833SourceWebCorehistoryBackForwardControllercpp">tags/Safari-538.33/Source/WebCore/history/BackForwardController.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebCorehistoryBackForwardControllerh">tags/Safari-538.33/Source/WebCore/history/BackForwardController.h</a></li>
<li><a href="#tagsSafari53833SourceWebCorehistoryBackForwardListcpp">tags/Safari-538.33/Source/WebCore/history/BackForwardList.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebCorehistoryBackForwardListh">tags/Safari-538.33/Source/WebCore/history/BackForwardList.h</a></li>
<li><a href="#tagsSafari53833SourceWebCorepagePagecpp">tags/Safari-538.33/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebCorepagePageh">tags/Safari-538.33/Source/WebCore/page/Page.h</a></li>
<li><a href="#tagsSafari53833SourceWebKiteflChangeLog">tags/Safari-538.33/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#tagsSafari53833SourceWebKiteflewkewk_historycpp">tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_history.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebKiteflewkewk_viewcpp">tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_view.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebKitmacChangeLog">tags/Safari-538.33/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#tagsSafari53833SourceWebKitmacHistoryWebBackForwardListmm">tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardList.mm</a></li>
<li><a href="#tagsSafari53833SourceWebKitmacHistoryWebBackForwardListInternalh">tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardListInternal.h</a></li>
<li><a href="#tagsSafari53833SourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">tags/Safari-538.33/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#tagsSafari53833SourceWebKitmacWebViewWebFrameViewmm">tags/Safari-538.33/Source/WebKit/mac/WebView/WebFrameView.mm</a></li>
<li><a href="#tagsSafari53833SourceWebKitmacWebViewWebViewmm">tags/Safari-538.33/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#tagsSafari53833SourceWebKitwinChangeLog">tags/Safari-538.33/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#tagsSafari53833SourceWebKitwinWebBackForwardListcpp">tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebKitwinWebBackForwardListh">tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.h</a></li>
<li><a href="#tagsSafari53833SourceWebKitwinWebViewcpp">tags/Safari-538.33/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebKit2ChangeLog">tags/Safari-538.33/Source/WebKit2/ChangeLog</a></li>
<li><a href="#tagsSafari53833SourceWebKit2WebKit2xcodeprojprojectpbxproj">tags/Safari-538.33/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#tagsSafari53833SourceWebKit2WebProcessInjectedBundleInjectedBundleBackForwardListcpp">tags/Safari-538.33/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebKit2WebProcessWebPageWebBackForwardListProxycpp">tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp</a></li>
<li><a href="#tagsSafari53833SourceWebKit2WebProcessWebPageWebBackForwardListProxyh">tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h</a></li>
<li><a href="#tagsSafari53833SourceWebKit2WebProcessWebPageWebPagecpp">tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#tagsSafari53833SourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmm">tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari53833SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/ChangeLog (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/ChangeLog        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/ChangeLog        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-04-30 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r168085.
+
+ 2014-04-30 Alexey Proskuryakov <ap@apple.com>
+
+ 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 <simon.fraser@apple.com>
</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="tagsSafari53833SourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/WebCore.exp.in (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/WebCore.exp.in        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/WebCore.exp.in        2014-05-01 07:05:54 UTC (rev 168089)
</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="tagsSafari53833SourceWebCorehistoryBackForwardClienth"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/history/BackForwardClient.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/history/BackForwardClient.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/history/BackForwardClient.h        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -29,13 +29,14 @@
</span><span class="cx"> #define BackForwardClient_h
</span><span class="cx">
</span><span class="cx"> #include <wtf/Forward.h>
</span><ins>+#include <wtf/RefCounted.h>
</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<BackForwardClient> {
+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<HistoryItem>) = 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="tagsSafari53833SourceWebCorehistoryBackForwardControllercpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/history/BackForwardController.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/history/BackForwardController.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/history/BackForwardController.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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& page, std::unique_ptr<BackForwardClient> client)
</del><ins>+BackForwardController::BackForwardController(Page& page, PassRefPtr<BackForwardClient> 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<BackForwardList>();
</del><ins>+ m_client = BackForwardList::create(&page);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> BackForwardController::~BackForwardController()
</span></span></pre></div>
<a id="tagsSafari53833SourceWebCorehistoryBackForwardControllerh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/history/BackForwardController.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/history/BackForwardController.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/history/BackForwardController.h        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><ins>+#include <wtf/RefPtr.h>
</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&, std::unique_ptr<BackForwardClient>);
</del><ins>+ BackForwardController(Page&, PassRefPtr<BackForwardClient>);
</ins><span class="cx"> ~BackForwardController();
</span><span class="cx">
</span><del>- // FIXME: Remove uses of this getter. <https://webkit.org/b/132027>
- BackForwardClient& 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<HistoryItem>);
</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& m_page;
</span><del>- std::unique_ptr<BackForwardClient> m_client;
</del><ins>+ RefPtr<BackForwardClient> m_client;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="tagsSafari53833SourceWebCorehistoryBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/history/BackForwardList.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/history/BackForwardList.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/history/BackForwardList.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "FrameLoaderClient.h"
</span><span class="cx"> #include "HistoryItem.h"
</span><span class="cx"> #include "Logging.h"
</span><ins>+#include "Page.h"
</ins><span class="cx"> #include "PageCache.h"
</span><span class="cx"> #include "SerializedScriptValue.h"
</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()->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="tagsSafari53833SourceWebCorehistoryBackForwardListh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/history/BackForwardList.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/history/BackForwardList.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/history/BackForwardList.h        2014-05-01 07:05:54 UTC (rev 168089)
</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<RefPtr<HistoryItem>> HistoryItemVector;
</span><span class="cx"> typedef HashSet<RefPtr<HistoryItem>> HistoryItemHashSet;
</span><span class="cx">
</span><span class="cx"> class BackForwardList : public BackForwardClient {
</span><del>-public:
- BackForwardList();
</del><ins>+public:
+ static PassRefPtr<BackForwardList> 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<HistoryItem>) 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& 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="tagsSafari53833SourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/page/Page.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/page/Page.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/page/Page.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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<ProgressTracker>(*pageClients.progressTrackerClient))
</span><del>- , m_backForwardController(std::make_unique<BackForwardController>(*this, std::move(pageClients.backForwardClient)))
</del><ins>+ , m_backForwardController(std::make_unique<BackForwardController>(*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="tagsSafari53833SourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebCore/page/Page.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebCore/page/Page.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebCore/page/Page.h        2014-05-01 07:05:54 UTC (rev 168089)
</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<BackForwardClient> backForwardClient;
</del><ins>+ RefPtr<BackForwardClient> backForwardClient;
</ins><span class="cx"> ValidationMessageClient* validationMessageClient;
</span><span class="cx"> FrameLoaderClient* loaderClientForMainFrame;
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/efl/ChangeLog (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/efl/ChangeLog        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/efl/ChangeLog        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-04-30 Alexey Proskuryakov <ap@apple.com>
+
+ 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 <burg@cs.washington.edu>
</span><span class="cx">
</span><span class="cx"> Clean up unnecessary methods in the BackForwardClient interface
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKiteflewkewk_historycpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_history.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_history.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_history.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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->page();
+ if (page && page->groupPtr())
+ page->groupPtr()->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->core = core;
</span><ins>+ core->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("history=%p", history);
</span><ins>+ history->core->deref();
</ins><span class="cx"> delete history;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKiteflewkewk_viewcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_view.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_view.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/efl/ewk/ewk_view.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -752,7 +752,7 @@
</span><span class="cx"> priv->settings.allowUniversalAccessFromFileURLs = pageSettings.allowUniversalAccessFromFileURLs();
</span><span class="cx"> priv->settings.allowFileAccessFromFileURLs = pageSettings.allowFileAccessFromFileURLs();
</span><span class="cx">
</span><del>- priv->history = ewk_history_new(static_cast<WebCore::BackForwardList*>(&priv->page->backForward().client()));
</del><ins>+ priv->history = ewk_history_new(static_cast<WebCore::BackForwardList*>(priv->page->backForward().client()));
</ins><span class="cx">
</span><span class="cx"> #ifdef HAVE_ECORE_X
</span><span class="cx"> priv->isUsingEcoreX = WebCore::isUsingEcoreX(smartData->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<WebCore::BackForwardList&>(priv->page->backForward().client()).enabled();
</del><ins>+ return static_cast<WebCore::BackForwardList*>(priv->page->backForward().client())->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<WebCore::BackForwardList&>(priv->page->backForward().client()).setEnabled(enable);
</del><ins>+ static_cast<WebCore::BackForwardList*>(priv->page->backForward().client())->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<WebCore::BackForwardList&>(priv->page->backForward().client()).enabled()) {
</del><ins>+ if (!static_cast<WebCore::BackForwardList*>(priv->page->backForward().client())->enabled()) {
</ins><span class="cx"> ERR("asked history, but it's disabled! Returning 0!");
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/mac/ChangeLog (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/mac/ChangeLog        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/mac/ChangeLog        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-04-30 Alexey Proskuryakov <ap@apple.com>
+
+ 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 <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitmacHistoryWebBackForwardListmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardList.mm (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardList.mm        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardList.mm        2014-05-01 07:05:54 UTC (rev 168089)
</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<BackForwardList>)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<WebBackForwardListPrivate*>(backForwardList);
</del><ins>+ _private = reinterpret_cast<WebBackForwardListPrivate*>(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->closed());
</span><span class="cx"> backForwardLists().remove(backForwardList);
</span><del>- delete backForwardList;
</del><ins>+ backForwardList->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->closed());
</span><span class="cx"> backForwardLists().remove(backForwardList);
</span><del>- delete backForwardList;
</del><ins>+ backForwardList->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)->page()) setUsesPageCache:size != 0];
+}
+
+- (NSUInteger)pageCacheSize
+{
+ return [kit(core(self)->page()) usesPageCache] ? pageCache()->capacity() : 0;
+}
+
</ins><span class="cx"> - (int)backListCount
</span><span class="cx"> {
</span><span class="cx"> return core(self)->backListCount();
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitmacHistoryWebBackForwardListInternalh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardListInternal.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardListInternal.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/mac/History/WebBackForwardListInternal.h        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #import <WebKitLegacy/WebBackForwardList.h>
</span><ins>+#import <wtf/PassRefPtr.h>
</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<WebCore::BackForwardList>)backForwardList;
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-05-01 07:05:54 UTC (rev 168089)
</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& backForwardList = static_cast<BackForwardList&>(page->backForward().client());
- if (!backForwardList.enabled())
</del><ins>+ BackForwardList *backForwardList = static_cast<BackForwardList*>(page->backForward().client());
+ if (!backForwardList->enabled())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!backForwardList.capacity())
</del><ins>+ if (!backForwardList->capacity())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitmacWebViewWebFrameViewmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/mac/WebView/WebFrameView.mm (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/mac/WebView/WebFrameView.mm        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/mac/WebView/WebFrameView.mm        2014-05-01 07:05:54 UTC (rev 168089)
</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 && static_cast<BackForwardList&>(coreFrame->page()->backForward().client()).enabled() ? YES : NO;
</del><ins>+ BOOL maintainsBackForwardList = coreFrame && static_cast<BackForwardList*>(coreFrame->page()->backForward().client())->enabled() ? YES : NO;
</ins><span class="cx">
</span><span class="cx"> count = [characters length];
</span><span class="cx"> for (index = 0; index < count; ++index) {
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/mac/WebView/WebView.mm (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/mac/WebView/WebView.mm        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/mac/WebView/WebView.mm        2014-05-01 07:05:54 UTC (rev 168089)
</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& backForward = _private->page->backForward();
- ASSERT(!backForward.currentItem()); // destination list should be empty
</del><span class="cx">
</span><del>- BackForwardController& otherBackForward = otherView->_private->page->backForward();
- if (!otherBackForward.currentItem())
</del><ins>+ BackForwardClient* backForwardClient = _private->page->backForward().client();
+ ASSERT(!backForwardClient->currentItem()); // destination list should be empty
+
+ BackForwardClient* otherBackForwardClient = otherView->_private->page->backForward().client();
+ if (!otherBackForwardClient->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 <= lastItemIndex; ++i) {
</del><ins>+ int lastItemIndex = otherBackForwardClient->forwardListCount();
+ for (int i = -otherBackForwardClient->backListCount(); i <= 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->_private->page->mainFrame().loader().history().saveDocumentAndScrollState();
</span><span class="cx"> }
</span><del>- RefPtr<HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy();
- if (i == 0)
</del><ins>+ RefPtr<HistoryItem> newItem = otherBackForwardClient->itemAtIndex(i)->copy();
+ if (i == 0)
</ins><span class="cx"> newItemToGoTo = newItem.get();
</span><del>- backForward.addItem(newItem.release());
</del><ins>+ backForwardClient->addItem(newItem.release());
</ins><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> ASSERT(newItemToGoTo);
</span><span class="cx"> _private->page->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, "FrameName = %@, GroupName = %@, useBackForwardList = %d\n", frameName, groupName, (int)useBackForwardList);
</span><span class="cx"> [result _commonInitializationWithFrameName:frameName groupName:groupName];
</span><del>- static_cast<BackForwardList&>([result page]->backForward().client()).setEnabled(useBackForwardList);
</del><ins>+ static_cast<BackForwardList*>([result page]->backForward().client())->setEnabled(useBackForwardList);
</ins><span class="cx"> result->_private->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->page && static_cast<BackForwardList&>(_private->page->backForward().client()).enabled();
</del><ins>+ BOOL useBackForwardList = _private->page && static_cast<BackForwardList*>(_private->page->backForward().client())->enabled();
</ins><span class="cx"> if ([encoder allowsKeyedCoding]) {
</span><span class="cx"> [encoder encodeObject:[[self mainFrame] name] forKey:@"FrameName"];
</span><span class="cx"> [encoder encodeObject:[self groupName] forKey:@"GroupName"];
</span><span class="lines">@@ -5589,17 +5590,17 @@
</span><span class="cx"> {
</span><span class="cx"> if (!_private->page)
</span><span class="cx"> return nil;
</span><del>- BackForwardList& list = static_cast<BackForwardList&>(_private->page->backForward().client());
- if (!list.enabled())
</del><ins>+ BackForwardList* list = static_cast<BackForwardList*>(_private->page->backForward().client());
+ if (!list->enabled())
</ins><span class="cx"> return nil;
</span><del>- return kit(&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->page)
</span><span class="cx"> return;
</span><del>- static_cast<BackForwardList&>(_private->page->backForward().client()).setEnabled(flag);
</del><ins>+ static_cast<BackForwardList*>(_private->page->backForward().client())->setEnabled(flag);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (BOOL)goBack
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/win/ChangeLog (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/win/ChangeLog        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/win/ChangeLog        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-04-30 Alexey Proskuryakov <ap@apple.com>
+
+ 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 <burg@cs.washington.edu>
</span><span class="cx">
</span><span class="cx"> Clean up unnecessary methods in the BackForwardClient interface
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitwinWebBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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<BackForwardList> 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("WebBackForwardList");
</span><span class="lines">@@ -63,18 +63,18 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_backForwardList->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("WebBackForwardList");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebBackForwardList* WebBackForwardList::createInstance(BackForwardList* backForwardList)
</del><ins>+WebBackForwardList* WebBackForwardList::createInstance(PassRefPtr<BackForwardList> 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="tagsSafari53833SourceWebKitwinWebBackForwardListh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/win/WebBackForwardList.h        2014-05-01 07:05:54 UTC (rev 168089)
</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<WebCore::BackForwardList>);
</ins><span class="cx"> protected:
</span><del>- WebBackForwardList(WebCore::BackForwardList*);
</del><ins>+ WebBackForwardList(PassRefPtr<WebCore::BackForwardList>);
</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<WebCore::BackForwardList> m_backForwardList;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit/win/WebView.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit/win/WebView.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit/win/WebView.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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<WebCore::BackForwardList*>(&m_page->backForward().client()));
</del><ins>+ *list = WebBackForwardList::createInstance(static_cast<WebCore::BackForwardList*>(m_page->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->backForward().backItem() && !m_page->defersLoading());
</del><ins>+ *result = !!(m_page->backForward().client()->backItem() && !m_page->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->backForward().forwardItem() && !m_page->defersLoading());
</del><ins>+ *result = !!(m_page->backForward().client()->forwardItem() && !m_page->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& backForward = m_page->backForward();
- ASSERT(!backForward.currentItem()); // Destination list should be empty.
</del><ins>+ BackForwardClient* backForwardClient = m_page->backForward().client();
+ ASSERT(!backForwardClient->currentItem()); // destination list should be empty
</ins><span class="cx">
</span><span class="cx"> COMPtr<WebView> otherWebView;
</span><span class="cx"> if (FAILED(otherView->QueryInterface(&otherWebView)))
</span><span class="cx"> return E_FAIL;
</span><del>- BackForwardController& otherBackForward = otherWebView->m_page->backForward();
- if (!otherBackForward.currentItem())
- return S_OK; // If the back forward list is empty, bail.
-
</del><ins>+ BackForwardClient* otherBackForwardClient = otherWebView->m_page->backForward().client();
+ if (!otherBackForwardClient->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 <= lastItemIndex; ++i) {
</del><ins>+ int lastItemIndex = otherBackForwardClient->forwardListCount();
+ for (int i = -otherBackForwardClient->backListCount(); i <= 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->m_page->mainFrame().loader().history().saveDocumentAndScrollState();
</span><span class="cx"> }
</span><del>- RefPtr<HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy();
- if (!i)
</del><ins>+ RefPtr<HistoryItem> newItem = otherBackForwardClient->itemAtIndex(i)->copy();
+ if (!i)
</ins><span class="cx"> newItemToGoTo = newItem.get();
</span><del>- backForward.addItem(newItem.release());
</del><ins>+ backForwardClient->addItem(newItem.release());
</ins><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> ASSERT(newItemToGoTo);
</span><span class="cx"> m_page->goToItem(newItemToGoTo, FrameLoadTypeIndexedBackForward);
</span><span class="cx"> return S_OK;
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit2/ChangeLog (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/ChangeLog        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit2/ChangeLog        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2014-04-30 Alexey Proskuryakov <ap@apple.com>
+
+ 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.
+
+2014-04-30 Brady Eidson <beidson@apple.com>
+
+ Only reveal selection service UI after a short delay.
+ <rdar://problem/16777346> and https://bugs.webkit.org/show_bug.cgi?id=132418
+
+ Reviewed by Sam Weinig.
+
+ * WebProcess/WebPage/SelectionOverlayController.cpp:
+ (WebKit::SelectionOverlayController::SelectionOverlayController):
+ (WebKit::SelectionOverlayController::destroyOverlay): Also stop the hover timer.
+ (WebKit::SelectionOverlayController::selectionRectsDidChange): Mark the highlight as dirty.
+ (WebKit::SelectionOverlayController::hoverTimerFired): If the mouse is still over the highlight,
+ set the visible flag and setNeedsDisplay().
+ * WebProcess/WebPage/SelectionOverlayController.h:
+
+ * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
+ (WebKit::SelectionOverlayController::drawRect): Recreate the highlight if it exists but
+ is marked as dirty. After doing that, possibly reset the hover timer.
+ Also, only performing the actual drawing if the visible flag is set.
+ (WebKit::SelectionOverlayController::mouseEvent): If the mouse moves on or off the highlight,
+ start or stop the hover timer accordingly.
+ (WebKit::SelectionOverlayController::mouseHoverStateChanged): Handle starting/stopping the
+ hover timer.
+ (WebKit::SelectionOverlayController::clearHighlight): Deleted.
+
</ins><span class="cx"> 2014-04-30 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><span class="cx"> [iOS][WK2] Animated resize incorrectly assumes the layout width is the same as the view width
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-01 07:05:54 UTC (rev 168089)
</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 = "<group>"; };
</span><span class="cx">                 2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageProxyIOS.mm; path = ios/WebPageProxyIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebProcessProxyIOS.mm; path = ios/WebProcessProxyIOS.mm; sourceTree = "<group>"; };
</span><ins>+                2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebBackForwardListProxyIOS.mm; path = ios/WebBackForwardListProxyIOS.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 2DA944B61884EA3500ED86DB /* WebPageIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageIOS.mm; path = ios/WebPageIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessIOS.mm; path = NetworkProcess/ios/NetworkProcessIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2DACE64D18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKThumbnailViewInternal.h; sourceTree = "<group>"; };
</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="tagsSafari53833SourceWebKit2WebProcessInjectedBundleInjectedBundleBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> Page* page = m_page->corePage();
</span><span class="cx"> if (!page)
</span><span class="cx"> return;
</span><del>- static_cast<WebBackForwardListProxy&>(page->backForward().client()).clear();
</del><ins>+ static_cast<WebBackForwardListProxy*>(page->backForward().client())->clear();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKit2WebProcessWebPageWebBackForwardListProxycpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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& 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->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->sendSync(Messages::WebPageProxy::BackForwardGoToItem(historyItemToIDMap().get(item)), Messages::WebPageProxy::BackForwardGoToItem::Reply(sandboxExtensionHandle));
+ m_page->sandboxExtensionTracker().beginLoad(m_page->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()->sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page.pageID()))
- return nullptr;
</del><ins>+ if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page->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()->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page.pageID()))
</del><ins>+ if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page->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()->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page.pageID()))
</del><ins>+ if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page->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()->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->send(Messages::WebPageProxy::BackForwardClear());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKit2WebProcessWebPageWebBackForwardListProxyh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2014-05-01 07:05:54 UTC (rev 168089)
</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&);
</del><ins>+public:
+ static PassRefPtr<WebBackForwardListProxy> 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<WebCore::HistoryItem>);
</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<WebCore::HistoryItem>);
</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& 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<uint64_t> m_associatedItemIDs;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari53833SourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (168088 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-05-01 06:44:54 UTC (rev 168088)
+++ tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-05-01 07:05:54 UTC (rev 168089)
</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<WebBackForwardListProxy>(*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="tagsSafari53833SourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmmfromrev168085trunkSourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmm"></a>
<div class="copfile"><h4>Copied: tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm (from rev 168085, trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm) (0 => 168089)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm         (rev 0)
+++ tags/Safari-538.33/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm        2014-05-01 07:05:54 UTC (rev 168089)
</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 "config.h"
+#import "WebBackForwardListProxy.h"
+
+#if PLATFORM(IOS)
+
+#import <WebCore/NotImplemented.h>
+
+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>