<!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>[207308] trunk/Source/WebKit</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/207308">207308</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2016-10-13 14:36:02 -0700 (Thu, 13 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Copy BackForwardList from WebCore to WebKit/win
https://bugs.webkit.org/show_bug.cgi?id=163360
Reviewed by Alex Christensen.
Source/WebKit:
This is the first step towards getting rid of BackForwardList in WebCore.
* PlatformWin.cmake:
Add new files.
Source/WebKit/win:
Use our local BackForwardList class instead of WebCore::BackForwardList.
* BackForwardList.cpp: Added.
* BackForwardList.h: Added.
* WebBackForwardList.h:
* WebView.cpp:
(WebView::initWithFrame):
(WebView::backForwardList):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitPlatformWincmake">trunk/Source/WebKit/PlatformWin.cmake</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebBackForwardListcpp">trunk/Source/WebKit/win/WebBackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebBackForwardListh">trunk/Source/WebKit/win/WebBackForwardList.h</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitwinBackForwardListcpp">trunk/Source/WebKit/win/BackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebKitwinBackForwardListh">trunk/Source/WebKit/win/BackForwardList.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (207307 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2016-10-13 21:08:02 UTC (rev 207307)
+++ trunk/Source/WebKit/ChangeLog        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-12 Anders Carlsson <andersca@apple.com>
+
+ Copy BackForwardList from WebCore to WebKit/win
+ https://bugs.webkit.org/show_bug.cgi?id=163360
+
+ Reviewed by Alex Christensen.
+
+ This is the first step towards getting rid of BackForwardList in WebCore.
+
+ * PlatformWin.cmake:
+ Add new files.
+
</ins><span class="cx"> 2016-10-11 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Remove dead networking code
</span></span></pre></div>
<a id="trunkSourceWebKitPlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/PlatformWin.cmake (207307 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/PlatformWin.cmake        2016-10-13 21:08:02 UTC (rev 207307)
+++ trunk/Source/WebKit/PlatformWin.cmake        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -144,6 +144,7 @@
</span><span class="cx"> win/AccessibleDocument.cpp
</span><span class="cx"> win/AccessibleImage.cpp
</span><span class="cx"> win/AccessibleTextImpl.cpp
</span><ins>+ win/BackForwardList.cpp
</ins><span class="cx"> win/CFDictionaryPropertyBag.cpp
</span><span class="cx"> win/DOMCSSClasses.cpp
</span><span class="cx"> win/DOMCoreClasses.cpp
</span></span></pre></div>
<a id="trunkSourceWebKitwinBackForwardListcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/win/BackForwardList.cpp (0 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/BackForwardList.cpp         (rev 0)
+++ trunk/Source/WebKit/win/BackForwardList.cpp        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -0,0 +1,267 @@
</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 "WebKitDLL.h"
+#include "BackForwardList.h"
+
+#include <WebCore/Frame.h>
+#include <WebCore/FrameLoader.h>
+#include <WebCore/FrameLoaderClient.h>
+#include <WebCore/HistoryItem.h>
+#include <WebCore/Logging.h>
+#include <WebCore/Page.h>
+#include <WebCore/PageCache.h>
+#include <WebCore/SerializedScriptValue.h>
+
+static const unsigned DefaultCapacity = 100;
+static const unsigned NoCurrentItemIndex = UINT_MAX;
+
+using namespace WebCore;
+
+BackForwardList::BackForwardList()
+ : 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;
+}
+
+void BackForwardList::close()
+{
+ for (auto& item : m_entries)
+ PageCache::singleton().remove(item);
+ m_entries.clear();
+ m_entryHash.clear();
+ 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="trunkSourceWebKitwinBackForwardListh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/win/BackForwardList.h (0 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/BackForwardList.h         (rev 0)
+++ trunk/Source/WebKit/win/BackForwardList.h        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -0,0 +1,78 @@
</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>
+
+typedef Vector<Ref<WebCore::HistoryItem>> HistoryItemVector;
+typedef HashSet<RefPtr<WebCore::HistoryItem>> HistoryItemHashSet;
+
+class BackForwardList : public WebCore::BackForwardClient {
+public:
+ static Ref<BackForwardList> create() { return adoptRef(*new BackForwardList()); }
+ virtual ~BackForwardList();
+
+ void addItem(Ref<WebCore::HistoryItem>&&) override;
+ void goBack();
+ void goForward();
+ void goToItem(WebCore::HistoryItem*) override;
+
+ WebCore::HistoryItem* backItem();
+ WebCore::HistoryItem* currentItem();
+ WebCore::HistoryItem* forwardItem();
+ WebCore::HistoryItem* itemAtIndex(int) override;
+
+ void backListWithLimit(int, HistoryItemVector&);
+ void forwardListWithLimit(int, HistoryItemVector&);
+
+ int capacity();
+ void setCapacity(int);
+ bool enabled();
+ void setEnabled(bool);
+ int backListCount() override;
+ int forwardListCount() override;
+ bool containsItem(WebCore::HistoryItem*);
+
+ void close() override;
+ bool closed();
+
+ void removeItem(WebCore::HistoryItem*);
+ HistoryItemVector& entries();
+
+private:
+ explicit BackForwardList();
+
+ HistoryItemVector m_entries;
+ HistoryItemHashSet m_entryHash;
+ unsigned m_current;
+ unsigned m_capacity;
+ bool m_closed;
+ bool m_enabled;
+};
</ins></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (207307 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-10-13 21:08:02 UTC (rev 207307)
+++ trunk/Source/WebKit/win/ChangeLog        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-10-12 Anders Carlsson <andersca@apple.com>
+
+ Copy BackForwardList from WebCore to WebKit/win
+ https://bugs.webkit.org/show_bug.cgi?id=163360
+
+ Reviewed by Alex Christensen.
+
+ Use our local BackForwardList class instead of WebCore::BackForwardList.
+
+ * BackForwardList.cpp: Added.
+ * BackForwardList.h: Added.
+ * WebBackForwardList.h:
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::backForwardList):
+
</ins><span class="cx"> 2016-10-13 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Get rid of the HistoryItemVector typedef
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebBackForwardList.cpp (207307 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebBackForwardList.cpp        2016-10-13 21:08:02 UTC (rev 207307)
+++ trunk/Source/WebKit/win/WebBackForwardList.cpp        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -26,11 +26,11 @@
</span><span class="cx"> #include "WebKitDLL.h"
</span><span class="cx"> #include "WebBackForwardList.h"
</span><span class="cx">
</span><ins>+#include "BackForwardList.h"
</ins><span class="cx"> #include "WebFrame.h"
</span><span class="cx"> #include "WebKit.h"
</span><span class="cx"> #include "WebPreferences.h"
</span><span class="cx">
</span><del>-#include <WebCore/BackForwardList.h>
</del><span class="cx"> #include <WebCore/COMPtr.h>
</span><span class="cx"> #include <WebCore/HistoryItem.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebBackForwardListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebBackForwardList.h (207307 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebBackForwardList.h        2016-10-13 21:08:02 UTC (rev 207307)
+++ trunk/Source/WebKit/win/WebBackForwardList.h        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef WebBackForwardList_H
-#define WebBackForwardList_H
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "WebKit.h"
</span><span class="cx">
</span><span class="lines">@@ -33,16 +32,14 @@
</span><span class="cx"> #include <WTF/PassRefPtr.h>
</span><span class="cx"> #include <WTF/RefPtr.h>
</span><span class="cx">
</span><del>-namespace WebCore {
- class BackForwardList;
-}
</del><ins>+class BackForwardList;
</ins><span class="cx">
</span><span class="cx"> class WebBackForwardList : public IWebBackForwardList, IWebBackForwardListPrivate
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>- static WebBackForwardList* createInstance(PassRefPtr<WebCore::BackForwardList>);
</del><ins>+ static WebBackForwardList* createInstance(PassRefPtr<BackForwardList>);
</ins><span class="cx"> protected:
</span><del>- WebBackForwardList(PassRefPtr<WebCore::BackForwardList>);
</del><ins>+ WebBackForwardList(PassRefPtr<BackForwardList>);
</ins><span class="cx"> ~WebBackForwardList();
</span><span class="cx">
</span><span class="cx"> public:
</span><span class="lines">@@ -73,7 +70,5 @@
</span><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> ULONG m_refCount { 0 };
</span><del>- RefPtr<WebCore::BackForwardList> m_backForwardList;
</del><ins>+ RefPtr<BackForwardList> m_backForwardList;
</ins><span class="cx"> };
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (207307 => 207308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2016-10-13 21:08:02 UTC (rev 207307)
+++ trunk/Source/WebKit/win/WebView.cpp        2016-10-13 21:36:02 UTC (rev 207308)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #include "WebView.h"
</span><span class="cx">
</span><del>-#include "BackForwardController.h"
</del><ins>+#include "BackForwardList.h"
</ins><span class="cx"> #include "COMVariantSetter.h"
</span><span class="cx"> #include "DOMCoreClasses.h"
</span><span class="cx"> #include "FullscreenVideoController.h"
</span><span class="lines">@@ -84,7 +84,6 @@
</span><span class="cx"> #include <WebCore/ApplicationCacheStorage.h>
</span><span class="cx"> #include <WebCore/BString.h>
</span><span class="cx"> #include <WebCore/BackForwardController.h>
</span><del>-#include <WebCore/BackForwardList.h>
</del><span class="cx"> #include <WebCore/BitmapInfo.h>
</span><span class="cx"> #include <WebCore/Chrome.h>
</span><span class="cx"> #include <WebCore/ContextMenu.h>
</span><span class="lines">@@ -3099,6 +3098,7 @@
</span><span class="cx"> m_inspectorClient = new WebInspectorClient(this);
</span><span class="cx">
</span><span class="cx"> PageConfiguration configuration(makeUniqueRef<WebEditorClient>(this), SocketProvider::create());
</span><ins>+ configuration.backForwardClient = BackForwardList::create();
</ins><span class="cx"> configuration.chromeClient = new WebChromeClient(this);
</span><span class="cx"> configuration.contextMenuClient = new WebContextMenuClient(this);
</span><span class="cx"> configuration.dragClient = new WebDragClient(this);
</span><span class="lines">@@ -3430,7 +3430,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<BackForwardList*>(m_page->backForward().client()));
</ins><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>