[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

darin at apple.com darin at apple.com
Wed Dec 22 15:18:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e10e1282335794cfaeae85e115c402890baad42a
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 30 00:44:33 2010 +0000

    More back/forward refactoring
    
    Reviewed by Sam Weinig.
    
    WebCore:
    
    * WebCore.exp.in: Updated.
    
    * GNUmakefile.am: Removed BackForwardControllerClient.h.
    * WebCore.gypi: Ditto.
    * WebCore.pro: Ditto.
    * WebCore.vcproj/WebCore.vcproj: Ditto.
    * WebCore.xcodeproj/project.pbxproj: Ditto.
    
    * history/BackForwardControllerClient.h: Removed.
    
    * history/BackForwardController.cpp:
    (WebCore::BackForwardController::BackForwardController):
    Set up just m_client.
    (WebCore::BackForwardController::~BackForwardController):
    Removed call to backForwardControllerDestroyed.
    (WebCore::BackForwardController::canGoBackOrForward): Added.
    (WebCore::BackForwardController::goBackOrForward): Added.
    (WebCore::BackForwardController::goBack): Added.
    (WebCore::BackForwardController::goForward): Added.
    (WebCore::BackForwardController::addItem): Added.
    (WebCore::BackForwardController::setCurrentItem): Added.
    (WebCore::BackForwardController::count): Added.
    (WebCore::BackForwardController::backCount): Added.
    (WebCore::BackForwardController::forwardCount): Added.
    (WebCore::BackForwardController::itemAtIndex): Added.
    (WebCore::BackForwardController::isActive): Added.
    (WebCore::BackForwardController::close): Added.
    
    * history/BackForwardController.h: Added functions from Page
    and BackForwardList that should be called here instead.
    Note that BackForwardList is to be renamed BackForwardClient soon.
    
    * history/BackForwardList.h: Removed many now-unneeded
    virtual functions.
    
    * history/BackForwardListImpl.h: Moved BackForwardListClient
    in here.
    
    * history/PageCache.cpp:
    (WebCore::logCanCachePageDecision): Use backForward().
    (WebCore::PageCache::canCache): Ditto.
    
    * loader/FrameLoader.cpp:
    (WebCore::FrameLoader::transitionToCommitted): Removed unneeded
    null check of backFowardList, which is never null.
    (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Use backForward.
    (WebCore::FrameLoader::didFirstLayout): Ditto.
    (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
    (WebCore::FrameLoader::checkDidPerformFirstNavigation): Ditto.
    * loader/HistoryController.cpp:
    (WebCore::HistoryController::goToItem): Ditto.
    (WebCore::HistoryController::updateForStandardLoad): Ditto.
    (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList): Ditto.
    (WebCore::HistoryController::updateBackForwardListClippedAtTarget): Ditto.
    (WebCore::HistoryController::pushState): Ditto.
    * loader/NavigationScheduler.cpp:
    (WebCore::ScheduledHistoryNavigation::fire): Ditto.
    (WebCore::NavigationScheduler::scheduleHistoryNavigation): Ditto.
    * page/ContextMenuController.cpp:
    (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
    * page/DOMWindow.cpp:
    (WebCore::DOMWindow::close): Ditto.
    * page/History.cpp:
    (WebCore::History::length): Ditto.
    
    * page/Page.cpp:
    (WebCore::Page::Page): Use more adoptPtr. Use backForwardClient instead of
    backForwardControllerClient.
    (WebCore::Page::~Page): Use backForward.
    (WebCore::Page::backForwardList): Ditto.
    (WebCore::Page::goBack): Ditto.
    (WebCore::Page::goForward): Ditto.
    (WebCore::Page::canGoBackOrForward): Ditto.
    (WebCore::Page::goBackOrForward): Ditto.
    (WebCore::Page::getHistoryLength): Ditto.
    (WebCore::Page::PageClients::PageClients): Made non-inline.
    (WebCore::Page::PageClients::~PageClients): Ditto.
    
    * page/Page.h: Made PageClients constructor and destructor non-inline.
    Added backForward function. Marked old functions as deprecated.
    
    * page/Settings.cpp:
    (WebCore::Settings::setUsesPageCache): Use backForward.
    * platform/ContextMenu.cpp:
    (WebCore::ContextMenu::populate): Ditto.
    (WebCore::ContextMenu::checkOrEnableIfNeeded): Ditto.
    * wml/WMLDoElement.cpp:
    (WebCore::WMLDoElement::defaultEventHandler): Ditto.
    * wml/WMLDocument.cpp:
    (WebCore::WMLDocument::finishedParsing): Ditto.
    * wml/WMLPageState.cpp:
    (WebCore::WMLPageState::reset): Ditto.
    (WebCore::tryAccessHistoryURLs): Ditto.
    * wml/WMLPrevElement.cpp:
    (WebCore::WMLPrevElement::executeTask): Ditto.
    
    WebKit2:
    
    * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
    * WebKit2.xcodeproj/project.pbxproj: Ditto.
    
    * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
    * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.
    
    * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
    (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
    (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
    (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
    (WebKit::InjectedBundleBackForwardList::clear): Ditto.
    
    * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.
    
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::WebPage): Set up backForwardClient.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b6fba8c..4c5fe62 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,105 @@
+2010-10-29  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        More back/forward refactoring
+
+        * WebCore.exp.in: Updated.
+
+        * GNUmakefile.am: Removed BackForwardControllerClient.h.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+
+        * history/BackForwardControllerClient.h: Removed.
+
+        * history/BackForwardController.cpp:
+        (WebCore::BackForwardController::BackForwardController):
+        Set up just m_client.
+        (WebCore::BackForwardController::~BackForwardController):
+        Removed call to backForwardControllerDestroyed.
+        (WebCore::BackForwardController::canGoBackOrForward): Added.
+        (WebCore::BackForwardController::goBackOrForward): Added.
+        (WebCore::BackForwardController::goBack): Added.
+        (WebCore::BackForwardController::goForward): Added.
+        (WebCore::BackForwardController::addItem): Added.
+        (WebCore::BackForwardController::setCurrentItem): Added.
+        (WebCore::BackForwardController::count): Added.
+        (WebCore::BackForwardController::backCount): Added.
+        (WebCore::BackForwardController::forwardCount): Added.
+        (WebCore::BackForwardController::itemAtIndex): Added.
+        (WebCore::BackForwardController::isActive): Added.
+        (WebCore::BackForwardController::close): Added.
+
+        * history/BackForwardController.h: Added functions from Page
+        and BackForwardList that should be called here instead.
+        Note that BackForwardList is to be renamed BackForwardClient soon.
+
+        * history/BackForwardList.h: Removed many now-unneeded
+        virtual functions.
+
+        * history/BackForwardListImpl.h: Moved BackForwardListClient
+        in here.
+
+        * history/PageCache.cpp:
+        (WebCore::logCanCachePageDecision): Use backForward().
+        (WebCore::PageCache::canCache): Ditto.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::transitionToCommitted): Removed unneeded
+        null check of backFowardList, which is never null.
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Use backForward.
+        (WebCore::FrameLoader::didFirstLayout): Ditto.
+        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
+        (WebCore::FrameLoader::checkDidPerformFirstNavigation): Ditto.
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::goToItem): Ditto.
+        (WebCore::HistoryController::updateForStandardLoad): Ditto.
+        (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList): Ditto.
+        (WebCore::HistoryController::updateBackForwardListClippedAtTarget): Ditto.
+        (WebCore::HistoryController::pushState): Ditto.
+        * loader/NavigationScheduler.cpp:
+        (WebCore::ScheduledHistoryNavigation::fire): Ditto.
+        (WebCore::NavigationScheduler::scheduleHistoryNavigation): Ditto.
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::close): Ditto.
+        * page/History.cpp:
+        (WebCore::History::length): Ditto.
+
+        * page/Page.cpp:
+        (WebCore::Page::Page): Use more adoptPtr. Use backForwardClient instead of
+        backForwardControllerClient.
+        (WebCore::Page::~Page): Use backForward.
+        (WebCore::Page::backForwardList): Ditto.
+        (WebCore::Page::goBack): Ditto.
+        (WebCore::Page::goForward): Ditto.
+        (WebCore::Page::canGoBackOrForward): Ditto.
+        (WebCore::Page::goBackOrForward): Ditto.
+        (WebCore::Page::getHistoryLength): Ditto.
+        (WebCore::Page::PageClients::PageClients): Made non-inline.
+        (WebCore::Page::PageClients::~PageClients): Ditto.
+
+        * page/Page.h: Made PageClients constructor and destructor non-inline.
+        Added backForward function. Marked old functions as deprecated.
+
+        * page/Settings.cpp:
+        (WebCore::Settings::setUsesPageCache): Use backForward.
+        * platform/ContextMenu.cpp:
+        (WebCore::ContextMenu::populate): Ditto.
+        (WebCore::ContextMenu::checkOrEnableIfNeeded): Ditto.
+        * wml/WMLDoElement.cpp:
+        (WebCore::WMLDoElement::defaultEventHandler): Ditto.
+        * wml/WMLDocument.cpp:
+        (WebCore::WMLDocument::finishedParsing): Ditto.
+        * wml/WMLPageState.cpp:
+        (WebCore::WMLPageState::reset): Ditto.
+        (WebCore::tryAccessHistoryURLs): Ditto.
+        * wml/WMLPrevElement.cpp:
+        (WebCore::WMLPrevElement::executeTask): Ditto.
+
 2010-10-29  David Hyatt  <hyatt at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index cef9493..bba86af 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1444,7 +1444,6 @@ webcore_sources += \
 	WebCore/fileapi/Metadata.h \
 	WebCore/fileapi/ThreadableBlobRegistry.cpp \
 	WebCore/fileapi/ThreadableBlobRegistry.h \
-	WebCore/history/BackForwardControllerClient.h \
 	WebCore/history/BackForwardController.cpp \
 	WebCore/history/BackForwardController.h \
 	WebCore/history/BackForwardList.h \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 66dc594..a4d5dbc 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -435,9 +435,21 @@ __ZN7WebCore19AnimationController16resumeAnimationsEPNS_8DocumentE
 __ZN7WebCore19AnimationController17suspendAnimationsEPNS_8DocumentE
 __ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF6StringEd
 __ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd
+__ZN7WebCore19BackForwardListImpl10removeItemEPNS_11HistoryItemE
+__ZN7WebCore19BackForwardListImpl10setEnabledEb
 __ZN7WebCore19BackForwardListImpl11currentItemEv
 __ZN7WebCore19BackForwardListImpl11forwardItemEv
+__ZN7WebCore19BackForwardListImpl11setCapacityEi
+__ZN7WebCore19BackForwardListImpl12containsItemEPNS_11HistoryItemE
+__ZN7WebCore19BackForwardListImpl17backListWithLimitEiRN3WTF6VectorINS1_6RefPtrINS_11HistoryItemEEELm0EEE
+__ZN7WebCore19BackForwardListImpl20forwardListWithLimitEiRN3WTF6VectorINS1_6RefPtrINS_11HistoryItemEEELm0EEE
+__ZN7WebCore19BackForwardListImpl6closedEv
+__ZN7WebCore19BackForwardListImpl6goBackEv
+__ZN7WebCore19BackForwardListImpl7enabledEv
+__ZN7WebCore19BackForwardListImpl7entriesEv
 __ZN7WebCore19BackForwardListImpl8backItemEv
+__ZN7WebCore19BackForwardListImpl8capacityEv
+__ZN7WebCore19BackForwardListImpl9goForwardEv
 __ZN7WebCore19BackForwardListImplC1EPNS_4PageE
 __ZN7WebCore19CSSStyleDeclaration11setPropertyERKN3WTF6StringES4_Ri
 __ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE
@@ -463,6 +475,7 @@ __ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx
 __ZN7WebCore20ResourceResponseBaseC2Ev
 __ZN7WebCore20SpaceSplitStringData12createVectorEv
 __ZN7WebCore20protocolIsJavaScriptERKN3WTF6StringE
+__ZN7WebCore21BackForwardController11itemAtIndexEi
 __ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS0_4TypeEb
 __ZN7WebCore21PlatformKeyboardEventC1EP7NSEvent
 __ZN7WebCore21SVGDocumentExtensions21sampleAnimationAtTimeERKN3WTF6StringEPNS_14SVGSMILElementEd
@@ -581,6 +594,8 @@ __ZN7WebCore4Node17stopIgnoringLeaksEv
 __ZN7WebCore4Node18startIgnoringLeaksEv
 __ZN7WebCore4Node19setNeedsStyleRecalcENS_15StyleChangeTypeE
 __ZN7WebCore4Page10findStringERKN3WTF6StringENS1_19TextCaseSensitivityENS_13FindDirectionEb
+__ZN7WebCore4Page11PageClientsC1Ev
+__ZN7WebCore4Page11PageClientsD1Ev
 __ZN7WebCore4Page12setGroupNameERKN3WTF6StringE
 __ZN7WebCore4Page13didStopPluginEPNS_14HaltablePluginE
 __ZN7WebCore4Page14didStartPluginEPNS_14HaltablePluginE
@@ -1023,6 +1038,8 @@ __ZNK7WebCore20ResourceResponseBase21expectedContentLengthEv
 __ZNK7WebCore20ResourceResponseBase3urlEv
 __ZNK7WebCore20ResourceResponseBase6isHTTPEv
 __ZNK7WebCore20ResourceResponseBase8mimeTypeEv
+__ZNK7WebCore21BackForwardController12forwardCountEv
+__ZNK7WebCore21BackForwardController9backCountEv
 __ZNK7WebCore21UserContentURLPattern7matchesERKNS_4KURLE
 __ZNK7WebCore23FrameLoaderStateMachine15firstLayoutDoneEv
 __ZNK7WebCore23FrameLoaderStateMachine23committingFirstRealLoadEv
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index ad01ddb..3f9bd0d 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1535,7 +1535,6 @@
             'history/mac/HistoryItemMac.mm',
             'history/BackForwardController.cpp',
             'history/BackForwardController.h',
-            'history/BackForwardControllerClient.h',
             'history/BackForwardList.h',
             'history/BackForwardListImpl.cpp',
             'history/BackForwardListImpl.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index cacac5c..6e4e131 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1747,7 +1747,6 @@ HEADERS += \
     fileapi/FileThread.h \
     fileapi/FileThreadTask.h \
     history/BackForwardController.h \
-    history/BackForwardControllerClient.h \
     history/BackForwardListImpl.h \
     history/BackForwardList.h \
     history/CachedFrame.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index ee0be2e..24a2d91 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -62992,10 +62992,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\history\BackForwardControllerClient.h"
-				>
-			</File>
-			<File
 				RelativePath="..\history\BackForwardList.h"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 02cb0d6..009f50b 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -5008,7 +5008,6 @@
 		BCA85A100C3AEAF4006F8308 /* DOMSVGNumberInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA85A0F0C3AEAF4006F8308 /* DOMSVGNumberInternal.h */; };
 		BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C81C11E3D36900812FB7 /* BackForwardController.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */; };
-		BCA8C83111E3D53200812FB7 /* BackForwardControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C83011E3D53200812FB7 /* BackForwardControllerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCA8CA5F11E4E6D100812FB7 /* BackForwardListImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8CA5D11E4E6D100812FB7 /* BackForwardListImpl.cpp */; };
 		BCA8CA6011E4E6D100812FB7 /* BackForwardListImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8CA5E11E4E6D100812FB7 /* BackForwardListImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCA979171215D055005C485C /* ImageBufferData.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA979161215D055005C485C /* ImageBufferData.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -11021,7 +11020,6 @@
 		BCA85A0F0C3AEAF4006F8308 /* DOMSVGNumberInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGNumberInternal.h; sourceTree = "<group>"; };
 		BCA8C81C11E3D36900812FB7 /* BackForwardController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardController.h; sourceTree = "<group>"; };
 		BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardController.cpp; sourceTree = "<group>"; };
-		BCA8C83011E3D53200812FB7 /* BackForwardControllerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardControllerClient.h; sourceTree = "<group>"; };
 		BCA8CA5D11E4E6D100812FB7 /* BackForwardListImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardListImpl.cpp; sourceTree = "<group>"; };
 		BCA8CA5E11E4E6D100812FB7 /* BackForwardListImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardListImpl.h; sourceTree = "<group>"; };
 		BCA979161215D055005C485C /* ImageBufferData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageBufferData.h; sourceTree = "<group>"; };
@@ -12824,7 +12822,6 @@
 				5160F4920B0AA71500C1D2AF /* mac */,
 				BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */,
 				BCA8C81C11E3D36900812FB7 /* BackForwardController.h */,
-				BCA8C83011E3D53200812FB7 /* BackForwardControllerClient.h */,
 				51741D0B0B07259A00ED442C /* BackForwardList.h */,
 				BCA8CA5D11E4E6D100812FB7 /* BackForwardListImpl.cpp */,
 				BCA8CA5E11E4E6D100812FB7 /* BackForwardListImpl.h */,
@@ -18454,7 +18451,6 @@
 				A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */,
 				29A812380FBB9C1D00510293 /* AXObjectCache.h in Headers */,
 				BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
-				BCA8C83111E3D53200812FB7 /* BackForwardControllerClient.h in Headers */,
 				51741D0F0B07259A00ED442C /* BackForwardList.h in Headers */,
 				BCA8CA6011E4E6D100812FB7 /* BackForwardListImpl.h in Headers */,
 				BC124EE80C2641CD009E2349 /* BarInfo.h in Headers */,
diff --git a/WebCore/history/BackForwardController.cpp b/WebCore/history/BackForwardController.cpp
index 9f557ac..d388f19 100644
--- a/WebCore/history/BackForwardController.cpp
+++ b/WebCore/history/BackForwardController.cpp
@@ -26,26 +26,82 @@
 #include "config.h"
 #include "BackForwardController.h"
 
-#include "BackForwardControllerClient.h"
-#include "BackForwardList.h"
 #include "BackForwardListImpl.h"
+#include "HistoryItem.h"
+#include "Page.h"
 
 namespace WebCore {
 
-BackForwardController::BackForwardController(Page* page, BackForwardControllerClient* client)
+BackForwardController::BackForwardController(Page* page, PassRefPtr<BackForwardList> client)
     : m_page(page)
     , m_client(client)
 {
     if (!m_client)
-        m_list = BackForwardListImpl::create(page);
-    else
-        m_list = m_client->createBackForwardList(page);
+        m_client = BackForwardListImpl::create(page);
 }
 
 BackForwardController::~BackForwardController()
 {
-    if (m_client)
-        m_client->backForwardControllerDestroyed();
+}
+
+bool BackForwardController::canGoBackOrForward(int distance) const
+{
+    return m_page->canGoBackOrForward(distance);
+}
+
+void BackForwardController::goBackOrForward(int distance)
+{
+    m_page->goBackOrForward(distance);
+}
+
+bool BackForwardController::goBack()
+{
+    return m_page->goBack();
+}
+
+bool BackForwardController::goForward()
+{
+    return m_page->goForward();
+}
+
+void BackForwardController::addItem(PassRefPtr<HistoryItem> item)
+{
+    m_client->addItem(item);
+}
+
+void BackForwardController::setCurrentItem(HistoryItem* item)
+{
+    m_client->goToItem(item);
+}
+
+int BackForwardController::count() const
+{
+    return m_page->getHistoryLength();
+}
+
+int BackForwardController::backCount() const
+{
+    return m_client->backListCount();
+}
+
+int BackForwardController::forwardCount() const
+{
+    return m_client->forwardListCount();
+}
+
+HistoryItem* BackForwardController::itemAtIndex(int i)
+{
+    return m_client->itemAtIndex(i);
+}
+
+bool BackForwardController::isActive()
+{
+    return m_client->isActive();
+}
+
+void BackForwardController::close()
+{
+    m_client->close();
 }
 
 } // namespace WebCore
diff --git a/WebCore/history/BackForwardController.h b/WebCore/history/BackForwardController.h
index 02c13a1..e89e32b 100644
--- a/WebCore/history/BackForwardController.h
+++ b/WebCore/history/BackForwardController.h
@@ -26,27 +26,49 @@
 #ifndef BackForwardController_h
 #define BackForwardController_h
 
-#include "BackForwardList.h"
 #include <wtf/Noncopyable.h>
+#include <wtf/Forward.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
 
+class BackForwardList;
+class HistoryItem;
 class Page;
-class BackForwardControllerClient;
 
 class BackForwardController : public Noncopyable {
 public:
-    BackForwardController(Page*, BackForwardControllerClient*);
+    BackForwardController(Page*, PassRefPtr<BackForwardList>);
     ~BackForwardController();
 
-    BackForwardControllerClient* client() const { return m_client; }
-    BackForwardList* list() const { return m_list.get(); }
+    BackForwardList* client() const { return m_client.get(); }
+
+    bool canGoBackOrForward(int distance) const;
+    void goBackOrForward(int distance);
+
+    bool goBack();
+    bool goForward();
+
+    void addItem(PassRefPtr<HistoryItem>);
+    void setCurrentItem(HistoryItem*);
+        
+    int count() const;
+    int backCount() const;
+    int forwardCount() const;
+
+    HistoryItem* itemAtIndex(int);
+
+    bool isActive();
+
+    void close();
+
+    HistoryItem* backItem() { return itemAtIndex(-1); }
+    HistoryItem* currentItem() { return itemAtIndex(0); }
+    HistoryItem* forwardItem() { return itemAtIndex(1); }
 
 private:
     Page* m_page;
-    BackForwardControllerClient* m_client;
-    RefPtr<BackForwardList> m_list;
+    RefPtr<BackForwardList> m_client;
 };
 
 } // namespace WebCore
diff --git a/WebCore/history/BackForwardControllerClient.h b/WebCore/history/BackForwardControllerClient.h
deleted file mode 100644
index 289ad12..0000000
--- a/WebCore/history/BackForwardControllerClient.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#ifndef BackForwardControllerClient_h
-#define BackForwardControllerClient_h
-
-#include "BackForwardList.h"
-#include <wtf/PassRefPtr.h>
-
-namespace WebCore {
-
-class Page;
-
-class BackForwardControllerClient {
-public:
-    virtual void backForwardControllerDestroyed() = 0;
-
-    virtual PassRefPtr<BackForwardList> createBackForwardList(Page*) = 0;
-
-protected:
-    virtual ~BackForwardControllerClient() { }
-};
-
-} // namespace WebCore
-
-#endif // BackForwardControllerClient_h
diff --git a/WebCore/history/BackForwardList.h b/WebCore/history/BackForwardList.h
index b622a9d..212eadd 100644
--- a/WebCore/history/BackForwardList.h
+++ b/WebCore/history/BackForwardList.h
@@ -28,39 +28,13 @@
 #ifndef BackForwardList_h
 #define BackForwardList_h
 
+#include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/Vector.h>
 
 namespace WebCore {
 
 class HistoryItem;
 
-// FIXME: Remove this and rely on the typedef in BackForwardListImpl
-// instead, after removing the virtual functions at the bottom
-// of this class.
-typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
-
-// FIXME: Move this class out of this file and into BackForwardListImpl.
-// FIXME: Consider replacing this BackForwardListClient concept with a
-// function that creates a BackForwardList object. The functions in
-// BackForwardList are now almost identical to this, and there is no
-// need for the extra level of indirection.
-#if PLATFORM(CHROMIUM)
-// In the Chromium port, the back/forward list is managed externally.
-// See BackForwardListChromium.cpp
-class BackForwardListClient {
-public:
-    virtual ~BackForwardListClient() {}
-    virtual void addItem(PassRefPtr<HistoryItem>) = 0;
-    virtual void goToItem(HistoryItem*) = 0;
-    virtual HistoryItem* itemAtIndex(int) = 0;
-    virtual int backListCount() = 0;
-    virtual int forwardListCount() = 0;
-    virtual void close() = 0;
-};
-#endif
-
 // FIXME: Rename this class to BackForwardClient, and rename the
 // getter in Page accordingly.
 class BackForwardList : public RefCounted<BackForwardList> {
@@ -69,13 +43,6 @@ public:
     {
     }
 
-    // FIXME: Move this function to BackForwardListImpl, or eliminate
-    // it (see comment at definition of BackForwardListClient class).
-#if PLATFORM(CHROMIUM)
-    // Must be called before any other methods. 
-    virtual void setClient(BackForwardListClient*) = 0;
-#endif
-
     virtual void addItem(PassRefPtr<HistoryItem>) = 0;
 
     virtual void goToItem(HistoryItem*) = 0;
@@ -88,42 +55,21 @@ public:
 
     virtual void close() = 0;
 
+#if ENABLE(WML)
     // FIXME: Rename this to just "clear" and change it so it's not
     // WML-specific. This is the same operation as clearBackForwardList
     // in the layout test controller; it would be reasonable to have it
     // here even though HTML DOM interfaces don't require it.
-#if ENABLE(WML)
     virtual void clearWMLPageHistory()  = 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); }
-
-    // FIXME: Remove these functions once all call sites are calling them
-    // directly on BackForwardListImpl instead of on BackForwardList.
-    // There is no need for any of these to be virtual functions and no
-    // need to implement them in classes other than BackForwardListImpl.
-    // Also remove the HistoryItemVector typedef in this file once this is done.
-    virtual void goBack() { }
-    virtual void goForward() { }
-    virtual void backListWithLimit(int, HistoryItemVector&) { }
-    virtual void forwardListWithLimit(int, HistoryItemVector&) { }
-    virtual int capacity() { return 0; }
-    virtual void setCapacity(int) { }
-    virtual bool enabled() { return false; }
-    virtual void setEnabled(bool) { }
-    virtual bool containsItem(HistoryItem*) { return false; }
-    virtual bool closed() { return false; }
-    virtual void removeItem(HistoryItem*) { }
-    virtual HistoryItemVector& entries() { HistoryItemVector* bogus = 0; return *bogus; }
-
-protected:
-    BackForwardList()
-    {
-    }
 };
-    
+
 } // namespace WebCore
 
 #endif // BackForwardList_h
diff --git a/WebCore/history/BackForwardListImpl.h b/WebCore/history/BackForwardListImpl.h
index 2f08cfe..30043fa 100644
--- a/WebCore/history/BackForwardListImpl.h
+++ b/WebCore/history/BackForwardListImpl.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ * 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.
  *
@@ -30,6 +30,7 @@
 
 #include "BackForwardList.h"
 #include <wtf/HashSet.h>
+#include <wtf/Vector.h>
 
 namespace WebCore {
 
@@ -38,6 +39,25 @@ class Page;
 typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
 typedef HashSet<RefPtr<HistoryItem> > HistoryItemHashSet;
 
+// FIXME: Change Chromium to use its own BackForwardList implementation
+// and not use BackForwardListImpl at all, then remove this
+// BackForwardListClient feature entirely and just don't use this
+// class on Chromium.
+#if PLATFORM(CHROMIUM)
+// In the Chromium port, the back/forward list is managed externally.
+// See BackForwardListChromium.cpp
+class BackForwardListClient {
+public:
+    virtual ~BackForwardListClient() { }
+    virtual void addItem(PassRefPtr<HistoryItem>) = 0;
+    virtual void goToItem(HistoryItem*) = 0;
+    virtual HistoryItem* itemAtIndex(int) = 0;
+    virtual int backListCount() = 0;
+    virtual int forwardListCount() = 0;
+    virtual void close() = 0;
+};
+#endif
+
 // FIXME: After renaming BackForwardList to BackForwardClient,
 // rename this to BackForwardList.
 class BackForwardListImpl : public BackForwardList {
@@ -47,7 +67,7 @@ public:
 
 #if PLATFORM(CHROMIUM)
     // Must be called before any other methods. 
-    virtual void setClient(BackForwardListClient* client) { m_client = client; }
+    void setClient(BackForwardListClient* client) { m_client = client; }
 #endif
     
     Page* page() { return m_page; }
diff --git a/WebCore/history/PageCache.cpp b/WebCore/history/PageCache.cpp
index 30c3b42..41ddb42 100644
--- a/WebCore/history/PageCache.cpp
+++ b/WebCore/history/PageCache.cpp
@@ -27,7 +27,7 @@
 #include "PageCache.h"
 
 #include "ApplicationCacheHost.h"
-#include "BackForwardList.h"
+#include "BackForwardController.h"
 #include "Cache.h"
 #include "CachedPage.h"
 #include "DOMWindow.h"
@@ -192,7 +192,7 @@ static void logCanCachePageDecision(Page* page)
     bool cannotCache = !logCanCacheFrameDecision(page->mainFrame(), 1);
     
     FrameLoadType loadType = page->mainFrame()->loader()->loadType();
-    if (!page->backForwardList()->isActive()) {
+    if (!page->backForward()->isActive()) {
         PCLOG("   -The back/forward list is disabled or has 0 capacity");
         cannotCache = true;
     }
@@ -303,7 +303,7 @@ bool PageCache::canCache(Page* page)
     FrameLoadType loadType = page->mainFrame()->loader()->loadType();
     
     return canCachePageContainingThisFrame(page->mainFrame())
-        && page->backForwardList()->isActive()
+        && page->backForward()->isActive()
         && page->settings()->usesPageCache()
 #if ENABLE(DEVICE_ORIENTATION)
         && !(page->deviceMotionController() && page->deviceMotionController()->isActive())
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index dfc1ad0..b90b18c 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -36,14 +36,14 @@
 #include "ApplicationCacheHost.h"
 #include "Archive.h"
 #include "ArchiveFactory.h"
-#include "BackForwardList.h"
+#include "BackForwardController.h"
 #include "BeforeUnloadEvent.h"
 #include "Cache.h"
 #include "CachedPage.h"
+#include "CachedResourceLoader.h"
 #include "Chrome.h"
 #include "DOMImplementation.h"
 #include "DOMWindow.h"
-#include "CachedResourceLoader.h"
 #include "Document.h"
 #include "DocumentLoadTiming.h"
 #include "DocumentLoader.h"
@@ -63,9 +63,6 @@
 #include "FrameView.h"
 #include "HTMLAnchorElement.h"
 #include "HTMLFormElement.h"
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-#include "HTMLMediaElement.h"
-#endif
 #include "HTMLNames.h"
 #include "HTMLObjectElement.h"
 #include "HTTPParsers.h"
@@ -102,6 +99,10 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/StringConcatenate.h>
 
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#include "HTMLMediaElement.h"
+#endif
+
 #if ENABLE(SHARED_WORKERS)
 #include "SharedWorkerRepository.h"
 #endif
@@ -1952,30 +1953,28 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
         case FrameLoadTypeBack:
         case FrameLoadTypeBackWMLDeckNotAccessible:
         case FrameLoadTypeIndexedBackForward:
-            if (Page* page = m_frame->page()) {
-                if (page->backForwardList()) {
-                    // If the first load within a frame is a navigation within a back/forward list that was attached
-                    // without any of the items being loaded then we need to update the history in a similar manner as
-                    // for a standard load with the exception of updating the back/forward list (<rdar://problem/8091103>).
-                    if (!m_stateMachine.committedFirstRealDocumentLoad())
-                        history()->updateForStandardLoad(HistoryController::UpdateAllExceptBackForwardList);
-
-                    history()->updateForBackForwardNavigation();
-
-                    // For cached pages, CachedFrame::restore will take care of firing the popstate event with the history item's state object
-                    if (history()->currentItem() && !cachedPage)
-                        m_pendingStateObject = history()->currentItem()->stateObject();
-
-                    // Create a document view for this document, or used the cached view.
-                    if (cachedPage) {
-                        DocumentLoader* cachedDocumentLoader = cachedPage->documentLoader();
-                        ASSERT(cachedDocumentLoader);
-                        cachedDocumentLoader->setFrame(m_frame);
-                        m_client->transitionToCommittedFromCachedFrame(cachedPage->cachedMainFrame());
-
-                    } else
-                        m_client->transitionToCommittedForNewPage();
-                }
+            if (m_frame->page()) {
+                // If the first load within a frame is a navigation within a back/forward list that was attached
+                // without any of the items being loaded then we need to update the history in a similar manner as
+                // for a standard load with the exception of updating the back/forward list (<rdar://problem/8091103>).
+                if (!m_stateMachine.committedFirstRealDocumentLoad())
+                    history()->updateForStandardLoad(HistoryController::UpdateAllExceptBackForwardList);
+
+                history()->updateForBackForwardNavigation();
+
+                // For cached pages, CachedFrame::restore will take care of firing the popstate event with the history item's state object
+                if (history()->currentItem() && !cachedPage)
+                    m_pendingStateObject = history()->currentItem()->stateObject();
+
+                // Create a document view for this document, or used the cached view.
+                if (cachedPage) {
+                    DocumentLoader* cachedDocumentLoader = cachedPage->documentLoader();
+                    ASSERT(cachedDocumentLoader);
+                    cachedDocumentLoader->setFrame(m_frame);
+                    m_client->transitionToCommittedFromCachedFrame(cachedPage->cachedMainFrame());
+
+                } else
+                    m_client->transitionToCommittedForNewPage();
             }
             break;
 
@@ -2381,7 +2380,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             }
             if (shouldReset && item)
                 if (Page* page = m_frame->page()) {
-                    page->backForwardList()->goToItem(item.get());
+                    page->backForward()->setCurrentItem(item.get());
                     Settings* settings = m_frame->settings();
                     page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : item.get());
                 }
@@ -2402,9 +2401,10 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             m_client->forceLayoutForNonHTML();
              
             // If the user had a scroll point, scroll to it, overriding the anchor point if any.
-            if (Page* page = m_frame->page())
-                if ((isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin) && page->backForwardList())
+            if (m_frame->page()) {
+                if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
                     history()->restoreScrollPositionAndViewState();
+            }
 
             if (m_stateMachine.creatingInitialEmptyDocument() || !m_stateMachine.committedFirstRealDocumentLoad())
                 return;
@@ -2466,9 +2466,8 @@ void FrameLoader::continueLoadAfterWillSubmitForm()
 
 void FrameLoader::didFirstLayout()
 {
-    if (Page* page = m_frame->page())
-        if (isBackForwardLoadType(m_loadType) && page->backForwardList())
-            history()->restoreScrollPositionAndViewState();
+    if (m_frame->page() && isBackForwardLoadType(m_loadType))
+        history()->restoreScrollPositionAndViewState();
 
     if (m_stateMachine.committedFirstRealDocumentLoad() && !m_stateMachine.isDisplayingInitialEmptyDocument() && !m_stateMachine.firstLayoutDone())
         m_stateMachine.advanceTo(FrameLoaderStateMachine::FirstLayoutDone);
@@ -2933,7 +2932,7 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
             if (Page* page = m_frame->page()) {
                 Frame* mainFrame = page->mainFrame();
                 if (HistoryItem* resetItem = mainFrame->loader()->history()->currentItem()) {
-                    page->backForwardList()->goToItem(resetItem);
+                    page->backForward()->setCurrentItem(resetItem);
                     Settings* settings = m_frame->settings();
                     page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : resetItem);
                 }
@@ -3114,7 +3113,7 @@ void FrameLoader::checkDidPerformFirstNavigation()
     if (!page)
         return;
 
-    if (!m_didPerformFirstNavigation && page->backForwardList()->currentItem() && !page->backForwardList()->backItem() && !page->backForwardList()->forwardItem()) {
+    if (!m_didPerformFirstNavigation && page->backForward()->currentItem() && !page->backForward()->backItem() && !page->backForward()->forwardItem()) {
         m_didPerformFirstNavigation = true;
         m_client->didPerformFirstNavigation();
     }
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index f06589e..31f4889 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "HistoryController.h"
 
-#include "BackForwardList.h"
+#include "BackForwardController.h"
 #include "CachedPage.h"
 #include "DocumentLoader.h"
 #include "Frame.h"
@@ -230,9 +230,8 @@ void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type)
     // Set the BF cursor before commit, which lets the user quickly click back/forward again.
     // - plus, it only makes sense for the top level of the operation through the frametree,
     // as opposed to happening for some/one of the page commits that might happen soon
-    BackForwardList* bfList = page->backForwardList();
-    HistoryItem* currentItem = bfList->currentItem();    
-    bfList->goToItem(targetItem);
+    HistoryItem* currentItem = page->backForward()->currentItem();    
+    page->backForward()->setCurrentItem(targetItem);
     Settings* settings = m_frame->settings();
     page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : targetItem);
     recursiveGoToItem(targetItem, currentItem, type);
@@ -295,7 +294,7 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
                     frameLoader->client()->updateGlobalHistoryRedirectLinks();
             }
             if (Page* page = m_frame->page())
-                page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForwardList()->currentItem());
+                page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForward()->currentItem());
         }
     } else if (frameLoader->documentLoader()->unreachableURL().isEmpty() && m_currentItem) {
         m_currentItem->setURL(frameLoader->documentLoader()->url());
@@ -333,7 +332,7 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
                         m_frame->loader()->client()->updateGlobalHistoryRedirectLinks();
                 }
                 if (Page* page = m_frame->page())
-                    page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForwardList()->currentItem());
+                    page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForward()->currentItem());
             }
         }
         if (m_currentItem) {
@@ -637,7 +636,7 @@ void HistoryController::updateBackForwardListClippedAtTarget(bool doClip)
 
     RefPtr<HistoryItem> topItem = frameLoader->history()->createItemTree(m_frame, doClip);
     LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", topItem.get(), m_frame->loader()->documentLoader()->url().string().ascii().data());
-    page->backForwardList()->addItem(topItem.release());
+    page->backForward()->addItem(topItem.release());
 }
 
 void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
@@ -657,7 +656,7 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
     m_currentItem->setStateObject(stateObject);
     m_currentItem->setURLString(urlString);
 
-    page->backForwardList()->addItem(topItem.release());
+    page->backForward()->addItem(topItem.release());
 }
 
 void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
diff --git a/WebCore/loader/NavigationScheduler.cpp b/WebCore/loader/NavigationScheduler.cpp
index 98f21fe..66e6bac 100644
--- a/WebCore/loader/NavigationScheduler.cpp
+++ b/WebCore/loader/NavigationScheduler.cpp
@@ -32,7 +32,7 @@
 #include "config.h"
 #include "NavigationScheduler.h"
 
-#include "BackForwardList.h"
+#include "BackForwardController.h"
 #include "DOMWindow.h"
 #include "DocumentLoader.h"
 #include "Event.h"
@@ -177,7 +177,7 @@ public:
         }
         // go(i!=0) from a frame navigates into the history of the frame only,
         // in both IE and NS (but not in Mozilla). We can't easily do that.
-        frame->page()->goBackOrForward(m_historySteps);
+        frame->page()->backForward()->goBackOrForward(m_historySteps);
     }
 
 private:
@@ -352,7 +352,7 @@ void NavigationScheduler::scheduleHistoryNavigation(int steps)
 
     // Invalid history navigations (such as history.forward() during a new load) have the side effect of cancelling any scheduled
     // redirects. We also avoid the possibility of cancelling the current load by avoiding the scheduled redirection altogether.
-    HistoryItem* specifiedEntry = m_frame->page()->backForwardList()->itemAtIndex(steps);
+    HistoryItem* specifiedEntry = m_frame->page()->backForward()->itemAtIndex(steps);
     if (!specifiedEntry) {
         cancel();
         return;
diff --git a/WebCore/page/ContextMenuController.cpp b/WebCore/page/ContextMenuController.cpp
index 08c3d2e..1b026be 100644
--- a/WebCore/page/ContextMenuController.cpp
+++ b/WebCore/page/ContextMenuController.cpp
@@ -222,11 +222,11 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         break;
     case ContextMenuItemTagGoBack:
         if (Page* page = frame->page())
-            page->goBackOrForward(-1);
+            page->backForward()->goBackOrForward(-1);
         break;
     case ContextMenuItemTagGoForward:
         if (Page* page = frame->page())
-            page->goBackOrForward(1);
+            page->backForward()->goBackOrForward(1);
         break;
     case ContextMenuItemTagStop:
         frame->loader()->stop();
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 60d9b53..c88eefd 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -873,7 +873,7 @@ void DOMWindow::close()
     Settings* settings = m_frame->settings();
     bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseWindows();
 
-    if (!(page->openedByDOM() || page->getHistoryLength() <= 1 || allowScriptsToCloseWindows))
+    if (!(page->openedByDOM() || page->backForward()->count() <= 1 || allowScriptsToCloseWindows))
         return;
 
     if (!m_frame->loader()->shouldClose())
diff --git a/WebCore/page/History.cpp b/WebCore/page/History.cpp
index 3d463b6..a826edb 100644
--- a/WebCore/page/History.cpp
+++ b/WebCore/page/History.cpp
@@ -56,7 +56,7 @@ unsigned History::length() const
         return 0;
     if (!m_frame->page())
         return 0;
-    return m_frame->page()->getHistoryLength();
+    return m_frame->page()->backForward()->count();
 }
 
 void History::back()
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index d84d4a6..3b546e9 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -130,20 +130,20 @@ static void networkStateChanged()
 }
 
 Page::Page(const PageClients& pageClients)
-    : m_chrome(new Chrome(this, pageClients.chromeClient))
-    , m_dragCaretController(new SelectionController(0, true))
+    : m_chrome(adoptPtr(new Chrome(this, pageClients.chromeClient)))
+    , m_dragCaretController(adoptPtr(new SelectionController(0, true)))
 #if ENABLE(DRAG_SUPPORT)
-    , m_dragController(new DragController(this, pageClients.dragClient))
+    , m_dragController(adoptPtr(new DragController(this, pageClients.dragClient)))
 #endif
-    , m_focusController(new FocusController(this))
+    , m_focusController(adoptPtr(new FocusController(this)))
 #if ENABLE(CONTEXT_MENUS)
-    , m_contextMenuController(new ContextMenuController(this, pageClients.contextMenuClient))
+    , m_contextMenuController(adoptPtr(new ContextMenuController(this, pageClients.contextMenuClient)))
 #endif
 #if ENABLE(INSPECTOR)
-    , m_inspectorController(new InspectorController(this, pageClients.inspectorClient))
+    , m_inspectorController(adoptPtr(new InspectorController(this, pageClients.inspectorClient)))
 #endif
 #if ENABLE(CLIENT_BASED_GEOLOCATION)
-    , m_geolocationController(new GeolocationController(this, pageClients.geolocationControllerClient))
+    , m_geolocationController(adoptPtr(new GeolocationController(this, pageClients.geolocationControllerClient)))
 #endif
 #if ENABLE(DEVICE_ORIENTATION)
     , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? new DeviceMotionController(pageClients.deviceMotionClient) : 0)
@@ -152,9 +152,9 @@ Page::Page(const PageClients& pageClients)
 #if ENABLE(INPUT_SPEECH)
     , m_speechInputClient(pageClients.speechInputClient)
 #endif
-    , m_settings(new Settings(this))
-    , m_progress(new ProgressTracker)
-    , m_backForwardController(new BackForwardController(this, pageClients.backForwardControllerClient))
+    , m_settings(adoptPtr(new Settings(this)))
+    , m_progress(adoptPtr(new ProgressTracker))
+    , m_backForwardController(adoptPtr(new BackForwardController(this, pageClients.backForwardClient)))
     , m_theme(RenderTheme::themeForPage(this))
     , m_editorClient(pageClients.editorClient)
     , m_frameCount(0)
@@ -215,7 +215,7 @@ Page::~Page()
     m_inspectorController->inspectedPageDestroyed();
 #endif
 
-    backForwardList()->close();
+    backForward()->close();
 
 #ifndef NDEBUG
     pageCounter.decrement();
@@ -284,12 +284,12 @@ void Page::setOpenedByDOM()
 
 BackForwardList* Page::backForwardList() const
 {
-    return m_backForwardController->list();
+    return m_backForwardController->client();
 }
 
 bool Page::goBack()
 {
-    HistoryItem* item = backForwardList()->backItem();
+    HistoryItem* item = backForward()->backItem();
     
     if (item) {
         goToItem(item, FrameLoadTypeBack);
@@ -300,7 +300,7 @@ bool Page::goBack()
 
 bool Page::goForward()
 {
-    HistoryItem* item = backForwardList()->forwardItem();
+    HistoryItem* item = backForward()->forwardItem();
     
     if (item) {
         goToItem(item, FrameLoadTypeForward);
@@ -313,9 +313,9 @@ bool Page::canGoBackOrForward(int distance) const
 {
     if (distance == 0)
         return true;
-    if (distance > 0 && distance <= backForwardList()->forwardListCount())
+    if (distance > 0 && distance <= backForward()->forwardCount())
         return true;
-    if (distance < 0 && -distance <= backForwardList()->backListCount())
+    if (distance < 0 && -distance <= backForward()->backCount())
         return true;
     return false;
 }
@@ -325,22 +325,22 @@ void Page::goBackOrForward(int distance)
     if (distance == 0)
         return;
 
-    HistoryItem* item = backForwardList()->itemAtIndex(distance);
+    HistoryItem* item = backForward()->itemAtIndex(distance);
     if (!item) {
         if (distance > 0) {
-            int forwardListCount = backForwardList()->forwardListCount();
-            if (forwardListCount > 0) 
-                item = backForwardList()->itemAtIndex(forwardListCount);
+            if (int forwardCount = backForward()->forwardCount()) 
+                item = backForward()->itemAtIndex(forwardCount);
         } else {
-            int backListCount = backForwardList()->backListCount();
-            if (backListCount > 0)
-                item = backForwardList()->itemAtIndex(-backListCount);
+            if (int backCount = backForward()->backCount())
+                item = backForward()->itemAtIndex(-backCount);
         }
     }
 
-    ASSERT(item); // we should not reach this line with an empty back/forward list
-    if (item)
-        goToItem(item, FrameLoadTypeIndexedBackForward);
+    ASSERT(item);
+    if (!item)
+        return;
+
+    goToItem(item, FrameLoadTypeIndexedBackForward);
 }
 
 void Page::goToItem(HistoryItem* item, FrameLoadType type)
@@ -371,7 +371,7 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type)
 
 int Page::getHistoryLength()
 {
-    return backForwardList()->backListCount() + 1 + backForwardList()->forwardListCount();
+    return backForward()->backCount() + 1 + backForward()->forwardCount();
 }
 
 void Page::setGlobalHistoryItem(HistoryItem* item)
@@ -907,4 +907,23 @@ void Page::checkFrameCountConsistency() const
     ASSERT(m_frameCount + 1 == frameCount);
 }
 #endif
+
+Page::PageClients::PageClients()
+    : chromeClient(0)
+    , contextMenuClient(0)
+    , editorClient(0)
+    , dragClient(0)
+    , inspectorClient(0)
+    , pluginHalterClient(0)
+    , geolocationControllerClient(0)
+    , deviceMotionClient(0)
+    , deviceOrientationClient(0)
+    , speechInputClient(0)
+{
+}
+
+Page::PageClients::~PageClients()
+{
+}
+
 } // namespace WebCore
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index 6ff64cf..89ad7b8 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -39,7 +39,6 @@ namespace JSC {
 namespace WebCore {
 
     class BackForwardController;
-    class BackForwardControllerClient;
     class BackForwardList;
     class Chrome;
     class ChromeClient;
@@ -95,20 +94,9 @@ namespace WebCore {
         static void scheduleForcedStyleRecalcForAllPages();
 
         // It is up to the platform to ensure that non-null clients are provided where required.
-        struct PageClients {
-            PageClients()
-                : chromeClient(0)
-                , contextMenuClient(0)
-                , editorClient(0)
-                , dragClient(0)
-                , inspectorClient(0)
-                , pluginHalterClient(0)
-                , geolocationControllerClient(0)
-                , deviceMotionClient(0)
-                , deviceOrientationClient(0)
-                , backForwardControllerClient(0)
-                , speechInputClient(0)
-            { }
+        struct PageClients : Noncopyable {
+            PageClients();
+            ~PageClients();
 
             ChromeClient* chromeClient;
             ContextMenuClient* contextMenuClient;
@@ -119,7 +107,7 @@ namespace WebCore {
             GeolocationControllerClient* geolocationControllerClient;
             DeviceMotionClient* deviceMotionClient;
             DeviceOrientationClient* deviceOrientationClient;
-            BackForwardControllerClient* backForwardControllerClient;
+            RefPtr<BackForwardList> backForwardClient;
             SpeechInputClient* speechInputClient;
         };
 
@@ -145,19 +133,16 @@ namespace WebCore {
         bool openedByDOM() const;
         void setOpenedByDOM();
 
+        // DEPRECATED. Use backForward() instead of the following 6 functions.
         BackForwardList* backForwardList() const;
-
-        // FIXME: The following three methods don't fall under the responsibilities of the Page object
-        // They seem to fit a hypothetical Page-controller object that would be akin to the 
-        // Frame-FrameLoader relationship.  They have to live here now, but should move somewhere that
-        // makes more sense when that class exists.
         bool goBack();
         bool goForward();
         bool canGoBackOrForward(int distance) const;
         void goBackOrForward(int distance);
-        void goToItem(HistoryItem*, FrameLoadType);
         int getHistoryLength();
 
+        void goToItem(HistoryItem*, FrameLoadType);
+
         HistoryItem* globalHistoryItem() const { return m_globalHistoryItem.get(); }
         void setGlobalHistoryItem(HistoryItem*);
 
@@ -195,7 +180,7 @@ namespace WebCore {
 #endif
         Settings* settings() const { return m_settings.get(); }
         ProgressTracker* progress() const { return m_progress.get(); }
-
+        BackForwardController* backForward() const { return m_backForwardController.get(); }
 
         enum ViewMode {
             ViewModeInvalid,
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index fac35be..991ec3c 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "Settings.h"
 
-#include "BackForwardList.h"
+#include "BackForwardController.h"
 #include "CachedResourceLoader.h"
 #include "CookieStorage.h"
 #include "DOMTimer.h"
@@ -424,10 +424,10 @@ void Settings::setUsesPageCache(bool usesPageCache)
         
     m_usesPageCache = usesPageCache;
     if (!m_usesPageCache) {
-        int first = -m_page->backForwardList()->backListCount();
-        int last = m_page->backForwardList()->forwardListCount();
+        int first = -m_page->backForward()->backCount();
+        int last = m_page->backForward()->forwardCount();
         for (int i = first; i <= last; i++)
-            pageCache()->remove(m_page->backForwardList()->itemAtIndex(i));
+            pageCache()->remove(m_page->backForward()->itemAtIndex(i));
         pageCache()->releaseAutoreleasedPagesNow();
     }
 }
diff --git a/WebCore/platform/ContextMenu.cpp b/WebCore/platform/ContextMenu.cpp
index 369f9ce..83558e5 100644
--- a/WebCore/platform/ContextMenu.cpp
+++ b/WebCore/platform/ContextMenu.cpp
@@ -405,10 +405,10 @@ void ContextMenu::populate()
 #if ENABLE(INSPECTOR)
                 if (!(frame->page() && frame->page()->inspectorController()->hasInspectorFrontendClient())) {
 #endif
-                if (frame->page() && frame->page()->canGoBackOrForward(-1))
+                if (frame->page() && frame->page()->backForward()->canGoBackOrForward(-1))
                     appendItem(BackItem);
 
-                if (frame->page() && frame->page()->canGoBackOrForward(1))
+                if (frame->page() && frame->page()->backForward()->canGoBackOrForward(1))
                     appendItem(ForwardItem);
 
                 // use isLoadingInAPISense rather than isLoading because Stop/Reload are
@@ -783,10 +783,10 @@ void ContextMenu::checkOrEnableIfNeeded(ContextMenuItem& item) const
 #endif
 #if PLATFORM(GTK)
         case ContextMenuItemTagGoBack:
-            shouldEnable = frame->page() && frame->page()->canGoBackOrForward(-1);
+            shouldEnable = frame->page() && frame->page()->backForward()->canGoBackOrForward(-1);
             break;
         case ContextMenuItemTagGoForward:
-            shouldEnable = frame->page() && frame->page()->canGoBackOrForward(1);
+            shouldEnable = frame->page() && frame->page()->backForward()->canGoBackOrForward(1);
             break;
         case ContextMenuItemTagStop:
             shouldEnable = frame->loader()->documentLoader()->isLoadingInAPISense();
diff --git a/WebCore/wml/WMLDoElement.cpp b/WebCore/wml/WMLDoElement.cpp
index 17a6d10..899bee1 100644
--- a/WebCore/wml/WMLDoElement.cpp
+++ b/WebCore/wml/WMLDoElement.cpp
@@ -90,7 +90,7 @@ void WMLDoElement::defaultEventHandler(Event* event)
                 eventTimer->stop();
         }
 
-        pageState->page()->goBack();
+        pageState->page()->backForward()->goBack();
     } else if (m_type == "reset") {
         WMLPageState* pageState = wmlPageStateForDocument(document());
         if (!pageState)
diff --git a/WebCore/wml/WMLDocument.cpp b/WebCore/wml/WMLDocument.cpp
index 9781a68..440f8ee 100644
--- a/WebCore/wml/WMLDocument.cpp
+++ b/WebCore/wml/WMLDocument.cpp
@@ -68,11 +68,7 @@ void WMLDocument::finishedParsing()
         if (!page)
             return;
 
-        BackForwardList* list = page->backForwardList();
-        if (!list)
-            return;
-
-        HistoryItem* item = list->backItem();
+        HistoryItem* item = page->backForward()->backItem();
         if (!item)
             return;
 
diff --git a/WebCore/wml/WMLPageState.cpp b/WebCore/wml/WMLPageState.cpp
index d03cf44..5779e0e 100644
--- a/WebCore/wml/WMLPageState.cpp
+++ b/WebCore/wml/WMLPageState.cpp
@@ -64,8 +64,8 @@ void WMLPageState::reset()
     m_variables.clear();
 
     // Clear the navigation history state 
-    if (BackForwardList* list = m_page ? m_page->backForwardList() : 0)
-        list->clearWMLPageHistory();
+    if (m_page)
+        m_page->backForward()->client()->clearWMLPageHistory();
 }
 
 static inline String normalizedHostName(const String& passedHost)
@@ -121,15 +121,11 @@ static bool tryAccessHistoryURLs(Page* page, KURL& previousURL, KURL& currentURL
     if (!frame || !frame->document())    
         return false;
 
-    BackForwardList* list = page->backForwardList();
-    if (!list)
-        return false;
-
-    HistoryItem* previousItem = list->backItem();
+    HistoryItem* previousItem = page->backForward()->backItem();
     if (!previousItem)
         return false;
 
-    HistoryItem* currentItem = list->currentItem();
+    HistoryItem* currentItem = page->backForward()->currentItem();
     if (!currentItem)
         return false;
 
diff --git a/WebCore/wml/WMLPrevElement.cpp b/WebCore/wml/WMLPrevElement.cpp
index b90e22b..fccdc0b 100644
--- a/WebCore/wml/WMLPrevElement.cpp
+++ b/WebCore/wml/WMLPrevElement.cpp
@@ -64,7 +64,7 @@ void WMLPrevElement::executeTask()
     if (WMLTimerElement* eventTimer = card->eventTimer())
         eventTimer->stop();
 
-    pageState->page()->goBack();
+    pageState->page()->backForward()->goBack();
 }
 
 }
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index e5305e7..cd23932 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,26 @@
+2010-10-29  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        More back/forward refactoring
+
+        * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
+        * WebKit2.xcodeproj/project.pbxproj: Ditto.
+
+        * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
+        * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.
+
+        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
+        (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
+        (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
+        (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
+        (WebKit::InjectedBundleBackForwardList::clear): Ditto.
+
+        * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage): Set up backForwardClient.
+
 2010-10-29  Adam Roben  <aroben at apple.com>
 
         Stop using encode/decodeBytes for WebEvent subclasses
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index db898ca..9001eb3 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -482,7 +482,6 @@ SOURCES += \
     WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp \
     WebProcess/WebCoreSupport/WebInspectorClient.cpp \
     WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp \
-    WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp \
     WebProcess/WebCoreSupport/WebPopupMenu.cpp \
     WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp \
     WebProcess/WebCoreSupport/WebPlatformStrategies.cpp \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 752c23f..630afe6 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -369,8 +369,6 @@
 		BCA8C6A911E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C6A711E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h */; };
 		BCA8C6AF11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C6AD11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp */; };
 		BCA8C6B011E3C08700812FB7 /* InjectedBundlePageUIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C6AE11E3C08700812FB7 /* InjectedBundlePageUIClient.h */; };
-		BCA8C9DC11E4086500812FB7 /* WebBackForwardControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C9DA11E4086500812FB7 /* WebBackForwardControllerClient.h */; };
-		BCA8C9DD11E4086500812FB7 /* WebBackForwardControllerClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C9DB11E4086500812FB7 /* WebBackForwardControllerClient.cpp */; };
 		BCB0AD33122F285800B1341E /* MutableArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC8049D122F0D6B00103529 /* MutableArray.cpp */; };
 		BCB0AD34122F285800B1341E /* MutableArray.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC8049E122F0D6B00103529 /* MutableArray.h */; };
 		BCB0AEE9122F53E300B1341E /* MutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0AEE7122F53E300B1341E /* MutableDictionary.h */; };
@@ -882,8 +880,6 @@
 		BCA8C6A711E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageLoaderClient.h; sourceTree = "<group>"; };
 		BCA8C6AD11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageUIClient.cpp; sourceTree = "<group>"; };
 		BCA8C6AE11E3C08700812FB7 /* InjectedBundlePageUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageUIClient.h; sourceTree = "<group>"; };
-		BCA8C9DA11E4086500812FB7 /* WebBackForwardControllerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardControllerClient.h; sourceTree = "<group>"; };
-		BCA8C9DB11E4086500812FB7 /* WebBackForwardControllerClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebBackForwardControllerClient.cpp; sourceTree = "<group>"; };
 		BCB0AEE7122F53E300B1341E /* MutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutableDictionary.h; sourceTree = "<group>"; };
 		BCB0AEE8122F53E300B1341E /* MutableDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutableDictionary.cpp; sourceTree = "<group>"; };
 		BCB0B0DB12305A2500B1341E /* WebContextUserMessageCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextUserMessageCoders.h; sourceTree = "<group>"; };
@@ -1427,8 +1423,6 @@
 			isa = PBXGroup;
 			children = (
 				BC111ADE112F5B9A00337BAB /* mac */,
-				BCA8C9DB11E4086500812FB7 /* WebBackForwardControllerClient.cpp */,
-				BCA8C9DA11E4086500812FB7 /* WebBackForwardControllerClient.h */,
 				BC111A53112F4FBB00337BAB /* WebChromeClient.cpp */,
 				BC032D6010F4378D0058C15A /* WebChromeClient.h */,
 				BC111A54112F4FBB00337BAB /* WebContextMenuClient.cpp */,
@@ -2031,7 +2025,6 @@
 				1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */,
 				BC2E6E881141971500A63B1E /* RunLoop.h in Headers */,
 				BC9E95D311449B0300870E71 /* UpdateChunk.h in Headers */,
-				BCA8C9DC11E4086500812FB7 /* WebBackForwardControllerClient.h in Headers */,
 				BC72BA1E11E64907001EB4EA /* WebBackForwardList.h in Headers */,
 				BC646BFA11DD377B006455B0 /* WebBackForwardListItem.h in Headers */,
 				BC72B9FB11E6476B001EB4EA /* WebBackForwardListProxy.h in Headers */,
@@ -2379,7 +2372,6 @@
 				BC2E6E871141971500A63B1E /* RunLoop.cpp in Sources */,
 				BC0092F7115837A300E0AE2A /* RunLoopMac.mm in Sources */,
 				BC9E95D411449B0300870E71 /* UpdateChunk.cpp in Sources */,
-				BCA8C9DD11E4086500812FB7 /* WebBackForwardControllerClient.cpp in Sources */,
 				BC72BA1D11E64907001EB4EA /* WebBackForwardList.cpp in Sources */,
 				BC646BF911DD377B006455B0 /* WebBackForwardListItem.cpp in Sources */,
 				BC72B9FA11E6476B001EB4EA /* WebBackForwardListProxy.cpp in Sources */,
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp
index 9e7500e..9f50942 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp
@@ -28,6 +28,7 @@
 #include "InjectedBundleBackForwardListItem.h"
 #include "WebBackForwardListProxy.h"
 #include "WebPage.h"
+#include <WebCore/BackForwardController.h>
 #include <WebCore/Page.h>
 
 using namespace WebCore;
@@ -41,7 +42,7 @@ PassRefPtr<InjectedBundleBackForwardListItem> InjectedBundleBackForwardList::ite
     Page* page = m_page->corePage();
     if (!page)
         return 0;
-    return InjectedBundleBackForwardListItem::create(page->backForwardList()->itemAtIndex(index));
+    return InjectedBundleBackForwardListItem::create(page->backForward()->itemAtIndex(index));
 }
 
 int InjectedBundleBackForwardList::backListCount() const
@@ -51,7 +52,7 @@ int InjectedBundleBackForwardList::backListCount() const
     Page* page = m_page->corePage();
     if (!page)
         return 0;
-    return page->backForwardList()->backListCount();
+    return page->backForward()->backCount();
 }
 
 int InjectedBundleBackForwardList::forwardListCount() const
@@ -61,7 +62,7 @@ int InjectedBundleBackForwardList::forwardListCount() const
     Page* page = m_page->corePage();
     if (!page)
         return 0;
-    return page->backForwardList()->forwardListCount();
+    return page->backForward()->forwardCount();
 }
 
 void InjectedBundleBackForwardList::clear()
@@ -71,7 +72,7 @@ void InjectedBundleBackForwardList::clear()
     Page* page = m_page->corePage();
     if (!page)
         return;
-    static_cast<WebBackForwardListProxy*>(page->backForwardList())->clear();
+    static_cast<WebBackForwardListProxy*>(page->backForward()->client())->clear();
 }
 
 } // namespace WebKit
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp
deleted file mode 100644
index b88f9c5..0000000
--- a/WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#include "WebBackForwardControllerClient.h"
-
-#include "WebPage.h"
-#include "WebBackForwardListProxy.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void WebBackForwardControllerClient::backForwardControllerDestroyed()
-{
-    delete this;
-}
-
-PassRefPtr<BackForwardList> WebBackForwardControllerClient::createBackForwardList(Page*)
-{
-    return WebBackForwardListProxy::create(m_page);
-}
-
-} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.h b/WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.h
deleted file mode 100644
index 27f45fa..0000000
--- a/WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#ifndef WebBackForwardControllerClient_h
-#define WebBackForwardControllerClient_h
-
-#include <WebCore/BackForwardControllerClient.h>
-
-namespace WebKit {
-
-class WebPage;
-
-class WebBackForwardControllerClient : public WebCore::BackForwardControllerClient {
-public:
-    WebBackForwardControllerClient(WebPage* page)
-        : m_page(page)
-    {
-    }
-
-private:
-    virtual void backForwardControllerDestroyed();
-    virtual PassRefPtr<WebCore::BackForwardList> createBackForwardList(WebCore::Page*);
-
-    WebPage* m_page;
-};
-
-} // namespace WebKit
-
-#endif // WebBackForwardControllerClient_h
diff --git a/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h b/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h
index bdefa3e..7cd90fe 100644
--- a/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h
+++ b/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h
@@ -27,6 +27,7 @@
 #define WebBackForwardListProxy_h
 
 #include <WebCore/BackForwardList.h>
+#include <wtf/PassRefPtr.h>
 
 namespace WebKit {
 
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 25af289..b11149d 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -36,7 +36,6 @@
 #include "PluginProcessConnectionManager.h"
 #include "PluginProxy.h"
 #include "PluginView.h"
-#include "WebBackForwardControllerClient.h"
 #include "WebBackForwardListProxy.h"
 #include "WebChromeClient.h"
 #include "WebContextMenuClient.h"
@@ -120,7 +119,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     pageClients.editorClient = new WebEditorClient(this);
     pageClients.dragClient = new WebDragClient(this);
     pageClients.inspectorClient = new WebInspectorClient(this);
-    pageClients.backForwardControllerClient = new WebBackForwardControllerClient(this);
+    pageClients.backForwardClient = WebBackForwardListProxy::create(this);
     m_page = adoptPtr(new Page(pageClients));
 
     updatePreferences(parameters.store);
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 21c9bbd..cce7e06 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1036,14 +1036,6 @@
 				Name="WebCoreSupport"
 				>
 				<File
-					RelativePath="..\WebProcess\WebCoreSupport\WebBackForwardControllerClient.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\WebProcess\WebCoreSupport\WebBackForwardControllerClient.h"
-					>
-				</File>
-				<File
 					RelativePath="..\WebProcess\WebCoreSupport\WebChromeClient.cpp"
 					>
 				</File>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list