Disable delete button controller on non-Mac ports and delete EditorClient::shouldShow...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 04:55:35 +0000 (04:55 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 04:55:35 +0000 (04:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109534

Reviewed by Anders Carlsson.

Source/WebCore:

* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::show):
* editing/Editor.cpp:
(WebCore):
* editing/Editor.h:
(Editor):
* loader/EmptyClients.h:
(WebCore::EmptyEditorClient::shouldDeleteRange):
(EmptyEditorClient):
(WebCore::EmptyEditorClient::shouldShowDeleteInterface):
* page/EditorClient.h:
(EditorClient):

Source/WebKit/blackberry:

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore):
* WebCoreSupport/EditorClientBlackBerry.h:
(EditorClientBlackBerry):

Source/WebKit/chromium:

* src/EditorClientImpl.cpp:
(WebKit):
* src/EditorClientImpl.h:
(EditorClientImpl):

Source/WebKit/efl:

* WebCoreSupport/EditorClientEfl.cpp:
(WebCore):
* WebCoreSupport/EditorClientEfl.h:
(EditorClientEfl):

Source/WebKit/gtk:

* WebCoreSupport/EditorClientGtk.cpp:
(WebKit):
* WebCoreSupport/EditorClientGtk.h:
(EditorClient):
* webkit/webkitwebview.cpp:
(webkit_web_view_class_init):

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h:

Source/WebKit/qt:

* WebCoreSupport/EditorClientQt.cpp:
(WebCore):
* WebCoreSupport/EditorClientQt.h:
(EditorClientQt):

Source/WebKit/win:

* WebCoreSupport/WebEditorClient.cpp:
* WebCoreSupport/WebEditorClient.h:
(WebEditorClient):

Source/WebKit/wince:

* WebCoreSupport/EditorClientWinCE.cpp:
(WebKit):
* WebCoreSupport/EditorClientWinCE.h:
(EditorClientWinCE):

Source/WebKit/wx:

* WebKitSupport/EditorClientWx.cpp:
(WebCore):
* WebKitSupport/EditorClientWx.h:
(EditorClientWx):

Source/WebKit2:

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

Source/WTF:

* wtf/Platform.h:

Tools:

* DumpRenderTree/gtk/EditingCallbacks.cpp:
(shouldShowDeleteInterfaceForElement):

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

40 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/editing/DeleteButtonController.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/EditorClient.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.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/gtk/webkit/webkitwebview.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
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
Tools/ChangeLog
Tools/DumpRenderTree/gtk/EditingCallbacks.cpp

index c9f9b75..a50967f 100644 (file)
@@ -1,3 +1,12 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/Platform.h:
+
 2013-02-11  David Kilzer  <ddkilzer@apple.com>
 
         [iOS] Upstream changes to Platform.h
index fda345a..dede869 100644 (file)
 #endif
 
 #if !defined(ENABLE_DELETION_UI)
-#define ENABLE_DELETION_UI 1
+#define ENABLE_DELETION_UI 0
 #endif
 
 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
index 9bd12ff..ecaa58c 100644 (file)
@@ -1,3 +1,23 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * editing/DeleteButtonController.cpp:
+        (WebCore::DeleteButtonController::show):
+        * editing/Editor.cpp:
+        (WebCore):
+        * editing/Editor.h:
+        (Editor):
+        * loader/EmptyClients.h:
+        (WebCore::EmptyEditorClient::shouldDeleteRange):
+        (EmptyEditorClient):
+        (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
+        * page/EditorClient.h:
+        (EditorClient):
+
 2013-02-11  Hayato Ito  <hayato@chromium.org>
 
         Factor EventContext and introduces MouseOrFocusEventContext.
index d9ef596..ed4b3b7 100644 (file)
@@ -34,6 +34,7 @@
 #include "DeleteButton.h"
 #include "Document.h"
 #include "Editor.h"
+#include "EditorClient.h"
 #include "Frame.h"
 #include "FrameSelection.h"
 #include "htmlediting.h"
@@ -282,7 +283,8 @@ void DeleteButtonController::show(HTMLElement* element)
     if (!enabled() || !element || !element->inDocument() || !isDeletableElement(element))
         return;
 
-    if (!m_frame->editor()->shouldShowDeleteInterface(element))
+    EditorClient* client = m_frame->editor()->client();
+    if (!client || !client->shouldShowDeleteInterface(element))
         return;
 
     // we rely on the renderer having current information, so we should update the layout if needed
index f46a28f..91f56c7 100644 (file)
@@ -474,11 +474,6 @@ bool Editor::shouldInsertText(const String& text, Range* range, EditorInsertActi
     return client() && client()->shouldInsertText(text, range, action);
 }
 
-bool Editor::shouldShowDeleteInterface(HTMLElement* element) const
-{
-    return client() && client()->shouldShowDeleteInterface(element);
-}
-
 void Editor::notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions options)
 {
     if (client())
index a035f6b..4cda99a 100644 (file)
@@ -136,7 +136,6 @@ public:
 
     bool shouldInsertFragment(PassRefPtr<DocumentFragment>, PassRefPtr<Range>, EditorInsertAction);
     bool shouldInsertText(const String&, Range*, EditorInsertAction) const;
-    bool shouldShowDeleteInterface(HTMLElement*) const;
     bool shouldDeleteRange(Range*) const;
     bool shouldApplyStyle(StylePropertySet*, Range*);
 
index 3661ec3..1e1a14c 100644 (file)
@@ -412,7 +412,6 @@ public:
     virtual void frameWillDetachPage(Frame*) { }
 
     virtual bool shouldDeleteRange(Range*) { return false; }
-    virtual bool shouldShowDeleteInterface(HTMLElement*) { return false; }
     virtual bool smartInsertDeleteEnabled() { return false; }
     virtual bool isSelectTrailingWhitespaceEnabled() { return false; }
     virtual bool isContinuousSpellCheckingEnabled() { return false; }
@@ -479,6 +478,7 @@ public:
     virtual void lowercaseWord() { }
     virtual void capitalizeWord() { }
 #endif
+
 #if USE(AUTOMATIC_TEXT_REPLACEMENT)
     virtual void showSubstitutionsPanel(bool) { }
     virtual bool substitutionsPanelIsShowing() { return false; }
@@ -494,6 +494,11 @@ public:
     virtual bool isAutomaticSpellingCorrectionEnabled() { return false; }
     virtual void toggleAutomaticSpellingCorrection() { }
 #endif
+
+#if ENABLE(DELETION_UI)
+    virtual bool shouldShowDeleteInterface(HTMLElement*) { return false; }
+#endif
+
 #if PLATFORM(GTK)
     virtual bool shouldShowUnicodeMenu() { return false; }
 #endif
index 2993ebd..c8bb3e4 100644 (file)
@@ -68,7 +68,6 @@ public:
     virtual void frameWillDetachPage(Frame*) = 0;
 
     virtual bool shouldDeleteRange(Range*) = 0;
-    virtual bool shouldShowDeleteInterface(HTMLElement*) = 0;
     virtual bool smartInsertDeleteEnabled() = 0; 
     virtual bool isSelectTrailingWhitespaceEnabled() = 0;
     virtual bool isContinuousSpellCheckingEnabled() = 0;
@@ -130,6 +129,7 @@ public:
     virtual void lowercaseWord() = 0;
     virtual void capitalizeWord() = 0;
 #endif
+
 #if USE(AUTOMATIC_TEXT_REPLACEMENT)
     virtual void showSubstitutionsPanel(bool show) = 0;
     virtual bool substitutionsPanelIsShowing() = 0;
@@ -145,6 +145,10 @@ public:
     virtual bool isAutomaticSpellingCorrectionEnabled() = 0;
     virtual void toggleAutomaticSpellingCorrection() = 0;
 #endif
+    
+#if ENABLE(DELETION_UI)
+    virtual bool shouldShowDeleteInterface(HTMLElement*) = 0;
+#endif
 
 #if PLATFORM(GTK)
     virtual bool shouldShowUnicodeMenu() = 0;
index f77ed5b..f8128cb 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/EditorClientBlackBerry.cpp:
+        (WebCore):
+        * WebCoreSupport/EditorClientBlackBerry.h:
+        (EditorClientBlackBerry):
+
 2013-02-11  Mike Fenton  <mifenton@rim.com>
 
         [BlackBerry] Add form navigation control state tracking.
index 10867b1..d515f88 100644 (file)
@@ -67,12 +67,6 @@ bool EditorClientBlackBerry::shouldDeleteRange(Range* range)
     return true;
 }
 
-bool EditorClientBlackBerry::shouldShowDeleteInterface(HTMLElement*)
-{
-    notImplemented();
-    return false;
-}
-
 bool EditorClientBlackBerry::smartInsertDeleteEnabled()
 {
     notImplemented();
index 89180de..9819153 100644 (file)
@@ -39,7 +39,6 @@ public:
     virtual void pageDestroyed();
     virtual void frameWillDetachPage(Frame*) { }
     virtual bool shouldDeleteRange(Range*);
-    virtual bool shouldShowDeleteInterface(HTMLElement*);
     virtual bool smartInsertDeleteEnabled();
     virtual bool isSelectTrailingWhitespaceEnabled();
     virtual bool isContinuousSpellCheckingEnabled();
index 1fec864..8760f1f 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * src/EditorClientImpl.cpp:
+        (WebKit):
+        * src/EditorClientImpl.h:
+        (EditorClientImpl):
+
 2013-02-11  Alexandre Elias  <aelias@chromium.org>
 
         [chromium] Apply page scale to all WebInputEvent types
index 3145dd5..c3a0f91 100644 (file)
@@ -92,15 +92,6 @@ void EditorClientImpl::frameWillDetachPage(WebCore::Frame* frame)
 {
 }
 
-bool EditorClientImpl::shouldShowDeleteInterface(HTMLElement* elem)
-{
-    // Normally, we don't care to show WebCore's deletion UI, so we only enable
-    // it if in testing mode and the test specifically requests it by using this
-    // magic class name.
-    return layoutTestMode()
-           && elem->getAttribute(HTMLNames::classAttr) == "needsDeletionUI";
-}
-
 bool EditorClientImpl::smartInsertDeleteEnabled()
 {
     if (m_webView->client())
index 9882c76..e4238fd 100644 (file)
@@ -54,7 +54,6 @@ public:
     virtual void pageDestroyed();
     virtual void frameWillDetachPage(WebCore::Frame*) OVERRIDE;
 
-    virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*);
     virtual bool smartInsertDeleteEnabled();
     virtual bool isSelectTrailingWhitespaceEnabled();
     virtual bool isContinuousSpellCheckingEnabled();
index 6b7dc02..0779366 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/EditorClientEfl.cpp:
+        (WebCore):
+        * WebCoreSupport/EditorClientEfl.h:
+        (EditorClientEfl):
+
 2013-02-08  Benjamin Poulain  <bpoulain@apple.com>
 
         Move workerThreadCount from TestRunner to WebCore Internals
index 45d5be9..a4c9fd1 100644 (file)
@@ -60,11 +60,6 @@ bool EditorClientEfl::shouldDeleteRange(Range* range)
     return true;
 }
 
-bool EditorClientEfl::shouldShowDeleteInterface(HTMLElement*)
-{
-    return false;
-}
-
 bool EditorClientEfl::isContinuousSpellCheckingEnabled()
 {
     notImplemented();
index a15b414..93c5aa9 100644 (file)
@@ -83,7 +83,6 @@ public:
     virtual void frameWillDetachPage(Frame*) { }
 
     virtual bool shouldDeleteRange(Range*);
-    virtual bool shouldShowDeleteInterface(HTMLElement*);
     virtual bool smartInsertDeleteEnabled();
     void setSmartInsertDeleteEnabled(bool);
     virtual bool isSelectTrailingWhitespaceEnabled();
index ac75ca6..02639e5 100644 (file)
@@ -1,3 +1,17 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/EditorClientGtk.cpp:
+        (WebKit):
+        * WebCoreSupport/EditorClientGtk.h:
+        (EditorClient):
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_class_init):
+
 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
 
         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
index 90011a7..63bd817 100644 (file)
@@ -94,14 +94,6 @@ bool EditorClient::shouldDeleteRange(Range* range)
     return accept;
 }
 
-bool EditorClient::shouldShowDeleteInterface(HTMLElement* element)
-{
-    gboolean accept = FALSE;
-    GRefPtr<WebKitDOMHTMLElement> kitElement(adoptGRef(kit(element)));
-    g_signal_emit_by_name(m_webView, "should-show-delete-interface-for-element", kitElement.get(), &accept);
-    return accept;
-}
-
 bool EditorClient::isContinuousSpellCheckingEnabled()
 {
     WebKitWebSettings* settings = webkit_web_view_get_settings(m_webView);
index 877e3be..3a7eaf1 100644 (file)
@@ -74,7 +74,6 @@ class EditorClient : public WebCore::EditorClient {
         virtual void frameWillDetachPage(WebCore::Frame*) { }
 
         virtual bool shouldDeleteRange(WebCore::Range*);
-        virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*);
         virtual bool smartInsertDeleteEnabled();
         void setSmartInsertDeleteEnabled(bool);
         virtual bool isSelectTrailingWhitespaceEnabled();
index e9b9f76..4d16716 100644 (file)
@@ -2647,6 +2647,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         webkit_marshal_BOOLEAN__STRING_OBJECT_ENUM, G_TYPE_BOOLEAN,
         3, G_TYPE_STRING, WEBKIT_TYPE_DOM_RANGE, WEBKIT_TYPE_INSERT_ACTION);
 
+    // Only exists for GTK+ API compatbiility.
     webkit_web_view_signals[SHOULD_DELETE_RANGE] = g_signal_new("should-delete-range", G_TYPE_FROM_CLASS(webViewClass),
         static_cast<GSignalFlags>(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
         G_STRUCT_OFFSET(WebKitWebViewClass, should_allow_editing_action), g_signal_accumulator_first_wins, 0,
index 114f269..f6ef18f 100644 (file)
@@ -1,3 +1,12 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebEditorClient.h:
+
 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
 
         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
index 9d58903..9864f13 100644 (file)
@@ -53,7 +53,6 @@ public:
     virtual bool isSelectTrailingWhitespaceEnabled() OVERRIDE;
 
     virtual bool shouldDeleteRange(WebCore::Range*) OVERRIDE;
-    virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*) OVERRIDE;
 
     virtual bool shouldBeginEditing(WebCore::Range*) OVERRIDE;
     virtual bool shouldEndEditing(WebCore::Range*) OVERRIDE;
@@ -100,6 +99,10 @@ public:
     virtual void toggleAutomaticSpellingCorrection() OVERRIDE;
 #endif
 
+#if ENABLE(DELETION_UI)
+    virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*) OVERRIDE;
+#endif
+
     TextCheckerClient* textChecker() OVERRIDE { return this; }
 
     virtual void respondToChangedContents() OVERRIDE;
index edc2783..6300f28 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/EditorClientQt.cpp:
+        (WebCore):
+        * WebCoreSupport/EditorClientQt.h:
+        (EditorClientQt):
+
 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
 
         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
index a16b219..afcc8d6 100644 (file)
@@ -101,13 +101,6 @@ bool EditorClientQt::shouldDeleteRange(Range* range)
     return true;
 }
 
-bool EditorClientQt::shouldShowDeleteInterface(HTMLElement* element)
-{
-    if (QWebPageAdapter::drtRun)
-        return element->getAttribute(classAttr) == "needsDeletionUI";
-    return false;
-}
-
 bool EditorClientQt::isContinuousSpellCheckingEnabled()
 {
     return m_textCheckerClient.isContinousSpellCheckingEnabled();
index ad6a2bb..a134f5e 100644 (file)
@@ -48,7 +48,6 @@ public:
     virtual void frameWillDetachPage(Frame*) { }
     
     virtual bool shouldDeleteRange(Range*);
-    virtual bool shouldShowDeleteInterface(HTMLElement*);
     virtual bool smartInsertDeleteEnabled(); 
     virtual void toggleSmartInsertDelete();
     virtual bool isSelectTrailingWhitespaceEnabled(); 
index b4b190b..3bb4e40 100644 (file)
@@ -1,3 +1,14 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebEditorClient.cpp:
+        * WebCoreSupport/WebEditorClient.h:
+        (WebEditorClient):
+
 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
 
         Build fix for Windows after r142509
index c1a0c2f..d987892 100644 (file)
@@ -301,9 +301,6 @@ void WebEditorClient::webViewDidChangeTypingStyle(WebNotification* /*notificatio
 void WebEditorClient::webViewDidChangeSelection(WebNotification* /*notification*/)
 {  notImplemented(); }
 
-bool WebEditorClient::shouldShowDeleteInterface(HTMLElement* /*element*/)
-{ notImplemented(); return false; }
-
 bool WebEditorClient::smartInsertDeleteEnabled(void)
 { 
     BOOL enabled = FALSE; 
index f3acf9c..27f2677 100644 (file)
@@ -63,7 +63,6 @@ public:
     virtual void respondToChangedContents();
     virtual void respondToChangedSelection(WebCore::Frame*);
 
-    bool shouldShowDeleteInterface(WebCore::HTMLElement*);
     bool shouldDeleteRange(WebCore::Range*);
 
     bool shouldInsertNode(WebCore::Node*, WebCore::Range* replacingRange, WebCore::EditorInsertAction);
index 1691adb..6f6a198 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/EditorClientWinCE.cpp:
+        (WebKit):
+        * WebCoreSupport/EditorClientWinCE.h:
+        (EditorClientWinCE):
+
 2013-02-03  KwangYong Choi  <ky0.choi@samsung.com>
 
         Fix build warning after r141473
index 50eeb82..b9f468f 100644 (file)
@@ -55,11 +55,6 @@ bool EditorClientWinCE::shouldDeleteRange(Range*)
     return true;
 }
 
-bool EditorClientWinCE::shouldShowDeleteInterface(HTMLElement*)
-{
-    return false;
-}
-
 bool EditorClientWinCE::isContinuousSpellCheckingEnabled()
 {
     notImplemented();
index 98ef63d..974aef2 100644 (file)
@@ -41,7 +41,6 @@ public:
     virtual void frameWillDetachPage(WebCore::Frame*) { }
 
     virtual bool shouldDeleteRange(WebCore::Range*);
-    virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*);
     virtual bool smartInsertDeleteEnabled();
     virtual bool isSelectTrailingWhitespaceEnabled();
     virtual bool isContinuousSpellCheckingEnabled();
index 672d11a..e6cc516 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebKitSupport/EditorClientWx.cpp:
+        (WebCore):
+        * WebKitSupport/EditorClientWx.h:
+        (EditorClientWx):
+
 2013-02-03  KwangYong Choi  <ky0.choi@samsung.com>
 
         Fix build warning after r141473
index 49a3792..5ef64cd 100644 (file)
@@ -147,12 +147,6 @@ bool EditorClientWx::shouldDeleteRange(Range*)
     return true;
 }
 
-bool EditorClientWx::shouldShowDeleteInterface(HTMLElement*)
-{
-    notImplemented();
-    return false;
-}
-
 bool EditorClientWx::smartInsertDeleteEnabled()
 {
     notImplemented();
index 04742a8..68e13e8 100644 (file)
@@ -48,7 +48,6 @@ public:
     virtual void frameWillDetachPage(WebCore::Frame*) { }
 
     virtual bool shouldDeleteRange(Range*);
-    virtual bool shouldShowDeleteInterface(HTMLElement*);
     virtual bool smartInsertDeleteEnabled();
     virtual bool isSelectTrailingWhitespaceEnabled();
     virtual bool isContinuousSpellCheckingEnabled();
index 25fc533..da68355 100644 (file)
@@ -1,3 +1,14 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit):
+        * WebProcess/WebCoreSupport/WebEditorClient.h:
+
 2013-02-11  Jae Hyun Park  <jae.park@company100.net>
 
         [EFL] Build fix
index aeb3c7f..93dfab3 100644 (file)
@@ -71,11 +71,13 @@ bool WebEditorClient::shouldDeleteRange(Range* range)
     return result;
 }
 
+#if ENABLE(DELETION_UI)
 bool WebEditorClient::shouldShowDeleteInterface(HTMLElement*)
 {
     notImplemented();
     return false;
 }
+#endif
 
 bool WebEditorClient::smartInsertDeleteEnabled()
 {
index fcd8c5f..fb5c5fd 100644 (file)
@@ -45,7 +45,6 @@ private:
     virtual void frameWillDetachPage(WebCore::Frame*) OVERRIDE { }
 
     virtual bool shouldDeleteRange(WebCore::Range*) OVERRIDE;
-    virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*) OVERRIDE;
     virtual bool smartInsertDeleteEnabled() OVERRIDE;
     virtual bool isSelectTrailingWhitespaceEnabled() OVERRIDE;
     virtual bool isContinuousSpellCheckingEnabled() OVERRIDE;
@@ -123,6 +122,10 @@ private:
     virtual void toggleAutomaticSpellingCorrection() OVERRIDE;
 #endif
 
+#if ENABLE(DELETION_UI)
+    virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*) OVERRIDE;
+#endif
+
 #if PLATFORM(GTK)
     bool executePendingEditorCommands(WebCore::Frame*, Vector<WTF::String>, bool) OVERRIDE;
     void getEditorCommandsForKeyEvent(const WebCore::KeyboardEvent*, Vector<WTF::String>&) OVERRIDE;
index a8f63da..ae21681 100644 (file)
@@ -1,3 +1,13 @@
+2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+        https://bugs.webkit.org/show_bug.cgi?id=109534
+
+        Reviewed by Anders Carlsson.
+
+        * DumpRenderTree/gtk/EditingCallbacks.cpp:
+        (shouldShowDeleteInterfaceForElement):
+
 2013-02-11  Nico Weber  <thakis@chromium.org>
 
         Remove web intents code
index adecdb9..ef5a969 100644 (file)
@@ -135,8 +135,7 @@ gboolean shouldDeleteRange(WebKitWebView* webView, WebKitDOMRange* range)
 
 gboolean shouldShowDeleteInterfaceForElement(WebKitWebView* webView, WebKitDOMHTMLElement* element)
 {
-    GOwnPtr<gchar> elementClassName(webkit_dom_element_get_class_name(WEBKIT_DOM_ELEMENT(element)));
-    return g_str_equal(elementClassName.get(), "needsDeletionUI");
+    return FALSE;
 }
 
 gboolean shouldChangeSelectedRange(WebKitWebView* webView, WebKitDOMRange* fromRange, WebKitDOMRange* toRange, WebKitSelectionAffinity affinity, gboolean stillSelecting)