Changeset 207352 in webkit


Ignore:
Timestamp:
Oct 14, 2016 11:45:52 AM (8 years ago)
Author:
andersca@apple.com
Message:

Clean up BackForwardClient
https://bugs.webkit.org/show_bug.cgi?id=163454

Reviewed by Sam Weinig.

Source/WebCore:

Remove iOS specific member functions that are only used from WebKit.

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

Source/WebKit/mac:

  • History/BackForwardList.h:

Remove override keywords.

  • History/BackForwardList.mm:

(BackForwardList::clearAllPageCaches): Deleted.
Remove this, it's no longer used.

  • WebView/WebView.mm:

(-[WebView _clearBackForwardCache]): Deleted.

  • WebView/WebViewPrivate.h:

Remove SPI that's no longer used by anyone.

Source/WebKit2:

Remove empty iOS only stubs.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebBackForwardListProxy.h:
  • WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
Location:
trunk/Source
Files:
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207345 r207352  
     12016-10-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Clean up BackForwardClient
     4        https://bugs.webkit.org/show_bug.cgi?id=163454
     5
     6        Reviewed by Sam Weinig.
     7
     8        Remove iOS specific member functions that are only used from WebKit.
     9
     10        * history/BackForwardClient.h:
     11        * loader/EmptyClients.cpp:
     12
    1132016-10-13  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/Source/WebCore/history/BackForwardClient.h

    r184056 r207352  
    11/*
    2  * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2010, 2016 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
    44 * Copyright (C) 2009 Google, Inc. All rights reserved.
     
    2626 */
    2727
    28 #ifndef BackForwardClient_h
    29 #define BackForwardClient_h
     28#pragma once
    3029
    3130#include <wtf/Forward.h>
     
    5150
    5251    virtual void close() = 0;
    53 
    54 #if PLATFORM(IOS)
    55     // FIXME: These methods seem to violate the encapsulation of this class.
    56     virtual unsigned current() = 0;
    57     virtual void setCurrent(unsigned newCurrent) = 0;
    58 
    59     // FIXME: Consider renaming this method once we upstream the iOS changes to WebView.mm.
    60     virtual bool clearAllPageCaches() = 0;
    61 #endif
    6252};
    6353
    6454} // namespace WebCore
    65 
    66 #endif // BackForwardClient_h
  • trunk/Source/WebCore/loader/EmptyClients.cpp

    r207345 r207352  
    149149    int forwardListCount() override { return 0; }
    150150    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
    157151};
    158152
  • trunk/Source/WebKit/mac/ChangeLog

    r207345 r207352  
     12016-10-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Clean up BackForwardClient
     4        https://bugs.webkit.org/show_bug.cgi?id=163454
     5
     6        Reviewed by Sam Weinig.
     7
     8        * History/BackForwardList.h:
     9        Remove override keywords.
     10
     11        * History/BackForwardList.mm:
     12        (BackForwardList::clearAllPageCaches): Deleted.
     13        Remove this, it's no longer used.
     14
     15        * WebView/WebView.mm:
     16        (-[WebView _clearBackForwardCache]): Deleted.
     17        * WebView/WebViewPrivate.h:
     18        Remove SPI that's no longer used by anyone.
     19
    1202016-10-13  Anders Carlsson  <andersca@apple.com>
    221
  • trunk/Source/WebKit/mac/History/BackForwardList.h

    r207345 r207352  
    7171
    7272#if PLATFORM(IOS)
    73     unsigned current() override;
    74     void setCurrent(unsigned newCurrent) override;
    75 
    76     bool clearAllPageCaches() override;
     73    unsigned current();
     74    void setCurrent(unsigned newCurrent);
    7775#endif
    7876
  • trunk/Source/WebKit/mac/History/BackForwardList.mm

    r207345 r207352  
    227227    m_current = newCurrent;
    228228}
    229 
    230 bool BackForwardList::clearAllPageCaches()
    231 {
    232     bool didRemoveAtLeastOneItem = false;
    233     for (auto& item : m_entries) {
    234         if (item->isInPageCache()) {
    235             didRemoveAtLeastOneItem = true;
    236             PageCache::singleton().remove(item);
    237         }
    238     }
    239     return didRemoveAtLeastOneItem;
    240 }
    241229#endif
    242230
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r207345 r207352  
    35553555}
    35563556
    3557 - (void)_clearBackForwardCache
    3558 {
    3559     WebThreadRun(^{
    3560         WebKit::MemoryMeasure measurer("[WebView _clearBackForwardCache]");
    3561         BackForwardList* bfList = core([self backForwardList]);
    3562         if (!bfList)
    3563             return;
    3564 
    3565         BOOL didClearBFCache = bfList->clearAllPageCaches();
    3566         if (WebKit::MemoryMeasure::isLoggingEnabled())
    3567             NSLog(@"[WebView _clearBackForwardCache] %@ empty cache\n", (didClearBFCache ? @"DID" : @"did NOT"));
    3568     });
    3569 }
    3570 
    35713557- (void)_startAllPlugIns
    35723558{
  • trunk/Source/WebKit/mac/WebView/WebViewPrivate.h

    r203186 r207352  
    657657
    658658/*!
    659     @method _clearBackForwardCache
    660     @abstract Clear's this WebView's back/forward cache on the WebThread.
    661  */
    662 - (void)_clearBackForwardCache;
    663 
    664 /*!
    665659 @method _wantsTelephoneNumberParsing
    666660 @abstract Does this WebView want phone number parsing? (This could ultimately be disallowed by the document itself).
  • trunk/Source/WebKit2/ChangeLog

    r207348 r207352  
     12016-10-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Clean up BackForwardClient
     4        https://bugs.webkit.org/show_bug.cgi?id=163454
     5
     6        Reviewed by Sam Weinig.
     7
     8        Remove empty iOS only stubs.
     9
     10        * WebKit2.xcodeproj/project.pbxproj:
     11        * WebProcess/WebPage/WebBackForwardListProxy.h:
     12        * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
     13
    1142016-10-14  Brady Eidson  <beidson@apple.com>
    215
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r207151 r207352  
    679679                2DA944AF1884E9BA00ED86DB /* WebPageProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */; };
    680680                2DA944B01884E9BA00ED86DB /* WebProcessProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */; };
    681                 2DA944B91884EA3900ED86DB /* WebBackForwardListProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */; };
    682681                2DA944BA1884EA3C00ED86DB /* WebPageIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944B61884EA3500ED86DB /* WebPageIOS.mm */; };
    683682                2DA944BD188511E700ED86DB /* NetworkProcessIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */; };
     
    27262725                2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageProxyIOS.mm; path = ios/WebPageProxyIOS.mm; sourceTree = "<group>"; };
    27272726                2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebProcessProxyIOS.mm; path = ios/WebProcessProxyIOS.mm; sourceTree = "<group>"; };
    2728                 2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebBackForwardListProxyIOS.mm; path = ios/WebBackForwardListProxyIOS.mm; sourceTree = "<group>"; };
    27292727                2DA944B61884EA3500ED86DB /* WebPageIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageIOS.mm; path = ios/WebPageIOS.mm; sourceTree = "<group>"; };
    27302728                2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessIOS.mm; path = NetworkProcess/ios/NetworkProcessIOS.mm; sourceTree = "<group>"; };
     
    50465044                                2DD13BD318F7DADD00E130A1 /* FindControllerIOS.mm */,
    50475045                                2DA7FDCB18F88625008DDED0 /* FindIndicatorOverlayClientIOS.h */,
    5048                                 2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */,
    50495046                                2DA944B61884EA3500ED86DB /* WebPageIOS.mm */,
    50505047                                29232DF518B29DCE00D0596F /* WKAccessibilityWebPageObjectIOS.h */,
     
    93719368                                518D2CAD12D5153B003BB93B /* WebBackForwardListItem.cpp in Sources */,
    93729369                                BC72B9FA11E6476B001EB4EA /* WebBackForwardListProxy.cpp in Sources */,
    9373                                 2DA944B91884EA3900ED86DB /* WebBackForwardListProxyIOS.mm in Sources */,
    93749370                                BC111A5A112F4FBB00337BAB /* WebChromeClient.cpp in Sources */,
    93759371                                2D28F3E41885CCC1004B9EAE /* WebChromeClientIOS.mm in Sources */,
  • trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h

    r207224 r207352  
    6060    void close() override;
    6161
    62 #if PLATFORM(IOS)
    63     unsigned current() override;
    64     void setCurrent(unsigned newCurrent) override;
    65     bool clearAllPageCaches() override;
    66 #endif
    67 
    6862    WebPage* m_page;
    6963    HashSet<uint64_t> m_associatedItemIDs;
Note: See TracChangeset for help on using the changeset viewer.