2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Feb 2011 08:21:50 +0000 (08:21 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Feb 2011 08:21:50 +0000 (08:21 +0000)
        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * src/EditorClientImpl.cpp:
        (WebKit::EditorClientImpl::canCopyCut): Added.
        (WebKit::EditorClientImpl::canPaste): Added.
        * src/EditorClientImpl.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/EditorClientQt.cpp:
        (WebCore::EditorClientQt::canCopyCut): Added.
        (WebCore::EditorClientQt::canPaste): Added.
        * WebCoreSupport/EditorClientQt.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/EditorClientGtk.cpp:
        (WebKit::EditorClient::canCopyCut): Added.
        (WebKit::EditorClient::canPaste): Added.
        * WebCoreSupport/EditorClientGtk.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/WebEditorClient.cpp:
        (WebEditorClient::canCopyCut): Added.
        (WebEditorClient::canPaste): Added.
        * WebCoreSupport/WebEditorClient.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebKitSupport/EditorClientWx.cpp:
        (WebCore::EditorClientWx::canCopyCut): Added.
        (WebCore::EditorClientWx::canPaste): Added.
        * WebKitSupport/EditorClientWx.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::canCopyCut): Added.
        (WebEditorClient::canPaste): Added.
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/EditorClientHaiku.cpp:
        (WebCore::EditorClientHaiku::canCopyCut): Added.
        (WebCore::EditorClientHaiku::canPaste): Added.
        * WebCoreSupport/EditorClientHaiku.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/EditorClientWinCE.cpp:
        (WebKit::EditorClientWinCE::canCopyCut): Added.
        (WebKit::EditorClientWinCE::canPaste): Added.
        * WebCoreSupport/EditorClientWinCE.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebCoreSupport/EditorClientEfl.cpp:
        (WebCore::EditorClientEfl::canCopyCut): Added.
        (WebCore::EditorClientEfl::canPaste): Added.
        * WebCoreSupport/EditorClientEfl.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. These functions
        returns true iff the current frame should be able to copy/cut and paste respectively.
        They take the default value determined by isDOMPasteAllowed and javaScriptCanAccessClipboard.

        These callbacks allows embedders to decide whether or not copy/cut/paste should be enabled
        per frame and thus per origin rather than per page.

        No new tests are added since this is a WebKit/WebCore interface change.

        * editing/EditorCommand.cpp:
        (WebCore::supportedCopyCut): Calls canCopyCut.
        (WebCore::supportedPaste): Calls canPaste.
        * loader/EmptyClients.h:
        (WebCore::EmptyEditorClient::canCopyCut): Added.
        (WebCore::EmptyEditorClient::canPaste): Added.
        * page/EditorClient.h:
2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Adam Barth.

        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=52417

        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
        not implemented.

        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::canCopyCut): Added.
        (WebKit::WebEditorClient::canPaste): Added.
        * WebProcess/WebCoreSupport/WebEditorClient.h:

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

34 files changed:
Source/WebCore/ChangeLog
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/EditorClient.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/EditorClientImpl.cpp
Source/WebKit/chromium/src/EditorClientImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
Source/WebKit/haiku/ChangeLog
Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp
Source/WebKit/win/WebCoreSupport/WebEditorClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp
Source/WebKit/wx/WebKitSupport/EditorClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h

index e8217a2..e7a70d5 100644 (file)
@@ -1,3 +1,27 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. These functions
+        returns true iff the current frame should be able to copy/cut and paste respectively.
+        They take the default value determined by isDOMPasteAllowed and javaScriptCanAccessClipboard.
+
+        These callbacks allows embedders to decide whether or not copy/cut/paste should be enabled
+        per frame and thus per origin rather than per page.
+
+        No new tests are added since this is a WebKit/WebCore interface change.
+
+        * editing/EditorCommand.cpp:
+        (WebCore::supportedCopyCut): Calls canCopyCut.
+        (WebCore::supportedPaste): Calls canPaste.
+        * loader/EmptyClients.h:
+        (WebCore::EmptyEditorClient::canCopyCut): Added.
+        (WebCore::EmptyEditorClient::canPaste): Added.
+        * page/EditorClient.h:
+
 2011-02-14  Jeremy Orlow  <jorlow@chromium.org>
 
         efl build fix
index 451d855..3d9e2b6 100644 (file)
@@ -1121,14 +1121,26 @@ static bool supportedFromMenuOrKeyBinding(Frame*)
 
 static bool supportedCopyCut(Frame* frame)
 {
-    Settings* settings = frame ? frame->settings() : 0;
-    return settings && settings->javaScriptCanAccessClipboard();
+    if (!frame)
+        return false;
+
+    Settings* settings = frame->settings();
+    bool defaultValue = settings && settings->javaScriptCanAccessClipboard();
+
+    EditorClient* client = frame->editor()->client();
+    return client ? client->canCopyCut(defaultValue) : defaultValue;
 }
 
 static bool supportedPaste(Frame* frame)
 {
-    Settings* settings = frame ? frame->settings() : 0;
-    return settings && (settings->javaScriptCanAccessClipboard() ? settings->isDOMPasteAllowed() : 0);
+    if (!frame)
+        return false;
+
+    Settings* settings = frame->settings();
+    bool defaultValue = settings && settings->javaScriptCanAccessClipboard() && settings->isDOMPasteAllowed();
+
+    EditorClient* client = frame->editor()->client();
+    return client ? client->canPaste(defaultValue) : defaultValue;
 }
 
 // Enabled functions
index ec79476..2fccc65 100644 (file)
@@ -441,6 +441,8 @@ public:
     virtual void registerCommandForRedo(PassRefPtr<EditCommand>) { }
     virtual void clearUndoRedoOperations() { }
 
+    virtual bool canCopyCut(bool defaultValue) const { return defaultValue; }
+    virtual bool canPaste(bool defaultValue) const { return defaultValue; }
     virtual bool canUndo() const { return false; }
     virtual bool canRedo() const { return false; }
 
index c805920..1e5444e 100644 (file)
@@ -132,6 +132,8 @@ public:
     virtual void registerCommandForRedo(PassRefPtr<EditCommand>) = 0;
     virtual void clearUndoRedoOperations() = 0;
 
+    virtual bool canCopyCut(bool defaultValue) const = 0;
+    virtual bool canPaste(bool defaultValue) const = 0;
     virtual bool canUndo() const = 0;
     virtual bool canRedo() const = 0;
     
index 7fcfb02..bfd0227 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * src/EditorClientImpl.cpp:
+        (WebKit::EditorClientImpl::canCopyCut): Added.
+        (WebKit::EditorClientImpl::canPaste): Added.
+        * src/EditorClientImpl.h:
+
 2011-02-14  Jay Soffian  <jaysoffian@gmail.com>
 
         Reviewed by Darin Fisher.
index 3dc3a6a..f5b2974 100644 (file)
@@ -324,6 +324,16 @@ void EditorClientImpl::clearUndoRedoOperations()
     m_redoStack.clear();
 }
 
+bool EditorClientImpl::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClientImpl::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClientImpl::canUndo() const
 {
     return !m_undoStack.isEmpty();
index 8c40f3c..d74235b 100644 (file)
@@ -79,6 +79,8 @@ public:
     virtual void registerCommandForUndo(PassRefPtr<WebCore::EditCommand>);
     virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>);
     virtual void clearUndoRedoOperations();
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;
     virtual void undo();
index 2068ccc..d656e1e 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/EditorClientEfl.cpp:
+        (WebCore::EditorClientEfl::canCopyCut): Added.
+        (WebCore::EditorClientEfl::canPaste): Added.
+        * WebCoreSupport/EditorClientEfl.h:
+
 2011-02-08  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index a9e45dd..708e813 100644 (file)
@@ -166,6 +166,16 @@ void EditorClientEfl::clearUndoRedoOperations()
     notImplemented();
 }
 
+bool EditorClientEfl::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClientEfl::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClientEfl::canUndo() const
 {
     notImplemented();
index e25b1e6..fd25944 100644 (file)
@@ -83,6 +83,8 @@ public:
     virtual void registerCommandForRedo(WTF::PassRefPtr<EditCommand>);
     virtual void clearUndoRedoOperations();
 
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;
 
index 0d2778e..5a776d7 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/EditorClientGtk.cpp:
+        (WebKit::EditorClient::canCopyCut): Added.
+        (WebKit::EditorClient::canPaste): Added.
+        * WebCoreSupport/EditorClientGtk.h:
+
 2011-02-14  Alejandro G. Castro  <alex@igalia.com>
 
         Reviewed by Xan Lopez.
index ee9bf9a..cd39522 100644 (file)
@@ -506,6 +506,16 @@ void EditorClient::clearUndoRedoOperations()
     redoStack.clear();
 }
 
+bool EditorClient::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClient::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClient::canUndo() const
 {
     return !undoStack.isEmpty();
index 214dbd6..8ae123d 100644 (file)
@@ -103,6 +103,8 @@ namespace WebKit {
         virtual void registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand>);
         virtual void clearUndoRedoOperations();
 
+        virtual bool canCopyCut(bool defaultValue) const;
+        virtual bool canPaste(bool defaultValue) const;
         virtual bool canUndo() const;
         virtual bool canRedo() const;
 
index 669aae4..fc5285a 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/EditorClientHaiku.cpp:
+        (WebCore::EditorClientHaiku::canCopyCut): Added.
+        (WebCore::EditorClientHaiku::canPaste): Added.
+        * WebCoreSupport/EditorClientHaiku.h:
+
 2011-02-08  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 2b175d8..31e7f58 100644 (file)
@@ -210,6 +210,16 @@ void EditorClientHaiku::clearUndoRedoOperations()
     notImplemented();
 }
 
+bool EditorClientHaiku::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClientHaiku::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClientHaiku::canUndo() const
 {
     notImplemented();
index ca270e9..4b28a84 100644 (file)
@@ -80,6 +80,8 @@ namespace WebCore {
         virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
         virtual void clearUndoRedoOperations();
 
+        virtual bool canCopyCut(bool defaultValue) const;
+        virtual bool canPaste(bool defaultValue) const;
         virtual bool canUndo() const;
         virtual bool canRedo() const;
 
index 4a3c74f..18fe235 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/WebEditorClient.h:
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::canCopyCut): Added.
+        (WebEditorClient::canPaste): Added.
+
 2011-02-11  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Oliver Hunt.
index d5ac891..211ed3b 100644 (file)
@@ -104,7 +104,9 @@ public:
     virtual void registerCommandForUndo(PassRefPtr<WebCore::EditCommand>);
     virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>);
     virtual void clearUndoRedoOperations();
-    
+
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;
     
index 5cbb0fe..934eed9 100644 (file)
@@ -594,6 +594,16 @@ void WebEditorClient::clearUndoRedoOperations()
     }    
 }
 
+bool WebEditorClient::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool WebEditorClient::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool WebEditorClient::canUndo() const
 {
     return [[m_webView undoManager] canUndo];
index 5017a16..c127cd6 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/EditorClientQt.cpp:
+        (WebCore::EditorClientQt::canCopyCut): Added.
+        (WebCore::EditorClientQt::canPaste): Added.
+        * WebCoreSupport/EditorClientQt.h:
+
 2011-02-14  Alexis Menard  <alexis.menard@nokia.com>
 
         Reviewed by Andreas Kling.
index ed6bc45..fbc5dbc 100644 (file)
@@ -264,6 +264,16 @@ void EditorClientQt::clearUndoRedoOperations()
 #endif
 }
 
+bool EditorClientQt::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClientQt::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClientQt::canUndo() const
 {
 #ifdef QT_NO_UNDOSTACK
index 1e410e6..c79a3a2 100644 (file)
@@ -79,6 +79,8 @@ public:
     virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
     virtual void clearUndoRedoOperations();
 
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;
     
index 8739600..dd2f349 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/WebEditorClient.cpp:
+        (WebEditorClient::canCopyCut): Added.
+        (WebEditorClient::canPaste): Added.
+        * WebCoreSupport/WebEditorClient.h:
+
 2011-02-14  Brian Weinstein  <bweinstein@apple.com>
 
         Reviewed by Brady Eidson.
index 539259b..dddc410 100644 (file)
@@ -569,6 +569,16 @@ void WebEditorClient::clearUndoRedoOperations()
     }
 }
 
+bool WebEditorClient::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool WebEditorClient::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool WebEditorClient::canUndo() const
 {
     BOOL result = FALSE;
index 358a365..de68660 100644 (file)
@@ -81,6 +81,8 @@ public:
     void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>);
     void clearUndoRedoOperations();
 
+    bool canCopyCut(bool defaultValue) const;
+    bool canPaste(bool defaultValue) const;
     bool canUndo() const;
     bool canRedo() const;
     
index 77d6ef3..dd1c3f7 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebCoreSupport/EditorClientWinCE.cpp:
+        (WebKit::EditorClientWinCE::canCopyCut): Added.
+        (WebKit::EditorClientWinCE::canPaste): Added.
+        * WebCoreSupport/EditorClientWinCE.h:
+
 2011-02-10  Nate Chapin  <japhet@chromium.org>
 
         Reviewed by Adam Barth.
index 77cc720..30afe26 100644 (file)
@@ -165,6 +165,16 @@ void EditorClientWinCE::clearUndoRedoOperations()
     notImplemented();
 }
 
+bool EditorClientWinCE::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClientWinCE::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClientWinCE::canUndo() const
 {
     notImplemented();
index 8db8c16..f360caf 100644 (file)
@@ -70,6 +70,8 @@ public:
     virtual void registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand>);
     virtual void clearUndoRedoOperations();
 
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;
 
index 13ab1b8..5ebf645 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebKitSupport/EditorClientWx.cpp:
+        (WebCore::EditorClientWx::canCopyCut): Added.
+        (WebCore::EditorClientWx::canPaste): Added.
+        * WebKitSupport/EditorClientWx.h:
+
 2011-02-10  Nate Chapin  <japhet@chromium.org>
 
         Reviewed by Adam Barth.
index 5601364..52b2032 100644 (file)
@@ -325,6 +325,16 @@ void EditorClientWx::clearUndoRedoOperations()
     }
 }
 
+bool EditorClientWx::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool EditorClientWx::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool EditorClientWx::canUndo() const
 {
     Frame* frame = m_page->focusController()->focusedOrMainFrame();
index 7dbee31..b299c65 100644 (file)
@@ -81,6 +81,8 @@ public:
     virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
     virtual void clearUndoRedoOperations();
 
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;
 
index 611e285..aeb7983 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=52417
+
+        Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+        not implemented.
+
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit::WebEditorClient::canCopyCut): Added.
+        (WebKit::WebEditorClient::canPaste): Added.
+        * WebProcess/WebCoreSupport/WebEditorClient.h:
+
 2011-02-14  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Dan Bernstein.
index 5ed1c60..3dcf5d8 100644 (file)
@@ -251,6 +251,16 @@ void WebEditorClient::clearUndoRedoOperations()
     m_page->send(Messages::WebPageProxy::ClearAllEditCommands());
 }
 
+bool WebEditorClient::canCopyCut(bool defaultValue) const
+{
+    return defaultValue;
+}
+
+bool WebEditorClient::canPaste(bool defaultValue) const
+{
+    return defaultValue;
+}
+
 bool WebEditorClient::canUndo() const
 {
     notImplemented();
index 40bd8c6..7ac813e 100644 (file)
@@ -74,6 +74,8 @@ private:
     virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>);
     virtual void clearUndoRedoOperations();
 
+    virtual bool canCopyCut(bool defaultValue) const;
+    virtual bool canPaste(bool defaultValue) const;
     virtual bool canUndo() const;
     virtual bool canRedo() const;