Changeset 207345 in webkit


Ignore:
Timestamp:
Oct 14, 2016 10:14:39 AM (7 years ago)
Author:
andersca@apple.com
Message:

Move BackForwardList from WebCore to WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=163418

Reviewed by Tim Horton.

Source/WebCore:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • history/BackForwardController.cpp:

(WebCore::BackForwardController::BackForwardController):

  • history/BackForwardController.h:
  • loader/EmptyClients.cpp:

(WebCore::fillWithEmptyClients):

  • page/Page.cpp:

(WebCore::Page::Page):

Source/WebKit:

  • WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

  • History/BackForwardList.h: Renamed from Source/WebCore/history/BackForwardList.h.

(BackForwardList::create):
(BackForwardList::webView):

  • History/BackForwardList.mm: Renamed from Source/WebCore/history/BackForwardList.cpp.

(BackForwardList::BackForwardList):
(BackForwardList::close):
(BackForwardList::containsItem):

  • History/WebBackForwardList.mm:

(kit):
(-[WebBackForwardList initWithBackForwardList:]):
(-[WebBackForwardList setPageCacheSize:]):
(-[WebBackForwardList pageCacheSize]):

  • History/WebBackForwardListInternal.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebView/WebFrameView.mm:
  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Location:
trunk/Source
Files:
16 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r207280 r207345  
    16051605
    16061606    history/BackForwardController.cpp
    1607     history/BackForwardList.cpp
    16081607    history/CachedFrame.cpp
    16091608    history/CachedPage.cpp
  • trunk/Source/WebCore/ChangeLog

    r207343 r207345  
     12016-10-13  Anders Carlsson  <andersca@apple.com>
     2
     3        Move BackForwardList from WebCore to WebKitLegacy
     4        https://bugs.webkit.org/show_bug.cgi?id=163418
     5
     6        Reviewed by Tim Horton.
     7
     8        * CMakeLists.txt:
     9        * WebCore.xcodeproj/project.pbxproj:
     10        * history/BackForwardController.cpp:
     11        (WebCore::BackForwardController::BackForwardController):
     12        * history/BackForwardController.h:
     13        * loader/EmptyClients.cpp:
     14        (WebCore::fillWithEmptyClients):
     15        * page/Page.cpp:
     16        (WebCore::Page::Page):
     17
    1182016-10-14  Manuel Rego Casasnovas  <rego@igalia.com>
    219
  • trunk/Source/WebCore/PlatformMac.cmake

    r206883 r207345  
    691691    editing/mac/TextAlternativeWithRange.h
    692692
    693     history/BackForwardList.h
    694693    history/HistoryItem.h
    695694    history/PageCache.h
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r207342 r207345  
    52815281                BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C81C11E3D36900812FB7 /* BackForwardController.h */; settings = {ATTRIBUTES = (Private, ); }; };
    52825282                BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */; };
    5283                 BCA8CA5F11E4E6D100812FB7 /* BackForwardList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8CA5D11E4E6D100812FB7 /* BackForwardList.cpp */; };
    5284                 BCA8CA6011E4E6D100812FB7 /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8CA5E11E4E6D100812FB7 /* BackForwardList.h */; settings = {ATTRIBUTES = (Private, ); }; };
    52855283                BCAA486F14A052530088FAC4 /* PlatformEventFactoryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCAA486D14A052530088FAC4 /* PlatformEventFactoryMac.mm */; };
    52865284                BCAA487014A052530088FAC4 /* PlatformEventFactoryMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCAA486E14A052530088FAC4 /* PlatformEventFactoryMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1280712805                BCA8C81C11E3D36900812FB7 /* BackForwardController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardController.h; sourceTree = "<group>"; };
    1280812806                BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardController.cpp; sourceTree = "<group>"; };
    12809                 BCA8CA5D11E4E6D100812FB7 /* BackForwardList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardList.cpp; sourceTree = "<group>"; };
    12810                 BCA8CA5E11E4E6D100812FB7 /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
    1281112807                BCAA486D14A052530088FAC4 /* PlatformEventFactoryMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformEventFactoryMac.mm; sourceTree = "<group>"; };
    1281212808                BCAA486E14A052530088FAC4 /* PlatformEventFactoryMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformEventFactoryMac.h; sourceTree = "<group>"; };
     
    1669916695                                BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */,
    1670016696                                BCA8C81C11E3D36900812FB7 /* BackForwardController.h */,
    16701                                 BCA8CA5D11E4E6D100812FB7 /* BackForwardList.cpp */,
    16702                                 BCA8CA5E11E4E6D100812FB7 /* BackForwardList.h */,
    1670316697                                51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */,
    1670416698                                51C0AA380F2AA10A001648C2 /* CachedFrame.h */,
     
    2400123995                                51741D0F0B07259A00ED442C /* BackForwardClient.h in Headers */,
    2400223996                                BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
    24003                                 BCA8CA6011E4E6D100812FB7 /* BackForwardList.h in Headers */,
    2400423997                                BC124EE80C2641CD009E2349 /* BarProp.h in Headers */,
    2400523998                                460BB6161D0A1BF000221812 /* Base64Utilities.h in Headers */,
     
    2778027773                                29A8124B0FBB9CA900510293 /* AXObjectCacheMac.mm in Sources */,
    2778127774                                BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */,
    27782                                 BCA8CA5F11E4E6D100812FB7 /* BackForwardList.cpp in Sources */,
    2778327775                                BC124EE70C2641CD009E2349 /* BarProp.cpp in Sources */,
    2778427776                                460BB6151D0A1BF000221812 /* Base64Utilities.cpp in Sources */,
  • trunk/Source/WebCore/history/BackForwardController.cpp

    r194496 r207345  
    2727#include "BackForwardController.h"
    2828
    29 #include "BackForwardList.h"
    30 #include "HistoryItem.h"
     29#include "BackForwardClient.h"
    3130#include "Page.h"
    3231
    3332namespace WebCore {
    3433
    35 BackForwardController::BackForwardController(Page& page, RefPtr<BackForwardClient>&& client)
     34BackForwardController::BackForwardController(Page& page, Ref<BackForwardClient>&& client)
    3635    : m_page(page)
    3736    , m_client(WTFMove(client))
    3837{
    39     if (!m_client)
    40         m_client = BackForwardList::create(&page);
    4138}
    4239
  • trunk/Source/WebCore/history/BackForwardController.h

    r189675 r207345  
    4040    WTF_MAKE_NONCOPYABLE(BackForwardController); WTF_MAKE_FAST_ALLOCATED;
    4141public:
    42     BackForwardController(Page&, RefPtr<BackForwardClient>&&);
     42    BackForwardController(Page&, Ref<BackForwardClient>&&);
    4343    ~BackForwardController();
    4444
  • trunk/Source/WebCore/loader/EmptyClients.cpp

    r206238 r207345  
    3030
    3131#include "ApplicationCacheStorage.h"
     32#include "BackForwardClient.h"
    3233#include "ColorChooser.h"
    3334#include "DOMWrapperWorld.h"
     
    141142};
    142143
     144class EmptyBackForwardClient final : public BackForwardClient {
     145    void addItem(Ref<HistoryItem>&&) override { }
     146    void goToItem(HistoryItem*) override { }
     147    HistoryItem* itemAtIndex(int) override { return nullptr; }
     148    int backListCount() override { return 0; }
     149    int forwardListCount() override { return 0; }
     150    void close() override { }
     151
     152#if PLATFORM(IOS)
     153    unsigned current() override { return 0; }
     154    void setCurrent(unsigned) override { }
     155    bool clearAllPageCaches() override { return false; }
     156#endif
     157};
     158
    143159void fillWithEmptyClients(PageConfiguration& pageConfiguration)
    144160{
     
    170186    pageConfiguration.progressTrackerClient = &dummyProgressTrackerClient.get();
    171187
     188    pageConfiguration.backForwardClient = adoptRef(new EmptyBackForwardClient);
    172189    pageConfiguration.diagnosticLoggingClient = std::make_unique<EmptyDiagnosticLoggingClient>();
    173190
  • trunk/Source/WebCore/page/Page.cpp

    r206951 r207345  
    179179    , m_settings(Settings::create(this))
    180180    , m_progress(std::make_unique<ProgressTracker>(*pageConfiguration.progressTrackerClient))
    181     , m_backForwardController(std::make_unique<BackForwardController>(*this, WTFMove(pageConfiguration.backForwardClient)))
     181    , m_backForwardController(std::make_unique<BackForwardController>(*this, *WTFMove(pageConfiguration.backForwardClient)))
    182182    , m_mainFrame(MainFrame::create(*this, pageConfiguration))
    183183    , m_theme(RenderTheme::themeForPage(this))
  • trunk/Source/WebKit/ChangeLog

    r207308 r207345  
     12016-10-13  Anders Carlsson  <andersca@apple.com>
     2
     3        Move BackForwardList from WebCore to WebKitLegacy
     4        https://bugs.webkit.org/show_bug.cgi?id=163418
     5
     6        Reviewed by Tim Horton.
     7
     8        * WebKit.xcodeproj/project.pbxproj:
     9
    1102016-10-12  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r205502 r207345  
    5656                1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */; };
    5757                1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */; };
     58                1A9119F61DB0470A0087D1FD /* BackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9119F41DB0470A0087D1FD /* BackForwardList.mm */; };
     59                1A9119F71DB0470A0087D1FD /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9119F51DB0470A0087D1FD /* BackForwardList.h */; };
    5860                1AA83F831A5C4AE400026EC6 /* WebDatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */; };
    5961                1AA83F841A5C4AE400026EC6 /* WebDatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */; };
     
    850852                1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostedNetscapePluginStream.h; sourceTree = "<group>"; };
    851853                1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HostedNetscapePluginStream.mm; sourceTree = "<group>"; };
     854                1A9119F41DB0470A0087D1FD /* BackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackForwardList.mm; sourceTree = "<group>"; };
     855                1A9119F51DB0470A0087D1FD /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
    852856                1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebDatabaseProvider.cpp; path = ../../Storage/WebDatabaseProvider.cpp; sourceTree = "<group>"; };
    853857                1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebDatabaseProvider.h; path = ../../Storage/WebDatabaseProvider.h; sourceTree = "<group>"; };
     
    18491853                        isa = PBXGroup;
    18501854                        children = (
     1855                                1A9119F41DB0470A0087D1FD /* BackForwardList.mm */,
     1856                                1A9119F51DB0470A0087D1FD /* BackForwardList.h */,
    18511857                                1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */,
    18521858                                1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */,
     
    28962902                                93D437661D57ABEF00AB85EA /* DOMProgressEvent.h in Headers */,
    28972903                                93D437681D57ABEF00AB85EA /* DOMRange.h in Headers */,
     2904                                1A9119F71DB0470A0087D1FD /* BackForwardList.h in Headers */,
    28982905                                93D4376A1D57ABEF00AB85EA /* DOMRangeException.h in Headers */,
    28992906                                93D4376B1D57ABEF00AB85EA /* DOMRangeInternal.h in Headers */,
     
    35403547                                B6CE5C24100BC5CE00219936 /* WebApplicationCache.mm in Sources */,
    35413548                                A5DEFC1411D5344B00885273 /* WebApplicationCacheQuotaManager.mm in Sources */,
     3549                                1A9119F61DB0470A0087D1FD /* BackForwardList.mm in Sources */,
    35423550                                9398111D0824BF01008DF038 /* WebArchive.mm in Sources */,
    35433551                                939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */,
  • trunk/Source/WebKit/mac/ChangeLog

    r207300 r207345  
     12016-10-13  Anders Carlsson  <andersca@apple.com>
     2
     3        Move BackForwardList from WebCore to WebKitLegacy
     4        https://bugs.webkit.org/show_bug.cgi?id=163418
     5
     6        Reviewed by Tim Horton.
     7
     8        * History/BackForwardList.h: Renamed from Source/WebCore/history/BackForwardList.h.
     9        (BackForwardList::create):
     10        (BackForwardList::webView):
     11        * History/BackForwardList.mm: Renamed from Source/WebCore/history/BackForwardList.cpp.
     12        (BackForwardList::BackForwardList):
     13        (BackForwardList::close):
     14        (BackForwardList::containsItem):
     15        * History/WebBackForwardList.mm:
     16        (kit):
     17        (-[WebBackForwardList initWithBackForwardList:]):
     18        (-[WebBackForwardList setPageCacheSize:]):
     19        (-[WebBackForwardList pageCacheSize]):
     20        * History/WebBackForwardListInternal.h:
     21        * WebCoreSupport/WebFrameLoaderClient.mm:
     22        * WebView/WebFrameView.mm:
     23        * WebView/WebView.mm:
     24        (-[WebView _commonInitializationWithFrameName:groupName:]):
     25        (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
     26
    1272016-10-13  Anders Carlsson  <andersca@apple.com>
    228
  • trunk/Source/WebKit/mac/History/BackForwardList.h

    r207344 r207345  
    2626 */
    2727
    28 #ifndef BackForwardList_h
    29 #define BackForwardList_h
     28#pragma once
    3029
    31 #include "BackForwardClient.h"
     30#include <WebCore/BackForwardClient.h>
    3231#include <wtf/HashSet.h>
    3332#include <wtf/Vector.h>
    3433
    35 namespace WebCore {
     34OBJC_CLASS WebView;
    3635
    37 class Page;
     36typedef HashSet<RefPtr<WebCore::HistoryItem>> HistoryItemHashSet;
    3837
    39 typedef HashSet<RefPtr<HistoryItem>> HistoryItemHashSet;
    40 
    41 class BackForwardList : public BackForwardClient {
     38class BackForwardList : public WebCore::BackForwardClient {
    4239public:
    43     static Ref<BackForwardList> create(Page* page) { return adoptRef(*new BackForwardList(page)); }
     40    static Ref<BackForwardList> create(WebView *webView) { return adoptRef(*new BackForwardList(webView)); }
    4441    virtual ~BackForwardList();
    4542
    46     Page* page() { return m_page; }
     43    WebView *webView() { return m_webView; }
    4744
    48     void addItem(Ref<HistoryItem>&&) override;
     45    void addItem(Ref<WebCore::HistoryItem>&&) override;
    4946    WEBCORE_EXPORT void goBack();
    5047    WEBCORE_EXPORT void goForward();
    51     void goToItem(HistoryItem*) override;
     48    void goToItem(WebCore::HistoryItem*) override;
    5249       
    53     WEBCORE_EXPORT HistoryItem* backItem();
    54     WEBCORE_EXPORT HistoryItem* currentItem();
    55     WEBCORE_EXPORT HistoryItem* forwardItem();
    56     HistoryItem* itemAtIndex(int) override;
     50    WEBCORE_EXPORT WebCore::HistoryItem* backItem();
     51    WEBCORE_EXPORT WebCore::HistoryItem* currentItem();
     52    WEBCORE_EXPORT WebCore::HistoryItem* forwardItem();
     53    WebCore::HistoryItem* itemAtIndex(int) override;
    5754
    58     WEBCORE_EXPORT void backListWithLimit(int, Vector<Ref<HistoryItem>>&);
    59     WEBCORE_EXPORT void forwardListWithLimit(int, Vector<Ref<HistoryItem>>&);
     55    WEBCORE_EXPORT void backListWithLimit(int, Vector<Ref<WebCore::HistoryItem>>&);
     56    WEBCORE_EXPORT void forwardListWithLimit(int, Vector<Ref<WebCore::HistoryItem>>&);
    6057
    6158    WEBCORE_EXPORT int capacity();
     
    6562    int backListCount() override;
    6663    int forwardListCount() override;
    67     WEBCORE_EXPORT bool containsItem(HistoryItem*);
     64    WEBCORE_EXPORT bool containsItem(WebCore::HistoryItem*);
    6865
    6966    void close() override;
    7067    WEBCORE_EXPORT bool closed();
    7168
    72     WEBCORE_EXPORT void removeItem(HistoryItem*);
    73     WEBCORE_EXPORT Vector<Ref<HistoryItem>>& entries();
     69    WEBCORE_EXPORT void removeItem(WebCore::HistoryItem*);
     70    WEBCORE_EXPORT Vector<Ref<WebCore::HistoryItem>>& entries();
    7471
    7572#if PLATFORM(IOS)
     
    8178
    8279private:
    83     WEBCORE_EXPORT explicit BackForwardList(Page*);
     80    WEBCORE_EXPORT explicit BackForwardList(WebView *);
    8481
    85     Page* m_page;
    86     Vector<Ref<HistoryItem>> m_entries;
     82    WebView* m_webView;
     83    Vector<Ref<WebCore::HistoryItem>> m_entries;
    8784    HistoryItemHashSet m_entryHash;
    8885    unsigned m_current;
     
    9188    bool m_enabled;
    9289};
    93    
    94 } // namespace WebCore
    95 
    96 #endif // BackForwardList_h
  • trunk/Source/WebKit/mac/History/BackForwardList.mm

    r207344 r207345  
    2525 */
    2626
    27 #include "config.h"
    2827#include "BackForwardList.h"
    2928
    30 #include "Frame.h"
    31 #include "FrameLoader.h"
    32 #include "FrameLoaderClient.h"
    33 #include "HistoryItem.h"
    34 #include "Logging.h"
    35 #include "Page.h"
    36 #include "PageCache.h"
    37 #include "SerializedScriptValue.h"
    38 
    39 namespace WebCore {
     29#include <WebCore/PageCache.h>
     30
     31using namespace WebCore;
    4032
    4133static const unsigned DefaultCapacity = 100;
    4234static const unsigned NoCurrentItemIndex = UINT_MAX;
    4335
    44 BackForwardList::BackForwardList(Page* page)
    45     : m_page(page)
     36BackForwardList::BackForwardList(WebView *webView)
     37    : m_webView(webView)
    4638    , m_current(NoCurrentItemIndex)
    4739    , m_capacity(DefaultCapacity)
     
    8981{
    9082    ASSERT(m_current > 0);
    91     if (m_current > 0) {
     83    if (m_current > 0)
    9284        m_current--;
    93     }
    9485}
    9586
     
    9788{
    9889    ASSERT(m_current < m_entries.size() - 1);
    99     if (m_current < m_entries.size() - 1) {
     90    if (m_current < m_entries.size() - 1)
    10091        m_current++;
    101     }
    10292}
    10393
     
    10797        return;
    10898       
    109     unsigned int index = 0;
    110     for (; index < m_entries.size(); ++index)
     99    unsigned index = 0;
     100    for (; index < m_entries.size(); ++index) {
    111101        if (m_entries[index].ptr() == item)
    112102            break;
    113     if (index < m_entries.size()) {
     103    }
     104
     105    if (index < m_entries.size())
    114106        m_current = index;
    115     }
    116107}
    117108
     
    178169    if (!size)
    179170        m_current = NoCurrentItemIndex;
    180     else if (m_current > m_entries.size() - 1) {
     171    else if (m_current > m_entries.size() - 1)
    181172        m_current = m_entries.size() - 1;
    182     }
     173
    183174    m_capacity = size;
    184175}
     
    256247    m_entries.clear();
    257248    m_entryHash.clear();
    258     m_page = nullptr;
     249    m_webView = nullptr;
    259250    m_closed = true;
    260251}
     
    292283    return m_entryHash.contains(entry);
    293284}
    294 
    295 }; // namespace WebCore
  • trunk/Source/WebKit/mac/History/WebBackForwardList.mm

    r207300 r207345  
    3030#import "WebBackForwardListInternal.h"
    3131
     32#import "BackForwardList.h"
    3233#import "WebFrameInternal.h"
    3334#import "WebHistoryItemInternal.h"
     
    3940#import "WebTypesInternal.h"
    4041#import "WebViewPrivate.h"
    41 #import <WebCore/BackForwardList.h>
    4242#import <WebCore/HistoryItem.h>
    4343#import <WebCore/Page.h>
     
    8383        return webBackForwardList;
    8484
    85     return [[[WebBackForwardList alloc] initWithBackForwardList:backForwardList] autorelease];
    86 }
    87 
    88 - (id)initWithBackForwardList:(PassRefPtr<BackForwardList>)backForwardList
     85    return [[[WebBackForwardList alloc] initWithBackForwardList:*backForwardList] autorelease];
     86}
     87
     88- (id)initWithBackForwardList:(Ref<BackForwardList>&&)backForwardList
    8989{   
    9090    WebCoreThreadViolationCheckRoundOne();
     
    9393        return nil;
    9494
    95     _private = reinterpret_cast<WebBackForwardListPrivate*>(backForwardList.leakRef());
     95    _private = reinterpret_cast<WebBackForwardListPrivate*>(&backForwardList.leakRef());
    9696    backForwardLists().set(core(self), self);
    9797    return self;
     
    333333- (void)setPageCacheSize:(NSUInteger)size
    334334{
    335     [kit(core(self)->page()) setUsesPageCache:size != 0];
     335    [core(self)->webView() setUsesPageCache:size != 0];
    336336}
    337337
    338338- (NSUInteger)pageCacheSize
    339339{
    340     return [kit(core(self)->page()) usesPageCache] ? PageCache::singleton().maxSize() : 0;
     340    return [core(self)->webView() usesPageCache] ? PageCache::singleton().maxSize() : 0;
    341341}
    342342
  • trunk/Source/WebKit/mac/History/WebBackForwardListInternal.h

    r181906 r207345  
    3030#import <wtf/PassRefPtr.h>
    3131
    32 namespace WebCore {
    3332class BackForwardList;
    34 }
    3533
    36 WebCore::BackForwardList* core(WebBackForwardList *);
    37 WebBackForwardList *kit(WebCore::BackForwardList*);
     34BackForwardList* core(WebBackForwardList *);
     35WebBackForwardList *kit(BackForwardList*);
    3836
    3937@interface WebBackForwardList ()
    40 - (id)initWithBackForwardList:(PassRefPtr<WebCore::BackForwardList>)backForwardList;
     38- (id)initWithBackForwardList:(Ref<BackForwardList>&&)backForwardList;
    4139@end
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r207151 r207345  
    2929#import "WebFrameLoaderClient.h"
    3030
     31#import "BackForwardList.h"
    3132#import "DOMElementInternal.h"
    3233#import "DOMHTMLFormElementInternal.h"
     
    7677#import <WebCore/AuthenticationMac.h>
    7778#import <WebCore/BackForwardController.h>
    78 #import <WebCore/BackForwardList.h>
    7979#import <WebCore/CachedFrame.h>
    8080#import <WebCore/Chrome.h>
  • trunk/Source/WebKit/mac/WebView/WebFrameView.mm

    r204474 r207345  
    2929#import "WebFrameView.h"
    3030
     31#import "BackForwardList.h"
    3132#import "WebClipView.h"
    3233#import "WebDataSourcePrivate.h"
     
    5354#import <Foundation/NSURLRequest.h>
    5455#import <WebCore/BackForwardController.h>
    55 #import <WebCore/BackForwardList.h>
    5656#import <WebCore/DragController.h>
    5757#import <WebCore/EventHandler.h>
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r207171 r207345  
    3232#import "WebViewData.h"
    3333
     34#import "BackForwardList.h"
    3435#import "DOMCSSStyleDeclarationInternal.h"
    3536#import "DOMDocumentInternal.h"
     
    122123#import <WebCore/ApplicationCacheStorage.h>
    123124#import <WebCore/BackForwardController.h>
    124 #import <WebCore/BackForwardList.h>
    125125#import <WebCore/CFNetworkSPI.h>
    126126#import <WebCore/Chrome.h>
     
    10331033#endif
    10341034
     1035    pageConfiguration.backForwardClient = BackForwardList::create(self);
     1036
    10351037#if ENABLE(APPLE_PAY)
    10361038    pageConfiguration.paymentCoordinatorClient = new WebPaymentCoordinatorClient();
     
    12821284#endif
    12831285
     1286    pageConfiguration.backForwardClient = BackForwardList::create(self);
    12841287    pageConfiguration.inspectorClient = new WebInspectorClient(self);
    12851288    pageConfiguration.loaderClientForMainFrame = new WebFrameLoaderClient;
Note: See TracChangeset for help on using the changeset viewer.