Remove unused EditorClient functions
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2017 23:17:07 +0000 (23:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2017 23:17:07 +0000 (23:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177463

Patch by Sam Weinig <sam@webkit.org> on 2017-09-25
Reviewed by Alex Christensen.

Remove unused EditorClient functions.

Source/WebCore:

* loader/EmptyClients.cpp:
* page/EditorClient.h:

Source/WebKit:

* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::canonicalizeURL): Deleted.
(WebKit::WebEditorClient::canonicalizeURLString): Deleted.
(WebKit::WebEditorClient::writeDataToPasteboard): Deleted.
(WebKit::WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
(WebKit::WebEditorClient::readDataFromPasteboard): Deleted.
(WebKit::WebEditorClient::pasteboardChangeCount): Deleted.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::canonicalizeURL): Deleted.
(WebKit::WebEditorClient::canonicalizeURLString): Deleted.

Source/WebKitLegacy/mac:

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::canonicalizeURL): Deleted.
(WebEditorClient::canonicalizeURLString): Deleted.
(WebEditorClient::writeDataToPasteboard): Deleted.
(WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
(WebEditorClient::readDataFromPasteboard): Deleted.
(WebEditorClient::pasteboardChangeCount): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222477 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/page/EditorClient.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h
Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm
Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm

index b4ff011..29601bd 100644 (file)
@@ -1,3 +1,15 @@
+2017-09-25  Sam Weinig  <sam@webkit.org>
+
+        Remove unused EditorClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=177463
+
+        Reviewed by Alex Christensen.
+
+        Remove unused EditorClient functions.
+
+        * loader/EmptyClients.cpp:
+        * page/EditorClient.h:
+
 2017-09-25  Per Arne Vollan  <pvollan@apple.com>
 
         Crash in WebCore::TreeScope::documentScope
index c22adf2..1b9989c 100644 (file)
@@ -204,22 +204,16 @@ private:
 #if PLATFORM(IOS)
     void startDelayingAndCoalescingContentChangeNotifications() final { }
     void stopDelayingAndCoalescingContentChangeNotifications() final { }
-    void writeDataToPasteboard(NSDictionary*) final { }
-    NSArray* supportedPasteboardTypesForCurrentSelection() final { return nullptr; }
-    NSArray* readDataFromPasteboard(NSString*, int) final { return nullptr; }
     bool hasRichlyEditableSelection() final { return false; }
     int getPasteboardItemsCount() final { return 0; }
     RefPtr<DocumentFragment> documentFragmentFromDelegate(int) final { return nullptr; }
     bool performsTwoStepPaste(DocumentFragment*) final { return false; }
-    int pasteboardChangeCount() final { return 0; }
 #endif
 
     bool performTwoStepDrop(DocumentFragment&, Range&, bool) final { return false; }
 
 #if PLATFORM(COCOA)
     void setInsertionPasteboard(const String&) final { };
-    NSURL *canonicalizeURL(NSURL *) final { return nullptr; }
-    NSURL *canonicalizeURLString(NSString *) final { return nullptr; }
 #endif
 
 #if USE(APPKIT)
index 675ce90..e0840b1 100644 (file)
 #include <wtf/Forward.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(COCOA)
-OBJC_CLASS NSString;
-OBJC_CLASS NSURL;
-#endif
-
-#if PLATFORM(IOS)
-OBJC_CLASS NSArray;
-OBJC_CLASS NSDictionary;
-#endif
-
 namespace WebCore {
 
-class ArchiveResource;
 class DocumentFragment;
-class Editor;
 class Element;
 class Frame;
-class HTMLElement;
 class KeyboardEvent;
-class LayoutRect;
 class Node;
 class Range;
 class SharedBuffer;
 class StyleProperties;
 class TextCheckerClient;
 class VisibleSelection;
-class VisiblePosition;
 
 struct GapRects;
 struct GrammarDetail;
@@ -131,20 +116,14 @@ public:
 #if PLATFORM(IOS)
     virtual void startDelayingAndCoalescingContentChangeNotifications() = 0;
     virtual void stopDelayingAndCoalescingContentChangeNotifications() = 0;
-    virtual void writeDataToPasteboard(NSDictionary*) = 0;
-    virtual NSArray* supportedPasteboardTypesForCurrentSelection() = 0;
-    virtual NSArray* readDataFromPasteboard(NSString* type, int index) = 0;
     virtual bool hasRichlyEditableSelection() = 0;
     virtual int getPasteboardItemsCount() = 0;
     virtual RefPtr<DocumentFragment> documentFragmentFromDelegate(int index) = 0;
     virtual bool performsTwoStepPaste(DocumentFragment*) = 0;
-    virtual int pasteboardChangeCount() = 0;
 #endif
 
 #if PLATFORM(COCOA)
     virtual void setInsertionPasteboard(const String& pasteboardName) = 0;
-    virtual NSURL *canonicalizeURL(NSURL *) = 0;
-    virtual NSURL *canonicalizeURLString(NSString *) = 0;
 #endif
 
 #if USE(APPKIT)
index dd85685..6916250 100644 (file)
@@ -1,3 +1,24 @@
+2017-09-25  Sam Weinig  <sam@webkit.org>
+
+        Remove unused EditorClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=177463
+
+        Reviewed by Alex Christensen.
+
+        Remove unused EditorClient functions.
+
+        * WebProcess/WebCoreSupport/WebEditorClient.h:
+        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
+        (WebKit::WebEditorClient::canonicalizeURL): Deleted.
+        (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
+        (WebKit::WebEditorClient::writeDataToPasteboard): Deleted.
+        (WebKit::WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
+        (WebKit::WebEditorClient::readDataFromPasteboard): Deleted.
+        (WebKit::WebEditorClient::pasteboardChangeCount): Deleted.
+        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
+        (WebKit::WebEditorClient::canonicalizeURL): Deleted.
+        (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
+
 2017-09-25  Alex Christensen  <achristensen@webkit.org>
 
         Make Attribute an enum class
index 0a641b8..4154f9a 100644 (file)
@@ -97,8 +97,6 @@ private:
 
 #if PLATFORM(COCOA)
     void setInsertionPasteboard(const String& pasteboardName) final;
-    NSURL *canonicalizeURL(NSURL *) final;
-    NSURL *canonicalizeURLString(NSString *) final;
 #endif
 
 #if USE(APPKIT)
@@ -158,14 +156,10 @@ private:
 #if PLATFORM(IOS)
     void startDelayingAndCoalescingContentChangeNotifications() final;
     void stopDelayingAndCoalescingContentChangeNotifications() final;
-    void writeDataToPasteboard(NSDictionary*) final;
-    NSArray *supportedPasteboardTypesForCurrentSelection() final;
-    NSArray *readDataFromPasteboard(NSString* type, int index) final;
     bool hasRichlyEditableSelection() final;
     int getPasteboardItemsCount() final;
     RefPtr<WebCore::DocumentFragment> documentFragmentFromDelegate(int index) final;
     bool performsTwoStepPaste(WebCore::DocumentFragment*) final;
-    int pasteboardChangeCount() final;
 #endif
 
     bool performTwoStepDrop(WebCore::DocumentFragment&, WebCore::Range&, bool isMove) final;
index df3658c..51b85b9 100644 (file)
@@ -48,18 +48,6 @@ void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
     notImplemented();
 }
 
-NSURL *WebEditorClient::canonicalizeURL(NSURL *)
-{
-    notImplemented();
-    return nil;
-}
-
-NSURL *WebEditorClient::canonicalizeURLString(NSString *)
-{
-    notImplemented();
-    return nil;
-}
-
 void WebEditorClient::setInsertionPasteboard(const String&)
 {
     // This is used only by Mail, no need to implement it now.
@@ -76,23 +64,6 @@ void WebEditorClient::stopDelayingAndCoalescingContentChangeNotifications()
     notImplemented();
 }
 
-void WebEditorClient::writeDataToPasteboard(NSDictionary*)
-{
-    notImplemented();
-}
-
-NSArray* WebEditorClient::supportedPasteboardTypesForCurrentSelection()
-{
-    notImplemented();
-    return 0;
-}
-
-NSArray* WebEditorClient::readDataFromPasteboard(NSString*, int)
-{
-    notImplemented();
-    return 0;
-}
-
 bool WebEditorClient::hasRichlyEditableSelection()
 {
     return m_page->hasRichlyEditableSelection();
@@ -116,12 +87,6 @@ bool WebEditorClient::performsTwoStepPaste(WebCore::DocumentFragment*)
     return false;
 }
 
-int WebEditorClient::pasteboardChangeCount()
-{
-    notImplemented();
-    return 0;
-}
-
 void WebEditorClient::overflowScrollPositionChanged()
 {
     m_page->didChangeSelection();
index 0d0a8b8..5f1eb29 100644 (file)
@@ -58,19 +58,6 @@ void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
         event->setDefaultHandled();
 }
 
-NSURL *WebEditorClient::canonicalizeURL(NSURL *url)
-{
-    return URLByCanonicalizingURL(url);
-}
-
-NSURL *WebEditorClient::canonicalizeURLString(NSString *URLString)
-{
-    NSURL *URL = nil;
-    if (looksLikeAbsoluteURL(URLString))
-        URL = URLByCanonicalizingURL(URLWithUserTypedString(URLString, nil));
-    return URL;
-}
-
 void WebEditorClient::setInsertionPasteboard(const String&)
 {
     // This is used only by Mail, no need to implement it now.
index 515690b..3ba7d90 100644 (file)
@@ -1,3 +1,21 @@
+2017-09-25  Sam Weinig  <sam@webkit.org>
+
+        Remove unused EditorClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=177463
+
+        Reviewed by Alex Christensen.
+
+        Remove unused EditorClient functions.
+
+        * WebCoreSupport/WebEditorClient.h:
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::canonicalizeURL): Deleted.
+        (WebEditorClient::canonicalizeURLString): Deleted.
+        (WebEditorClient::writeDataToPasteboard): Deleted.
+        (WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
+        (WebEditorClient::readDataFromPasteboard): Deleted.
+        (WebEditorClient::pasteboardChangeCount): Deleted.
+
 2017-09-25  Alex Christensen  <achristensen@webkit.org>
 
         Stop using PolicyCallback
index 8cffd59..4511947 100644 (file)
@@ -80,8 +80,6 @@ private:
     void getClientPasteboardDataForRange(WebCore::Range*, Vector<String>& pasteboardTypes, Vector<RefPtr<WebCore::SharedBuffer>>& pasteboardData) final;
 
     void setInsertionPasteboard(const String&) final;
-    NSURL *canonicalizeURL(NSURL *) final;
-    NSURL *canonicalizeURLString(NSString *) final;
 
 #if USE(APPKIT)
     void uppercaseWord() final;
@@ -141,14 +139,10 @@ private:
 #if PLATFORM(IOS)
     void startDelayingAndCoalescingContentChangeNotifications() final;
     void stopDelayingAndCoalescingContentChangeNotifications() final;
-    void writeDataToPasteboard(NSDictionary*) final;
-    NSArray* supportedPasteboardTypesForCurrentSelection() final;
-    NSArray* readDataFromPasteboard(NSString* type, int index) final;
     bool hasRichlyEditableSelection() final;
     int getPasteboardItemsCount() final;
     RefPtr<WebCore::DocumentFragment> documentFragmentFromDelegate(int index) final;
     bool performsTwoStepPaste(WebCore::DocumentFragment*) final;
-    int pasteboardChangeCount() final;
 #endif
 
     bool performTwoStepDrop(WebCore::DocumentFragment&, WebCore::Range& destination, bool isMove) final;
index d57c2f5..523d22e 100644 (file)
@@ -418,19 +418,6 @@ void WebEditorClient::getClientPasteboardDataForRange(WebCore::Range*, Vector<St
     // Not implemented WebKit, only WebKit2.
 }
 
-NSURL *WebEditorClient::canonicalizeURL(NSURL *URL)
-{
-    return [URL _webkit_canonicalize];
-}
-
-NSURL *WebEditorClient::canonicalizeURLString(NSString *URLString)
-{
-    NSURL *URL = nil;
-    if ([URLString _webkit_looksLikeAbsoluteURL])
-        URL = [[NSURL _webkit_URLWithUserTypedString:URLString] _webkit_canonicalize];
-    return URL;
-}
-
 #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)
 
 // FIXME: Remove both this stub and the real version of this function below once we don't need the real version on any supported platform.
@@ -879,28 +866,6 @@ void WebEditorClient::textDidChangeInTextArea(Element* element)
 
 #if PLATFORM(IOS)
 
-void WebEditorClient::writeDataToPasteboard(NSDictionary* representation)
-{
-    if ([[m_webView _UIKitDelegateForwarder] respondsToSelector:@selector(writeDataToPasteboard:)])
-        [[m_webView _UIKitDelegateForwarder] writeDataToPasteboard:representation];
-}
-
-NSArray *WebEditorClient::supportedPasteboardTypesForCurrentSelection()
-{
-    if ([[m_webView _UIKitDelegateForwarder] respondsToSelector:@selector(supportedPasteboardTypesForCurrentSelection)]) 
-        return [[m_webView _UIKitDelegateForwarder] supportedPasteboardTypesForCurrentSelection]; 
-
-    return nil; 
-}
-
-NSArray *WebEditorClient::readDataFromPasteboard(NSString* type, int index)
-{
-    if ([[m_webView _UIKitDelegateForwarder] respondsToSelector:@selector(readDataFromPasteboard:withIndex:)])
-        return [[m_webView _UIKitDelegateForwarder] readDataFromPasteboard:type withIndex:index];
-    
-    return nil;
-}
-
 bool WebEditorClient::hasRichlyEditableSelection()
 {
     if ([[m_webView _UIKitDelegateForwarder] respondsToSelector:@selector(hasRichlyEditableSelection)])
@@ -944,14 +909,6 @@ bool WebEditorClient::performTwoStepDrop(DocumentFragment& fragment, Range& dest
     return false;
 }
 
-int WebEditorClient::pasteboardChangeCount()
-{
-    if ([[m_webView _UIKitDelegateForwarder] respondsToSelector:@selector(getPasteboardChangeCount)])
-        return [[m_webView _UIKitDelegateForwarder] getPasteboardChangeCount];
-    
-    return 0;
-}
-
 Vector<TextCheckingResult> WebEditorClient::checkTextOfParagraph(StringView string, TextCheckingTypeMask checkingTypes, const VisibleSelection&)
 {
     ASSERT(checkingTypes & NSTextCheckingTypeSpelling);