Title: [207352] trunk/Source
Revision
207352
Author
ander...@apple.com
Date
2016-10-14 11:45:52 -0700 (Fri, 14 Oct 2016)

Log 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.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207351 => 207352)


--- trunk/Source/WebCore/ChangeLog	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebCore/ChangeLog	2016-10-14 18:45:52 UTC (rev 207352)
@@ -1,3 +1,15 @@
+2016-10-14  Anders Carlsson  <ander...@apple.com>
+
+        Clean up BackForwardClient
+        https://bugs.webkit.org/show_bug.cgi?id=163454
+
+        Reviewed by Sam Weinig.
+
+        Remove iOS specific member functions that are only used from WebKit.
+
+        * history/BackForwardClient.h:
+        * loader/EmptyClients.cpp:
+
 2016-10-13  Anders Carlsson  <ander...@apple.com>
 
         Move BackForwardList from WebCore to WebKitLegacy

Modified: trunk/Source/WebCore/history/BackForwardClient.h (207351 => 207352)


--- trunk/Source/WebCore/history/BackForwardClient.h	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebCore/history/BackForwardClient.h	2016-10-14 18:45:52 UTC (rev 207352)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2010, 2016 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.
  *
@@ -25,8 +25,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef BackForwardClient_h
-#define BackForwardClient_h
+#pragma once
 
 #include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
@@ -50,17 +49,6 @@
     virtual int forwardListCount() = 0;
 
     virtual void close() = 0;
-
-#if PLATFORM(IOS)
-    // FIXME: These methods seem to violate the encapsulation of this class.
-    virtual unsigned current() = 0;
-    virtual void setCurrent(unsigned newCurrent) = 0;
-
-    // FIXME: Consider renaming this method once we upstream the iOS changes to WebView.mm.
-    virtual bool clearAllPageCaches() = 0;
-#endif
 };
 
 } // namespace WebCore
-
-#endif // BackForwardClient_h

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (207351 => 207352)


--- trunk/Source/WebCore/loader/EmptyClients.cpp	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp	2016-10-14 18:45:52 UTC (rev 207352)
@@ -148,12 +148,6 @@
     int backListCount() override { return 0; }
     int forwardListCount() override { return 0; }
     void close() override { }
-
-#if PLATFORM(IOS)
-    unsigned current() override { return 0; }
-    void setCurrent(unsigned) override { }
-    bool clearAllPageCaches() override { return false; }
-#endif
 };
 
 void fillWithEmptyClients(PageConfiguration& pageConfiguration)

Modified: trunk/Source/WebKit/mac/ChangeLog (207351 => 207352)


--- trunk/Source/WebKit/mac/ChangeLog	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-10-14 18:45:52 UTC (rev 207352)
@@ -1,3 +1,22 @@
+2016-10-14  Anders Carlsson  <ander...@apple.com>
+
+        Clean up BackForwardClient
+        https://bugs.webkit.org/show_bug.cgi?id=163454
+
+        Reviewed by Sam Weinig.
+
+        * 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.
+
 2016-10-13  Anders Carlsson  <ander...@apple.com>
 
         Move BackForwardList from WebCore to WebKitLegacy

Modified: trunk/Source/WebKit/mac/History/BackForwardList.h (207351 => 207352)


--- trunk/Source/WebKit/mac/History/BackForwardList.h	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit/mac/History/BackForwardList.h	2016-10-14 18:45:52 UTC (rev 207352)
@@ -70,10 +70,8 @@
     WEBCORE_EXPORT Vector<Ref<WebCore::HistoryItem>>& entries();
 
 #if PLATFORM(IOS)
-    unsigned current() override;
-    void setCurrent(unsigned newCurrent) override;
-
-    bool clearAllPageCaches() override;
+    unsigned current();
+    void setCurrent(unsigned newCurrent);
 #endif
 
 private:

Modified: trunk/Source/WebKit/mac/History/BackForwardList.mm (207351 => 207352)


--- trunk/Source/WebKit/mac/History/BackForwardList.mm	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit/mac/History/BackForwardList.mm	2016-10-14 18:45:52 UTC (rev 207352)
@@ -226,18 +226,6 @@
 {
     m_current = newCurrent;
 }
-
-bool BackForwardList::clearAllPageCaches()
-{
-    bool didRemoveAtLeastOneItem = false;
-    for (auto& item : m_entries) {
-        if (item->isInPageCache()) {
-            didRemoveAtLeastOneItem = true;
-            PageCache::singleton().remove(item);
-        }
-    }
-    return didRemoveAtLeastOneItem;
-}
 #endif
 
 void BackForwardList::close()

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (207351 => 207352)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2016-10-14 18:45:52 UTC (rev 207352)
@@ -3554,20 +3554,6 @@
     [self _locked_recursivelyPerformPlugInSelector:@selector(destroyAllPlugins) inFrame:[self mainFrame]];
 }
 
-- (void)_clearBackForwardCache
-{
-    WebThreadRun(^{
-        WebKit::MemoryMeasure measurer("[WebView _clearBackForwardCache]");
-        BackForwardList* bfList = core([self backForwardList]);
-        if (!bfList)
-            return;
-
-        BOOL didClearBFCache = bfList->clearAllPageCaches();
-        if (WebKit::MemoryMeasure::isLoggingEnabled())
-            NSLog(@"[WebView _clearBackForwardCache] %@ empty cache\n", (didClearBFCache ? @"DID" : @"did NOT"));
-    });
-}
-
 - (void)_startAllPlugIns
 {
     WebThreadLock();

Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (207351 => 207352)


--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h	2016-10-14 18:45:52 UTC (rev 207352)
@@ -656,12 +656,6 @@
 - (BOOL)_setMediaLayer:(CALayer*)layer forPluginView:(NSView*)pluginView;
 
 /*!
-    @method _clearBackForwardCache
-    @abstract Clear's this WebView's back/forward cache on the WebThread.
- */
-- (void)_clearBackForwardCache;
-
-/*!
  @method _wantsTelephoneNumberParsing
  @abstract Does this WebView want phone number parsing? (This could ultimately be disallowed by the document itself).
  */

Modified: trunk/Source/WebKit2/ChangeLog (207351 => 207352)


--- trunk/Source/WebKit2/ChangeLog	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit2/ChangeLog	2016-10-14 18:45:52 UTC (rev 207352)
@@ -1,3 +1,16 @@
+2016-10-14  Anders Carlsson  <ander...@apple.com>
+
+        Clean up BackForwardClient
+        https://bugs.webkit.org/show_bug.cgi?id=163454
+
+        Reviewed by Sam Weinig.
+
+        Remove empty iOS only stubs.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebPage/WebBackForwardListProxy.h:
+        * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
+
 2016-10-14  Brady Eidson  <beid...@apple.com>
 
         Enable Gamepads by default in WK2.

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (207351 => 207352)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-10-14 18:45:52 UTC (rev 207352)
@@ -678,7 +678,6 @@
 		2DA944AD1884E9BA00ED86DB /* TextCheckerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944A91884E9BA00ED86DB /* TextCheckerIOS.mm */; };
 		2DA944AF1884E9BA00ED86DB /* WebPageProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */; };
 		2DA944B01884E9BA00ED86DB /* WebProcessProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */; };
-		2DA944B91884EA3900ED86DB /* WebBackForwardListProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */; };
 		2DA944BA1884EA3C00ED86DB /* WebPageIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944B61884EA3500ED86DB /* WebPageIOS.mm */; };
 		2DA944BD188511E700ED86DB /* NetworkProcessIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */; };
 		2DABA7721A817B1700EF0F1A /* WKPageRenderingProgressEventsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DABA7711A817B1700EF0F1A /* WKPageRenderingProgressEventsInternal.h */; };
@@ -2725,7 +2724,6 @@
 		2DA944A91884E9BA00ED86DB /* TextCheckerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TextCheckerIOS.mm; path = ios/TextCheckerIOS.mm; sourceTree = "<group>"; };
 		2DA944AB1884E9BA00ED86DB /* WebPageProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageProxyIOS.mm; path = ios/WebPageProxyIOS.mm; sourceTree = "<group>"; };
 		2DA944AC1884E9BA00ED86DB /* WebProcessProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebProcessProxyIOS.mm; path = ios/WebProcessProxyIOS.mm; sourceTree = "<group>"; };
-		2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebBackForwardListProxyIOS.mm; path = ios/WebBackForwardListProxyIOS.mm; sourceTree = "<group>"; };
 		2DA944B61884EA3500ED86DB /* WebPageIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebPageIOS.mm; path = ios/WebPageIOS.mm; sourceTree = "<group>"; };
 		2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessIOS.mm; path = NetworkProcess/ios/NetworkProcessIOS.mm; sourceTree = "<group>"; };
 		2DABA7711A817B1700EF0F1A /* WKPageRenderingProgressEventsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageRenderingProgressEventsInternal.h; sourceTree = "<group>"; };
@@ -5045,7 +5043,6 @@
 			children = (
 				2DD13BD318F7DADD00E130A1 /* FindControllerIOS.mm */,
 				2DA7FDCB18F88625008DDED0 /* FindIndicatorOverlayClientIOS.h */,
-				2DA944B51884EA3500ED86DB /* WebBackForwardListProxyIOS.mm */,
 				2DA944B61884EA3500ED86DB /* WebPageIOS.mm */,
 				29232DF518B29DCE00D0596F /* WKAccessibilityWebPageObjectIOS.h */,
 				29232DF618B29DCE00D0596F /* WKAccessibilityWebPageObjectIOS.mm */,
@@ -9370,7 +9367,6 @@
 				BC72BA1D11E64907001EB4EA /* WebBackForwardList.cpp in Sources */,
 				518D2CAD12D5153B003BB93B /* WebBackForwardListItem.cpp in Sources */,
 				BC72B9FA11E6476B001EB4EA /* WebBackForwardListProxy.cpp in Sources */,
-				2DA944B91884EA3900ED86DB /* WebBackForwardListProxyIOS.mm in Sources */,
 				BC111A5A112F4FBB00337BAB /* WebChromeClient.cpp in Sources */,
 				2D28F3E41885CCC1004B9EAE /* WebChromeClientIOS.mm in Sources */,
 				3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */,

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h (207351 => 207352)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h	2016-10-14 18:45:52 UTC (rev 207352)
@@ -59,12 +59,6 @@
 
     void close() override;
 
-#if PLATFORM(IOS)
-    unsigned current() override;
-    void setCurrent(unsigned newCurrent) override;
-    bool clearAllPageCaches() override;
-#endif
-
     WebPage* m_page;
     HashSet<uint64_t> m_associatedItemIDs;
 };

Deleted: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm (207351 => 207352)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm	2016-10-14 18:29:16 UTC (rev 207351)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm	2016-10-14 18:45:52 UTC (rev 207352)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#import "config.h"
-#import "WebBackForwardListProxy.h"
-
-#if PLATFORM(IOS)
-
-#import <WebCore/NotImplemented.h>
-
-namespace WebKit {
-
-unsigned WebBackForwardListProxy::current()
-{
-    notImplemented();
-    return 0;
-}
-
-void WebBackForwardListProxy::setCurrent(unsigned)
-{
-    notImplemented();
-}
-
-bool WebBackForwardListProxy::clearAllPageCaches()
-{
-    notImplemented();
-    return false;
-}
-
-} // namespace WebKit
-
-#endif // PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to