Title: [156892] trunk
Revision
156892
Author
[email protected]
Date
2013-10-04 09:14:06 -0700 (Fri, 04 Oct 2013)

Log Message

[GTK] Enable text edition UndoOperations support in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=122305

Patch by Lorenzo Tilve <[email protected]> on 2013-10-04
Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Replaced the notImplemented() function calls for
the corresponding implementation of the edit operations
provided by the DefaultUndoController class.

* GNUmakefile.list.am:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):
* UIProcess/API/gtk/PageClientImpl.h:

LayoutTests:

* platform/gtk-wk2/TestExpectations: Corrected the expectations
with the new results.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (156891 => 156892)


--- trunk/LayoutTests/ChangeLog	2013-10-04 16:02:46 UTC (rev 156891)
+++ trunk/LayoutTests/ChangeLog	2013-10-04 16:14:06 UTC (rev 156892)
@@ -1,3 +1,13 @@
+2013-10-04  Lorenzo Tilve  <[email protected]>
+
+        [GTK] Enable text edition UndoOperations support in WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=122305
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/gtk-wk2/TestExpectations: Corrected the expectations
+        with the new results.
+
 2013-10-04  Mihnea Ovidenie  <[email protected]>
 
         [CSSRegions] Regions as stacking contexts should paint over positioned sibling

Modified: trunk/LayoutTests/platform/gtk-wk2/TestExpectations (156891 => 156892)


--- trunk/LayoutTests/platform/gtk-wk2/TestExpectations	2013-10-04 16:02:46 UTC (rev 156891)
+++ trunk/LayoutTests/platform/gtk-wk2/TestExpectations	2013-10-04 16:14:06 UTC (rev 156892)
@@ -72,7 +72,6 @@
 webkit.org/b/63706 editing/selection/4895428-4.html [ Failure ]
 webkit.org/b/63706 editing/selection/contains-boundaries.html [ Failure ]
 webkit.org/b/63706 editing/selection/drag-text-delay.html [ Failure ]
-webkit.org/b/63706 editing/undo/undo-smart-delete-word.html [ Failure ]
 webkit.org/b/63706 fast/block/float/float-in-float-hit-testing.html [ Failure ]
 webkit.org/b/63706 fast/events/bogus-dropEffect-effectAllowed.html [ Failure ]
 webkit.org/b/63706 fast/events/content-changed-during-drop.html [ Failure ]
@@ -113,40 +112,12 @@
 webkit.org/b/39485 fast/speech/speech-input-scripting.html [ Skip ]
 
 # WebKit2 needs layoutTestController.setEditingBehaviour
-Bug(GTK) editing/selection/directionality-after-undo-replace.html [ Failure ]
 Bug(GTK) editing/selection/5354455-1.html [ Failure ]
 Bug(GTK) editing/selection/extend-after-mouse-selection.html [ Failure ]
 
 # WebKit2 needs textInputController.selectedRange
 Bug(GTK) editing/selection/mixed-editability-10.html [ Failure ]
 
-# Implement PageClientImpl::registerEditCommand and handling commands functions
-Bug(GTK) editing/deleting/delete-by-word-002.html [ Failure ]
-Bug(GTK) editing/deleting/delete-and-undo.html [ Failure ]
-Bug(GTK) editing/undo/undo-delete.html [ Failure ]
-Bug(GTK) editing/undo/undo-forward-delete.html [ Failure ]
-Bug(GTK) editing/undo/undo-combined-delete-boundary.html [ Failure ]
-Bug(GTK) editing/undo/undo-forward-delete-boundary.html [ Failure ]
-Bug(GTK) editing/undo/undo-delete-boundary.html [ Failure ]
-Bug(GTK) editing/undo/undo-combined-delete.html [ Failure ]
-Bug(GTK) editing/undo/undo-typing-001.html [ Failure ]
-Bug(GTK) editing/undo/4063751.html [ Failure ]
-Bug(GTK) editing/undo/redo-typing-001.html [ Failure ]
-Bug(GTK) editing/execCommand/format-block-multiple-paragraphs-in-pre.html [ Failure ]
-Bug(GTK) editing/inserting/redo.html [ Failure ]
-Bug(GTK) editing/pasteboard/undoable-fragment-removes.html [ Failure ]
-Bug(GTK) editing/style/stylewithcss-without-selection.html [ Failure ]
-Bug(GTK) editing/undo/5378473.html [ Failure ]
-Bug(GTK) editing/undo/redo-split-text-node.html [ Failure ]
-Bug(GTK) editing/undo/redo-split-text-with-removal.html [ Failure ]
-Bug(GTK) editing/undo/redo-style.html [ Failure ]
-Bug(GTK) editing/undo/remove-css-property-and-remove-style.html [ Failure ]
-Bug(GTK) editing/undo/replace-by-span-then-remove.html [ Failure ]
-Bug(GTK) editing/undo/undo-after-setting-value.html [ Failure ]
-Bug(GTK) editing/undo/undo-indent.html [ Failure ]
-Bug(GTK) editing/undo/undo-misspellings.html [ Failure ]
-Bug(GTK) fast/forms/plaintext-mode-1.html [ Failure ]
-
 # Implement testRunner.setAsynchronousSpellCheckingEnabled
 # http://webkit.org/b/81042
 webkit.org/b/81042 editing/spelling/spellcheck-paste.html [ Failure ]
@@ -169,7 +140,6 @@
 
 # WebKitTestRunner needs a more-complete implementation of eventSender
 # https://bugs.webkit.org/show_bug.cgi?id=42194
-webkit.org/b/42194 editing/undo/undo-smart-delete-reversed-selection.html [ Failure ]
 webkit.org/b/42194 fast/dom/vertical-scrollbar-in-rtl.html [ Failure ]
 webkit.org/b/42194 fast/events/5056619.html [ Failure ]
 webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ]
@@ -422,7 +392,6 @@
 Bug(GTK) editing/selection/inactive-selection.html [ Failure ]
 Bug(GTK) editing/selection/programmatic-selection-on-mac-is-directionless.html [ Failure ]
 Bug(GTK) editing/spelling/spelling-insert-html.html [ Failure ]
-Bug(GTK) editing/undo/undo-deleteWord.html [ Failure ]
 Bug(GTK) fast/css/bidi-override-in-anonymous-block.html [ Failure ]
 Bug(GTK) fast/css/disabled-author-styles.html [ Failure ]
 Bug(GTK) fast/css/relative-positioned-block-crash.html [ Failure ]
@@ -435,7 +404,6 @@
 Bug(GTK) fast/events/remove-target-with-shadow-in-drag.html [ Failure ]
 Bug(GTK) fast/events/scroll-in-scaled-page-with-overflow-hidden.html [ Failure ]
 Bug(GTK) fast/events/selectionchange-iframe.html [ Failure ]
-Bug(GTK) fast/forms/input-paste-undo.html [ Failure ]
 Bug(GTK) fast/forms/listbox-deselect-scroll.html [ Failure ]
 Bug(GTK) fast/forms/listbox-selection.html [ Failure ]
 Bug(GTK) fast/forms/listbox-typeahead-cyrillic.html [ Failure ]

Modified: trunk/Source/WebKit2/ChangeLog (156891 => 156892)


--- trunk/Source/WebKit2/ChangeLog	2013-10-04 16:02:46 UTC (rev 156891)
+++ trunk/Source/WebKit2/ChangeLog	2013-10-04 16:14:06 UTC (rev 156892)
@@ -1,3 +1,22 @@
+2013-10-04  Lorenzo Tilve  <[email protected]>
+
+        [GTK] Enable text edition UndoOperations support in WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=122305
+
+        Reviewed by Carlos Garcia Campos.
+
+        Replaced the notImplemented() function calls for
+        the corresponding implementation of the edit operations
+        provided by the DefaultUndoController class.
+
+        * GNUmakefile.list.am:
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::registerEditCommand):
+        (WebKit::PageClientImpl::clearAllEditCommands):
+        (WebKit::PageClientImpl::canUndoRedo):
+        (WebKit::PageClientImpl::executeUndoRedo):
+        * UIProcess/API/gtk/PageClientImpl.h:
+
 2013-10-04  Sergio Correia  <[email protected]>
 
         Remove Qt leftovers from WebKit2

Modified: trunk/Source/WebKit2/GNUmakefile.list.am (156891 => 156892)


--- trunk/Source/WebKit2/GNUmakefile.list.am	2013-10-04 16:02:46 UTC (rev 156891)
+++ trunk/Source/WebKit2/GNUmakefile.list.am	2013-10-04 16:14:06 UTC (rev 156892)
@@ -816,6 +816,8 @@
 	Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h \
 	Source/WebKit2/UIProcess/BackingStore.cpp \
 	Source/WebKit2/UIProcess/BackingStore.h \
+	Source/WebKit2/UIProcess/DefaultUndoController.cpp \
+	Source/WebKit2/UIProcess/DefaultUndoController.h \
 	Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp \
 	Source/WebKit2/UIProcess/Downloads/DownloadProxy.h \
 	Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.cpp \

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (156891 => 156892)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2013-10-04 16:02:46 UTC (rev 156891)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2013-10-04 16:14:06 UTC (rev 156892)
@@ -162,25 +162,24 @@
     notImplemented();
 }
 
-void PageClientImpl::registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo)
+void PageClientImpl::registerEditCommand(PassRefPtr<WebEditCommandProxy> command, WebPageProxy::UndoOrRedo undoOrRedo)
 {
-    notImplemented();
+    m_undoController.registerEditCommand(command, undoOrRedo);
 }
 
 void PageClientImpl::clearAllEditCommands()
 {
-    notImplemented();
+    m_undoController.clearAllEditCommands();
 }
 
-bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo)
+bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
 {
-    notImplemented();
-    return false;
+    return m_undoController.canUndoRedo(undoOrRedo);
 }
 
-void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo)
+void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
 {
-    notImplemented();
+    m_undoController.executeUndoRedo(undoOrRedo);
 }
 
 FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& viewRect)

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (156891 => 156892)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2013-10-04 16:02:46 UTC (rev 156891)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2013-10-04 16:14:06 UTC (rev 156892)
@@ -28,6 +28,7 @@
 #ifndef PageClientImpl_h
 #define PageClientImpl_h
 
+#include "DefaultUndoController.h"
 #include "KeyBindingTranslator.h"
 #include "PageClient.h"
 #include "WebPageProxy.h"
@@ -102,6 +103,7 @@
 
     // Members of PageClientImpl class
     GtkWidget* m_viewWidget;
+    DefaultUndoController m_undoController;
     WebCore::KeyBindingTranslator m_keyBindingTranslator;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to