<!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>[207345] 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/207345">207345</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2016-10-14 10:14:39 -0700 (Fri, 14 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move BackForwardList from WebCore to WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=163418
Reviewed by Tim Horton.
Source/WebCore:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::BackForwardController):
* history/BackForwardController.h:
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* page/Page.cpp:
(WebCore::Page::Page):
Source/WebKit:
* WebKit.xcodeproj/project.pbxproj:
Source/WebKit/mac:
* History/BackForwardList.h: Renamed from Source/WebCore/history/BackForwardList.h.
(BackForwardList::create):
(BackForwardList::webView):
* History/BackForwardList.mm: Renamed from Source/WebCore/history/BackForwardList.cpp.
(BackForwardList::BackForwardList):
(BackForwardList::close):
(BackForwardList::containsItem):
* History/WebBackForwardList.mm:
(kit):
(-[WebBackForwardList initWithBackForwardList:]):
(-[WebBackForwardList setPageCacheSize:]):
(-[WebBackForwardList pageCacheSize]):
* History/WebBackForwardListInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebFrameView.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</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>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacHistoryBackForwardListh">trunk/Source/WebKit/mac/History/BackForwardList.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryBackForwardListmm">trunk/Source/WebKit/mac/History/BackForwardList.mm</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorehistoryBackForwardListcpp">trunk/Source/WebCore/history/BackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardListh">trunk/Source/WebCore/history/BackForwardList.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -1604,7 +1604,6 @@
</span><span class="cx"> fileapi/WebKitBlobBuilder.cpp
</span><span class="cx">
</span><span class="cx"> history/BackForwardController.cpp
</span><del>- history/BackForwardList.cpp
</del><span class="cx"> history/CachedFrame.cpp
</span><span class="cx"> history/CachedPage.cpp
</span><span class="cx"> history/HistoryItem.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/ChangeLog        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-10-13 Anders Carlsson <andersca@apple.com>
+
+ Move BackForwardList from WebCore to WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=163418
+
+ Reviewed by Tim Horton.
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * history/BackForwardController.cpp:
+ (WebCore::BackForwardController::BackForwardController):
+ * history/BackForwardController.h:
+ * loader/EmptyClients.cpp:
+ (WebCore::fillWithEmptyClients):
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+
</ins><span class="cx"> 2016-10-14 Manuel Rego Casasnovas <rego@igalia.com>
</span><span class="cx">
</span><span class="cx"> [css-grid] Changing the argument on fit-content() doesn't cause the grid to be relayout
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/PlatformMac.cmake        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -690,7 +690,6 @@
</span><span class="cx">
</span><span class="cx"> editing/mac/TextAlternativeWithRange.h
</span><span class="cx">
</span><del>- history/BackForwardList.h
</del><span class="cx"> history/HistoryItem.h
</span><span class="cx"> history/PageCache.h
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -5280,8 +5280,6 @@
</span><span class="cx">                 BCA846D70DC67A350026C309 /* RenderReplica.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA846D50DC67A350026C309 /* RenderReplica.h */; };
</span><span class="cx">                 BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C81C11E3D36900812FB7 /* BackForwardController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */; };
</span><del>-                BCA8CA5F11E4E6D100812FB7 /* BackForwardList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8CA5D11E4E6D100812FB7 /* BackForwardList.cpp */; };
-                BCA8CA6011E4E6D100812FB7 /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8CA5E11E4E6D100812FB7 /* BackForwardList.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 BCAA486F14A052530088FAC4 /* PlatformEventFactoryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCAA486D14A052530088FAC4 /* PlatformEventFactoryMac.mm */; };
</span><span class="cx">                 BCAA487014A052530088FAC4 /* PlatformEventFactoryMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCAA486E14A052530088FAC4 /* PlatformEventFactoryMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BCAA90C30A7EBA60008B1229 /* Scrollbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCAA90C20A7EBA60008B1229 /* Scrollbar.cpp */; };
</span><span class="lines">@@ -12806,8 +12804,6 @@
</span><span class="cx">                 BCA846D50DC67A350026C309 /* RenderReplica.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderReplica.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCA8C81C11E3D36900812FB7 /* BackForwardController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardController.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardController.cpp; sourceTree = "<group>"; };
</span><del>-                BCA8CA5D11E4E6D100812FB7 /* BackForwardList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardList.cpp; sourceTree = "<group>"; };
-                BCA8CA5E11E4E6D100812FB7 /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
</del><span class="cx">                 BCAA486D14A052530088FAC4 /* PlatformEventFactoryMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformEventFactoryMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 BCAA486E14A052530088FAC4 /* PlatformEventFactoryMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformEventFactoryMac.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCAA90C20A7EBA60008B1229 /* Scrollbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Scrollbar.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -16698,8 +16694,6 @@
</span><span class="cx">                                 51741D0B0B07259A00ED442C /* BackForwardClient.h */,
</span><span class="cx">                                 BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */,
</span><span class="cx">                                 BCA8C81C11E3D36900812FB7 /* BackForwardController.h */,
</span><del>-                                BCA8CA5D11E4E6D100812FB7 /* BackForwardList.cpp */,
-                                BCA8CA5E11E4E6D100812FB7 /* BackForwardList.h */,
</del><span class="cx">                                 51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */,
</span><span class="cx">                                 51C0AA380F2AA10A001648C2 /* CachedFrame.h */,
</span><span class="cx">                                 51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */,
</span><span class="lines">@@ -24000,7 +23994,6 @@
</span><span class="cx">                                 91C9F2F91AE3BEB00095B61C /* AXTextStateChangeIntent.h in Headers */,
</span><span class="cx">                                 51741D0F0B07259A00ED442C /* BackForwardClient.h in Headers */,
</span><span class="cx">                                 BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
</span><del>-                                BCA8CA6011E4E6D100812FB7 /* BackForwardList.h in Headers */,
</del><span class="cx">                                 BC124EE80C2641CD009E2349 /* BarProp.h in Headers */,
</span><span class="cx">                                 460BB6161D0A1BF000221812 /* Base64Utilities.h in Headers */,
</span><span class="cx">                                 379E61CA126CA5C400B63E8D /* BaseButtonInputType.h in Headers */,
</span><span class="lines">@@ -27779,7 +27772,6 @@
</span><span class="cx">                                 1A299FE71D7F5FA600A60093 /* RenderThemeCocoa.mm in Sources */,
</span><span class="cx">                                 29A8124B0FBB9CA900510293 /* AXObjectCacheMac.mm in Sources */,
</span><span class="cx">                                 BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */,
</span><del>-                                BCA8CA5F11E4E6D100812FB7 /* BackForwardList.cpp in Sources */,
</del><span class="cx">                                 BC124EE70C2641CD009E2349 /* BarProp.cpp in Sources */,
</span><span class="cx">                                 460BB6151D0A1BF000221812 /* Base64Utilities.cpp in Sources */,
</span><span class="cx">                                 379E61C9126CA5C300B63E8D /* BaseButtonInputType.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardController.cpp (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardController.cpp        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/history/BackForwardController.cpp        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -26,18 +26,15 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "BackForwardController.h"
</span><span class="cx">
</span><del>-#include "BackForwardList.h"
-#include "HistoryItem.h"
</del><ins>+#include "BackForwardClient.h"
</ins><span class="cx"> #include "Page.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-BackForwardController::BackForwardController(Page& page, RefPtr<BackForwardClient>&& client)
</del><ins>+BackForwardController::BackForwardController(Page& page, Ref<BackForwardClient>&& client)
</ins><span class="cx"> : m_page(page)
</span><span class="cx"> , m_client(WTFMove(client))
</span><span class="cx"> {
</span><del>- if (!m_client)
- m_client = BackForwardList::create(&page);
</del><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 (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardController.h        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/history/BackForwardController.h        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -39,7 +39,7 @@
</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&, RefPtr<BackForwardClient>&&);
</del><ins>+ BackForwardController(Page&, Ref<BackForwardClient>&&);
</ins><span class="cx"> ~BackForwardController();
</span><span class="cx">
</span><span class="cx"> BackForwardClient* client() const { return m_client.get(); }
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardListcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/history/BackForwardList.cpp (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardList.cpp        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/history/BackForwardList.cpp        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -1,295 +0,0 @@
</span><del>-/*
- * Copyright (C) 2005, 2006 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- *
- * 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. ``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
- * 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.
- */
-
-#include "config.h"
-#include "BackForwardList.h"
-
-#include "Frame.h"
-#include "FrameLoader.h"
-#include "FrameLoaderClient.h"
-#include "HistoryItem.h"
-#include "Logging.h"
-#include "Page.h"
-#include "PageCache.h"
-#include "SerializedScriptValue.h"
-
-namespace WebCore {
-
-static const unsigned DefaultCapacity = 100;
-static const unsigned NoCurrentItemIndex = UINT_MAX;
-
-BackForwardList::BackForwardList(Page* page)
- : m_page(page)
- , m_current(NoCurrentItemIndex)
- , m_capacity(DefaultCapacity)
- , m_closed(true)
- , m_enabled(true)
-{
-}
-
-BackForwardList::~BackForwardList()
-{
- ASSERT(m_closed);
-}
-
-void BackForwardList::addItem(Ref<HistoryItem>&& newItem)
-{
- if (!m_capacity || !m_enabled)
- return;
-
- // Toss anything in the forward list
- if (m_current != NoCurrentItemIndex) {
- unsigned targetSize = m_current + 1;
- while (m_entries.size() > targetSize) {
- Ref<HistoryItem> item = m_entries.takeLast();
- m_entryHash.remove(item.ptr());
- PageCache::singleton().remove(item);
- }
- }
-
- // Toss the first item if the list is getting too big, as long as we're not using it
- // (or even if we are, if we only want 1 entry).
- if (m_entries.size() == m_capacity && (m_current || m_capacity == 1)) {
- Ref<HistoryItem> item = WTFMove(m_entries[0]);
- m_entries.remove(0);
- m_entryHash.remove(item.ptr());
- PageCache::singleton().remove(item);
- --m_current;
- }
-
- m_entryHash.add(newItem.ptr());
- m_entries.insert(m_current + 1, WTFMove(newItem));
- ++m_current;
-}
-
-void BackForwardList::goBack()
-{
- ASSERT(m_current > 0);
- if (m_current > 0) {
- m_current--;
- }
-}
-
-void BackForwardList::goForward()
-{
- ASSERT(m_current < m_entries.size() - 1);
- if (m_current < m_entries.size() - 1) {
- m_current++;
- }
-}
-
-void BackForwardList::goToItem(HistoryItem* item)
-{
- if (!m_entries.size() || !item)
- return;
-
- unsigned int index = 0;
- for (; index < m_entries.size(); ++index)
- if (m_entries[index].ptr() == item)
- break;
- if (index < m_entries.size()) {
- m_current = index;
- }
-}
-
-HistoryItem* BackForwardList::backItem()
-{
- if (m_current && m_current != NoCurrentItemIndex)
- return m_entries[m_current - 1].ptr();
- return nullptr;
-}
-
-HistoryItem* BackForwardList::currentItem()
-{
- if (m_current != NoCurrentItemIndex)
- return m_entries[m_current].ptr();
- return nullptr;
-}
-
-HistoryItem* BackForwardList::forwardItem()
-{
- if (m_entries.size() && m_current < m_entries.size() - 1)
- return m_entries[m_current + 1].ptr();
- return nullptr;
-}
-
-void BackForwardList::backListWithLimit(int limit, Vector<Ref<HistoryItem>>& list)
-{
- list.clear();
- if (m_current != NoCurrentItemIndex) {
- unsigned first = std::max(static_cast<int>(m_current) - limit, 0);
- for (; first < m_current; ++first)
- list.append(m_entries[first].get());
- }
-}
-
-void BackForwardList::forwardListWithLimit(int limit, Vector<Ref<HistoryItem>>& list)
-{
- ASSERT(limit > -1);
- list.clear();
- if (!m_entries.size())
- return;
-
- unsigned lastEntry = m_entries.size() - 1;
- if (m_current < lastEntry) {
- int last = std::min(m_current + limit, lastEntry);
- limit = m_current + 1;
- for (; limit <= last; ++limit)
- list.append(m_entries[limit].get());
- }
-}
-
-int BackForwardList::capacity()
-{
- return m_capacity;
-}
-
-void BackForwardList::setCapacity(int size)
-{
- while (size < static_cast<int>(m_entries.size())) {
- Ref<HistoryItem> item = m_entries.takeLast();
- m_entryHash.remove(item.ptr());
- PageCache::singleton().remove(item);
- }
-
- if (!size)
- m_current = NoCurrentItemIndex;
- else if (m_current > m_entries.size() - 1) {
- m_current = m_entries.size() - 1;
- }
- m_capacity = size;
-}
-
-bool BackForwardList::enabled()
-{
- return m_enabled;
-}
-
-void BackForwardList::setEnabled(bool enabled)
-{
- m_enabled = enabled;
- if (!enabled) {
- int capacity = m_capacity;
- setCapacity(0);
- setCapacity(capacity);
- }
-}
-
-int BackForwardList::backListCount()
-{
- return m_current == NoCurrentItemIndex ? 0 : m_current;
-}
-
-int BackForwardList::forwardListCount()
-{
- return m_current == NoCurrentItemIndex ? 0 : (int)m_entries.size() - (m_current + 1);
-}
-
-HistoryItem* BackForwardList::itemAtIndex(int index)
-{
- // Do range checks without doing math on index to avoid overflow.
- if (index < -static_cast<int>(m_current))
- return nullptr;
-
- if (index > forwardListCount())
- return nullptr;
-
- return m_entries[index + m_current].ptr();
-}
-
-Vector<Ref<HistoryItem>>& BackForwardList::entries()
-{
- return m_entries;
-}
-
-#if PLATFORM(IOS)
-unsigned BackForwardList::current()
-{
- return m_current;
-}
-
-void BackForwardList::setCurrent(unsigned newCurrent)
-{
- m_current = newCurrent;
-}
-
-bool BackForwardList::clearAllPageCaches()
-{
- bool didRemoveAtLeastOneItem = false;
- for (auto& item : m_entries) {
- if (item->isInPageCache()) {
- didRemoveAtLeastOneItem = true;
- PageCache::singleton().remove(item);
- }
- }
- return didRemoveAtLeastOneItem;
-}
-#endif
-
-void BackForwardList::close()
-{
- for (auto& item : m_entries)
- PageCache::singleton().remove(item);
- m_entries.clear();
- m_entryHash.clear();
- m_page = nullptr;
- m_closed = true;
-}
-
-bool BackForwardList::closed()
-{
- return m_closed;
-}
-
-void BackForwardList::removeItem(HistoryItem* item)
-{
- if (!item)
- return;
-
- for (unsigned i = 0; i < m_entries.size(); ++i) {
- if (m_entries[i].ptr() == item) {
- m_entries.remove(i);
- m_entryHash.remove(item);
- if (m_current == NoCurrentItemIndex || m_current < i)
- break;
- if (m_current > i)
- m_current--;
- else {
- size_t count = m_entries.size();
- if (m_current >= count)
- m_current = count ? count - 1 : NoCurrentItemIndex;
- }
- break;
- }
- }
-}
-
-bool BackForwardList::containsItem(HistoryItem* entry)
-{
- return m_entryHash.contains(entry);
-}
-
-}; // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardListh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/history/BackForwardList.h (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardList.h        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/history/BackForwardList.h        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -1,96 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- * Copyright (C) 2009 Google, 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. ``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
- * 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.
- */
-
-#ifndef BackForwardList_h
-#define BackForwardList_h
-
-#include "BackForwardClient.h"
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class Page;
-
-typedef HashSet<RefPtr<HistoryItem>> HistoryItemHashSet;
-
-class BackForwardList : public BackForwardClient {
-public:
- static Ref<BackForwardList> create(Page* page) { return adoptRef(*new BackForwardList(page)); }
- virtual ~BackForwardList();
-
- Page* page() { return m_page; }
-
- void addItem(Ref<HistoryItem>&&) override;
- WEBCORE_EXPORT void goBack();
- WEBCORE_EXPORT void goForward();
- void goToItem(HistoryItem*) override;
-
- WEBCORE_EXPORT HistoryItem* backItem();
- WEBCORE_EXPORT HistoryItem* currentItem();
- WEBCORE_EXPORT HistoryItem* forwardItem();
- HistoryItem* itemAtIndex(int) override;
-
- WEBCORE_EXPORT void backListWithLimit(int, Vector<Ref<HistoryItem>>&);
- WEBCORE_EXPORT void forwardListWithLimit(int, Vector<Ref<HistoryItem>>&);
-
- WEBCORE_EXPORT int capacity();
- WEBCORE_EXPORT void setCapacity(int);
- WEBCORE_EXPORT bool enabled();
- WEBCORE_EXPORT void setEnabled(bool);
- int backListCount() override;
- int forwardListCount() override;
- WEBCORE_EXPORT bool containsItem(HistoryItem*);
-
- void close() override;
- WEBCORE_EXPORT bool closed();
-
- WEBCORE_EXPORT void removeItem(HistoryItem*);
- WEBCORE_EXPORT Vector<Ref<HistoryItem>>& entries();
-
-#if PLATFORM(IOS)
- unsigned current() override;
- void setCurrent(unsigned newCurrent) override;
-
- bool clearAllPageCaches() override;
-#endif
-
-private:
- WEBCORE_EXPORT explicit BackForwardList(Page*);
-
- Page* m_page;
- Vector<Ref<HistoryItem>> m_entries;
- HistoryItemHashSet m_entryHash;
- unsigned m_current;
- unsigned m_capacity;
- bool m_closed;
- bool m_enabled;
-};
-
-} // namespace WebCore
-
-#endif // BackForwardList_h
</del></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "EmptyClients.h"
</span><span class="cx">
</span><span class="cx"> #include "ApplicationCacheStorage.h"
</span><ins>+#include "BackForwardClient.h"
</ins><span class="cx"> #include "ColorChooser.h"
</span><span class="cx"> #include "DOMWrapperWorld.h"
</span><span class="cx"> #include "DatabaseProvider.h"
</span><span class="lines">@@ -140,6 +141,21 @@
</span><span class="cx"> void addVisitedLink(Page&, LinkHash) override { }
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+class EmptyBackForwardClient final : public BackForwardClient {
+ void addItem(Ref<HistoryItem>&&) override { }
+ void goToItem(HistoryItem*) override { }
+ HistoryItem* itemAtIndex(int) override { return nullptr; }
+ int backListCount() override { return 0; }
+ int forwardListCount() override { return 0; }
+ void close() override { }
+
+#if PLATFORM(IOS)
+ unsigned current() override { return 0; }
+ void setCurrent(unsigned) override { }
+ bool clearAllPageCaches() override { return false; }
+#endif
+};
+
</ins><span class="cx"> void fillWithEmptyClients(PageConfiguration& pageConfiguration)
</span><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<EmptyChromeClient> dummyChromeClient;
</span><span class="lines">@@ -169,6 +185,7 @@
</span><span class="cx"> static NeverDestroyed<EmptyProgressTrackerClient> dummyProgressTrackerClient;
</span><span class="cx"> pageConfiguration.progressTrackerClient = &dummyProgressTrackerClient.get();
</span><span class="cx">
</span><ins>+ pageConfiguration.backForwardClient = adoptRef(new EmptyBackForwardClient);
</ins><span class="cx"> pageConfiguration.diagnosticLoggingClient = std::make_unique<EmptyDiagnosticLoggingClient>();
</span><span class="cx">
</span><span class="cx"> pageConfiguration.applicationCacheStorage = ApplicationCacheStorage::create(String(), String());
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebCore/page/Page.cpp        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -178,7 +178,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>(*pageConfiguration.progressTrackerClient))
</span><del>- , m_backForwardController(std::make_unique<BackForwardController>(*this, WTFMove(pageConfiguration.backForwardClient)))
</del><ins>+ , m_backForwardController(std::make_unique<BackForwardController>(*this, *WTFMove(pageConfiguration.backForwardClient)))
</ins><span class="cx"> , m_mainFrame(MainFrame::create(*this, pageConfiguration))
</span><span class="cx"> , m_theme(RenderTheme::themeForPage(this))
</span><span class="cx"> , m_editorClient(WTFMove(pageConfiguration.editorClient))
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/ChangeLog        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-10-13 Anders Carlsson <andersca@apple.com>
+
+ Move BackForwardList from WebCore to WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=163418
+
+ Reviewed by Tim Horton.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-10-12 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Copy BackForwardList from WebCore to WebKit/win
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -55,6 +55,8 @@
</span><span class="cx">                 1A86CCD41AD48A620074BA89 /* WebApplicationCacheInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */; };
</span><span class="cx">                 1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */; };
</span><span class="cx">                 1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */; };
</span><ins>+                1A9119F61DB0470A0087D1FD /* BackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9119F41DB0470A0087D1FD /* BackForwardList.mm */; };
+                1A9119F71DB0470A0087D1FD /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9119F51DB0470A0087D1FD /* BackForwardList.h */; };
</ins><span class="cx">                 1AA83F831A5C4AE400026EC6 /* WebDatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */; };
</span><span class="cx">                 1AA83F841A5C4AE400026EC6 /* WebDatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */; };
</span><span class="cx">                 1AA879B611CBE9BF003C664F /* WebPlatformStrategies.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */; };
</span><span class="lines">@@ -849,6 +851,8 @@
</span><span class="cx">                 1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCacheInternal.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostedNetscapePluginStream.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HostedNetscapePluginStream.mm; sourceTree = "<group>"; };
</span><ins>+                1A9119F41DB0470A0087D1FD /* BackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackForwardList.mm; sourceTree = "<group>"; };
+                1A9119F51DB0470A0087D1FD /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
</ins><span class="cx">                 1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebDatabaseProvider.cpp; path = ../../Storage/WebDatabaseProvider.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebDatabaseProvider.h; path = ../../Storage/WebDatabaseProvider.h; sourceTree = "<group>"; };
</span><span class="cx">                 1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPlatformStrategies.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -1848,6 +1852,8 @@
</span><span class="cx">                 25A8176801B5474B0ECA149E /* History */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                1A9119F41DB0470A0087D1FD /* BackForwardList.mm */,
+                                1A9119F51DB0470A0087D1FD /* BackForwardList.h */,
</ins><span class="cx">                                 1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */,
</span><span class="cx">                                 1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */,
</span><span class="cx">                                 1A60519017502A5D00BC62F5 /* HistoryPropertyList.h */,
</span><span class="lines">@@ -2895,6 +2901,7 @@
</span><span class="cx">                                 93D437651D57ABEF00AB85EA /* DOMProcessingInstructionInternal.h in Headers */,
</span><span class="cx">                                 93D437661D57ABEF00AB85EA /* DOMProgressEvent.h in Headers */,
</span><span class="cx">                                 93D437681D57ABEF00AB85EA /* DOMRange.h in Headers */,
</span><ins>+                                1A9119F71DB0470A0087D1FD /* BackForwardList.h in Headers */,
</ins><span class="cx">                                 93D4376A1D57ABEF00AB85EA /* DOMRangeException.h in Headers */,
</span><span class="cx">                                 93D4376B1D57ABEF00AB85EA /* DOMRangeInternal.h in Headers */,
</span><span class="cx">                                 93D4376C1D57ABEF00AB85EA /* DOMRanges.h in Headers */,
</span><span class="lines">@@ -3539,6 +3546,7 @@
</span><span class="cx">                                 CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */,
</span><span class="cx">                                 B6CE5C24100BC5CE00219936 /* WebApplicationCache.mm in Sources */,
</span><span class="cx">                                 A5DEFC1411D5344B00885273 /* WebApplicationCacheQuotaManager.mm in Sources */,
</span><ins>+                                1A9119F61DB0470A0087D1FD /* BackForwardList.mm in Sources */,
</ins><span class="cx">                                 9398111D0824BF01008DF038 /* WebArchive.mm in Sources */,
</span><span class="cx">                                 939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */,
</span><span class="cx">                                 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2016-10-13 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><ins>+ Move BackForwardList from WebCore to WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=163418
+
+ Reviewed by Tim Horton.
+
+ * History/BackForwardList.h: Renamed from Source/WebCore/history/BackForwardList.h.
+ (BackForwardList::create):
+ (BackForwardList::webView):
+ * History/BackForwardList.mm: Renamed from Source/WebCore/history/BackForwardList.cpp.
+ (BackForwardList::BackForwardList):
+ (BackForwardList::close):
+ (BackForwardList::containsItem):
+ * History/WebBackForwardList.mm:
+ (kit):
+ (-[WebBackForwardList initWithBackForwardList:]):
+ (-[WebBackForwardList setPageCacheSize:]):
+ (-[WebBackForwardList pageCacheSize]):
+ * History/WebBackForwardListInternal.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebFrameView.mm:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
+
+2016-10-13 Anders Carlsson <andersca@apple.com>
+
</ins><span class="cx"> Get rid of the HistoryItemVector typedef
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=163398
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryBackForwardListhfromrev207344trunkSourceWebCorehistoryBackForwardListh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/mac/History/BackForwardList.h (from rev 207344, trunk/Source/WebCore/history/BackForwardList.h) (0 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/BackForwardList.h         (rev 0)
+++ trunk/Source/WebKit/mac/History/BackForwardList.h        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * Copyright (C) 2009 Google, 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. ``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
+ * 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.
+ */
+
+#pragma once
+
+#include <WebCore/BackForwardClient.h>
+#include <wtf/HashSet.h>
+#include <wtf/Vector.h>
+
+OBJC_CLASS WebView;
+
+typedef HashSet<RefPtr<WebCore::HistoryItem>> HistoryItemHashSet;
+
+class BackForwardList : public WebCore::BackForwardClient {
+public:
+ static Ref<BackForwardList> create(WebView *webView) { return adoptRef(*new BackForwardList(webView)); }
+ virtual ~BackForwardList();
+
+ WebView *webView() { return m_webView; }
+
+ void addItem(Ref<WebCore::HistoryItem>&&) override;
+ WEBCORE_EXPORT void goBack();
+ WEBCORE_EXPORT void goForward();
+ void goToItem(WebCore::HistoryItem*) override;
+
+ WEBCORE_EXPORT WebCore::HistoryItem* backItem();
+ WEBCORE_EXPORT WebCore::HistoryItem* currentItem();
+ WEBCORE_EXPORT WebCore::HistoryItem* forwardItem();
+ WebCore::HistoryItem* itemAtIndex(int) override;
+
+ WEBCORE_EXPORT void backListWithLimit(int, Vector<Ref<WebCore::HistoryItem>>&);
+ WEBCORE_EXPORT void forwardListWithLimit(int, Vector<Ref<WebCore::HistoryItem>>&);
+
+ WEBCORE_EXPORT int capacity();
+ WEBCORE_EXPORT void setCapacity(int);
+ WEBCORE_EXPORT bool enabled();
+ WEBCORE_EXPORT void setEnabled(bool);
+ int backListCount() override;
+ int forwardListCount() override;
+ WEBCORE_EXPORT bool containsItem(WebCore::HistoryItem*);
+
+ void close() override;
+ WEBCORE_EXPORT bool closed();
+
+ WEBCORE_EXPORT void removeItem(WebCore::HistoryItem*);
+ WEBCORE_EXPORT Vector<Ref<WebCore::HistoryItem>>& entries();
+
+#if PLATFORM(IOS)
+ unsigned current() override;
+ void setCurrent(unsigned newCurrent) override;
+
+ bool clearAllPageCaches() override;
+#endif
+
+private:
+ WEBCORE_EXPORT explicit BackForwardList(WebView *);
+
+ WebView* m_webView;
+ Vector<Ref<WebCore::HistoryItem>> m_entries;
+ HistoryItemHashSet m_entryHash;
+ unsigned m_current;
+ unsigned m_capacity;
+ bool m_closed;
+ bool m_enabled;
+};
</ins></span></pre></div>
<a id="trunkSourceWebKitmacHistoryBackForwardListmmfromrev207344trunkSourceWebCorehistoryBackForwardListcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/mac/History/BackForwardList.mm (from rev 207344, trunk/Source/WebCore/history/BackForwardList.cpp) (0 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/BackForwardList.mm         (rev 0)
+++ trunk/Source/WebKit/mac/History/BackForwardList.mm        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -0,0 +1,284 @@
</span><ins>+/*
+ * Copyright (C) 2005, 2006 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "BackForwardList.h"
+
+#include <WebCore/PageCache.h>
+
+using namespace WebCore;
+
+static const unsigned DefaultCapacity = 100;
+static const unsigned NoCurrentItemIndex = UINT_MAX;
+
+BackForwardList::BackForwardList(WebView *webView)
+ : m_webView(webView)
+ , m_current(NoCurrentItemIndex)
+ , m_capacity(DefaultCapacity)
+ , m_closed(true)
+ , m_enabled(true)
+{
+}
+
+BackForwardList::~BackForwardList()
+{
+ ASSERT(m_closed);
+}
+
+void BackForwardList::addItem(Ref<HistoryItem>&& newItem)
+{
+ if (!m_capacity || !m_enabled)
+ return;
+
+ // Toss anything in the forward list
+ if (m_current != NoCurrentItemIndex) {
+ unsigned targetSize = m_current + 1;
+ while (m_entries.size() > targetSize) {
+ Ref<HistoryItem> item = m_entries.takeLast();
+ m_entryHash.remove(item.ptr());
+ PageCache::singleton().remove(item);
+ }
+ }
+
+ // Toss the first item if the list is getting too big, as long as we're not using it
+ // (or even if we are, if we only want 1 entry).
+ if (m_entries.size() == m_capacity && (m_current || m_capacity == 1)) {
+ Ref<HistoryItem> item = WTFMove(m_entries[0]);
+ m_entries.remove(0);
+ m_entryHash.remove(item.ptr());
+ PageCache::singleton().remove(item);
+ --m_current;
+ }
+
+ m_entryHash.add(newItem.ptr());
+ m_entries.insert(m_current + 1, WTFMove(newItem));
+ ++m_current;
+}
+
+void BackForwardList::goBack()
+{
+ ASSERT(m_current > 0);
+ if (m_current > 0)
+ m_current--;
+}
+
+void BackForwardList::goForward()
+{
+ ASSERT(m_current < m_entries.size() - 1);
+ if (m_current < m_entries.size() - 1)
+ m_current++;
+}
+
+void BackForwardList::goToItem(HistoryItem* item)
+{
+ if (!m_entries.size() || !item)
+ return;
+
+ unsigned index = 0;
+ for (; index < m_entries.size(); ++index) {
+ if (m_entries[index].ptr() == item)
+ break;
+ }
+
+ if (index < m_entries.size())
+ m_current = index;
+}
+
+HistoryItem* BackForwardList::backItem()
+{
+ if (m_current && m_current != NoCurrentItemIndex)
+ return m_entries[m_current - 1].ptr();
+ return nullptr;
+}
+
+HistoryItem* BackForwardList::currentItem()
+{
+ if (m_current != NoCurrentItemIndex)
+ return m_entries[m_current].ptr();
+ return nullptr;
+}
+
+HistoryItem* BackForwardList::forwardItem()
+{
+ if (m_entries.size() && m_current < m_entries.size() - 1)
+ return m_entries[m_current + 1].ptr();
+ return nullptr;
+}
+
+void BackForwardList::backListWithLimit(int limit, Vector<Ref<HistoryItem>>& list)
+{
+ list.clear();
+ if (m_current != NoCurrentItemIndex) {
+ unsigned first = std::max(static_cast<int>(m_current) - limit, 0);
+ for (; first < m_current; ++first)
+ list.append(m_entries[first].get());
+ }
+}
+
+void BackForwardList::forwardListWithLimit(int limit, Vector<Ref<HistoryItem>>& list)
+{
+ ASSERT(limit > -1);
+ list.clear();
+ if (!m_entries.size())
+ return;
+
+ unsigned lastEntry = m_entries.size() - 1;
+ if (m_current < lastEntry) {
+ int last = std::min(m_current + limit, lastEntry);
+ limit = m_current + 1;
+ for (; limit <= last; ++limit)
+ list.append(m_entries[limit].get());
+ }
+}
+
+int BackForwardList::capacity()
+{
+ return m_capacity;
+}
+
+void BackForwardList::setCapacity(int size)
+{
+ while (size < static_cast<int>(m_entries.size())) {
+ Ref<HistoryItem> item = m_entries.takeLast();
+ m_entryHash.remove(item.ptr());
+ PageCache::singleton().remove(item);
+ }
+
+ if (!size)
+ m_current = NoCurrentItemIndex;
+ else if (m_current > m_entries.size() - 1)
+ m_current = m_entries.size() - 1;
+
+ m_capacity = size;
+}
+
+bool BackForwardList::enabled()
+{
+ return m_enabled;
+}
+
+void BackForwardList::setEnabled(bool enabled)
+{
+ m_enabled = enabled;
+ if (!enabled) {
+ int capacity = m_capacity;
+ setCapacity(0);
+ setCapacity(capacity);
+ }
+}
+
+int BackForwardList::backListCount()
+{
+ return m_current == NoCurrentItemIndex ? 0 : m_current;
+}
+
+int BackForwardList::forwardListCount()
+{
+ return m_current == NoCurrentItemIndex ? 0 : (int)m_entries.size() - (m_current + 1);
+}
+
+HistoryItem* BackForwardList::itemAtIndex(int index)
+{
+ // Do range checks without doing math on index to avoid overflow.
+ if (index < -static_cast<int>(m_current))
+ return nullptr;
+
+ if (index > forwardListCount())
+ return nullptr;
+
+ return m_entries[index + m_current].ptr();
+}
+
+Vector<Ref<HistoryItem>>& BackForwardList::entries()
+{
+ return m_entries;
+}
+
+#if PLATFORM(IOS)
+unsigned BackForwardList::current()
+{
+ return m_current;
+}
+
+void BackForwardList::setCurrent(unsigned newCurrent)
+{
+ m_current = newCurrent;
+}
+
+bool BackForwardList::clearAllPageCaches()
+{
+ bool didRemoveAtLeastOneItem = false;
+ for (auto& item : m_entries) {
+ if (item->isInPageCache()) {
+ didRemoveAtLeastOneItem = true;
+ PageCache::singleton().remove(item);
+ }
+ }
+ return didRemoveAtLeastOneItem;
+}
+#endif
+
+void BackForwardList::close()
+{
+ for (auto& item : m_entries)
+ PageCache::singleton().remove(item);
+ m_entries.clear();
+ m_entryHash.clear();
+ m_webView = nullptr;
+ m_closed = true;
+}
+
+bool BackForwardList::closed()
+{
+ return m_closed;
+}
+
+void BackForwardList::removeItem(HistoryItem* item)
+{
+ if (!item)
+ return;
+
+ for (unsigned i = 0; i < m_entries.size(); ++i) {
+ if (m_entries[i].ptr() == item) {
+ m_entries.remove(i);
+ m_entryHash.remove(item);
+ if (m_current == NoCurrentItemIndex || m_current < i)
+ break;
+ if (m_current > i)
+ m_current--;
+ else {
+ size_t count = m_entries.size();
+ if (m_current >= count)
+ m_current = count ? count - 1 : NoCurrentItemIndex;
+ }
+ break;
+ }
+ }
+}
+
+bool BackForwardList::containsItem(HistoryItem* entry)
+{
+ return m_entryHash.contains(entry);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebBackForwardListmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebBackForwardList.mm (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebBackForwardList.mm        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/mac/History/WebBackForwardList.mm        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #import "WebBackForwardList.h"
</span><span class="cx"> #import "WebBackForwardListInternal.h"
</span><span class="cx">
</span><ins>+#import "BackForwardList.h"
</ins><span class="cx"> #import "WebFrameInternal.h"
</span><span class="cx"> #import "WebHistoryItemInternal.h"
</span><span class="cx"> #import "WebHistoryItemPrivate.h"
</span><span class="lines">@@ -38,7 +39,6 @@
</span><span class="cx"> #import "WebPreferencesPrivate.h"
</span><span class="cx"> #import "WebTypesInternal.h"
</span><span class="cx"> #import "WebViewPrivate.h"
</span><del>-#import <WebCore/BackForwardList.h>
</del><span class="cx"> #import <WebCore/HistoryItem.h>
</span><span class="cx"> #import <WebCore/Page.h>
</span><span class="cx"> #import <WebCore/PageCache.h>
</span><span class="lines">@@ -82,10 +82,10 @@
</span><span class="cx"> if (WebBackForwardList *webBackForwardList = backForwardLists().get(backForwardList))
</span><span class="cx"> return webBackForwardList;
</span><span class="cx">
</span><del>- return [[[WebBackForwardList alloc] initWithBackForwardList:backForwardList] autorelease];
</del><ins>+ return [[[WebBackForwardList alloc] initWithBackForwardList:*backForwardList] autorelease];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithBackForwardList:(PassRefPtr<BackForwardList>)backForwardList
</del><ins>+- (id)initWithBackForwardList:(Ref<BackForwardList>&&)backForwardList
</ins><span class="cx"> {
</span><span class="cx"> WebCoreThreadViolationCheckRoundOne();
</span><span class="cx"> self = [super init];
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> if (!self)
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- _private = reinterpret_cast<WebBackForwardListPrivate*>(backForwardList.leakRef());
</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">@@ -332,12 +332,12 @@
</span><span class="cx">
</span><span class="cx"> - (void)setPageCacheSize:(NSUInteger)size
</span><span class="cx"> {
</span><del>- [kit(core(self)->page()) setUsesPageCache:size != 0];
</del><ins>+ [core(self)->webView() setUsesPageCache:size != 0];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSUInteger)pageCacheSize
</span><span class="cx"> {
</span><del>- return [kit(core(self)->page()) usesPageCache] ? PageCache::singleton().maxSize() : 0;
</del><ins>+ return [core(self)->webView() usesPageCache] ? PageCache::singleton().maxSize() : 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (int)backListCount
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebBackForwardListInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -29,13 +29,11 @@
</span><span class="cx"> #import <WebKitLegacy/WebBackForwardList.h>
</span><span class="cx"> #import <wtf/PassRefPtr.h>
</span><span class="cx">
</span><del>-namespace WebCore {
</del><span class="cx"> class BackForwardList;
</span><del>-}
</del><span class="cx">
</span><del>-WebCore::BackForwardList* core(WebBackForwardList *);
-WebBackForwardList *kit(WebCore::BackForwardList*);
</del><ins>+BackForwardList* core(WebBackForwardList *);
+WebBackForwardList *kit(BackForwardList*);
</ins><span class="cx">
</span><span class="cx"> @interface WebBackForwardList ()
</span><del>-- (id)initWithBackForwardList:(PassRefPtr<WebCore::BackForwardList>)backForwardList;
</del><ins>+- (id)initWithBackForwardList:(Ref<BackForwardList>&&)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 (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #import "WebFrameLoaderClient.h"
</span><span class="cx">
</span><ins>+#import "BackForwardList.h"
</ins><span class="cx"> #import "DOMElementInternal.h"
</span><span class="cx"> #import "DOMHTMLFormElementInternal.h"
</span><span class="cx"> #import "WebBackForwardList.h"
</span><span class="lines">@@ -75,7 +76,6 @@
</span><span class="cx"> #import <WebCore/AuthenticationCF.h>
</span><span class="cx"> #import <WebCore/AuthenticationMac.h>
</span><span class="cx"> #import <WebCore/BackForwardController.h>
</span><del>-#import <WebCore/BackForwardList.h>
</del><span class="cx"> #import <WebCore/CachedFrame.h>
</span><span class="cx"> #import <WebCore/Chrome.h>
</span><span class="cx"> #import <WebCore/DNS.h>
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFrameViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #import "WebFrameView.h"
</span><span class="cx">
</span><ins>+#import "BackForwardList.h"
</ins><span class="cx"> #import "WebClipView.h"
</span><span class="cx"> #import "WebDataSourcePrivate.h"
</span><span class="cx"> #import "WebDocument.h"
</span><span class="lines">@@ -52,7 +53,6 @@
</span><span class="cx"> #import "WebViewPrivate.h"
</span><span class="cx"> #import <Foundation/NSURLRequest.h>
</span><span class="cx"> #import <WebCore/BackForwardController.h>
</span><del>-#import <WebCore/BackForwardList.h>
</del><span class="cx"> #import <WebCore/DragController.h>
</span><span class="cx"> #import <WebCore/EventHandler.h>
</span><span class="cx"> #import <WebCore/Frame.h>
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (207344 => 207345)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-10-14 16:23:42 UTC (rev 207344)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-10-14 17:14:39 UTC (rev 207345)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #import "WebViewInternal.h"
</span><span class="cx"> #import "WebViewData.h"
</span><span class="cx">
</span><ins>+#import "BackForwardList.h"
</ins><span class="cx"> #import "DOMCSSStyleDeclarationInternal.h"
</span><span class="cx"> #import "DOMDocumentInternal.h"
</span><span class="cx"> #import "DOMInternal.h"
</span><span class="lines">@@ -121,7 +122,6 @@
</span><span class="cx"> #import <WebCore/AnimationController.h>
</span><span class="cx"> #import <WebCore/ApplicationCacheStorage.h>
</span><span class="cx"> #import <WebCore/BackForwardController.h>
</span><del>-#import <WebCore/BackForwardList.h>
</del><span class="cx"> #import <WebCore/CFNetworkSPI.h>
</span><span class="cx"> #import <WebCore/Chrome.h>
</span><span class="cx"> #import <WebCore/ColorMac.h>
</span><span class="lines">@@ -1032,6 +1032,8 @@
</span><span class="cx"> pageConfiguration.inspectorClient = new WebInspectorClient(self);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ pageConfiguration.backForwardClient = BackForwardList::create(self);
+
</ins><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> pageConfiguration.paymentCoordinatorClient = new WebPaymentCoordinatorClient();
</span><span class="cx"> #endif
</span><span class="lines">@@ -1281,6 +1283,7 @@
</span><span class="cx"> pageConfiguration.paymentCoordinatorClient = new WebPaymentCoordinatorClient();
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ pageConfiguration.backForwardClient = BackForwardList::create(self);
</ins><span class="cx"> pageConfiguration.inspectorClient = new WebInspectorClient(self);
</span><span class="cx"> pageConfiguration.loaderClientForMainFrame = new WebFrameLoaderClient;
</span><span class="cx"> pageConfiguration.progressTrackerClient = new WebProgressTrackerClient(self);
</span></span></pre>
</div>
</div>
</body>
</html>