Title: [147916] trunk/Source/WebCore
Revision
147916
Author
ser...@webkit.org
Date
2013-04-08 09:05:52 -0700 (Mon, 08 Apr 2013)

Log Message

[GTK] Toggle OverWrite mode when pressing the Insert key
https://bugs.webkit.org/show_bug.cgi?id=113384

Reviewed by Martin Robinson.

Perform an OverWrite command as a response to the emission of the
toggle-overwrite signal. Due to the nature of the command it will
only do that when being on a richly editable web content.

* platform/gtk/KeyBindingTranslator.cpp:
(WebCore::toggleOverwriteCallback):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (147915 => 147916)


--- trunk/Source/WebCore/ChangeLog	2013-04-08 15:30:04 UTC (rev 147915)
+++ trunk/Source/WebCore/ChangeLog	2013-04-08 16:05:52 UTC (rev 147916)
@@ -1,3 +1,17 @@
+2013-04-08  Sergio Villar Senin  <svil...@igalia.com>
+
+        [GTK] Toggle OverWrite mode when pressing the Insert key
+        https://bugs.webkit.org/show_bug.cgi?id=113384
+
+        Reviewed by Martin Robinson.
+
+        Perform an OverWrite command as a response to the emission of the
+        toggle-overwrite signal. Due to the nature of the command it will
+        only do that when being on a richly editable web content.
+
+        * platform/gtk/KeyBindingTranslator.cpp:
+        (WebCore::toggleOverwriteCallback):
+
 2013-04-08  Seokju Kwon  <seokju.k...@gmail.com>
 
         [BlackBerry] Provide more specific error description for SocketStreamError

Modified: trunk/Source/WebCore/platform/gtk/KeyBindingTranslator.cpp (147915 => 147916)


--- trunk/Source/WebCore/platform/gtk/KeyBindingTranslator.cpp	2013-04-08 15:30:04 UTC (rev 147915)
+++ trunk/Source/WebCore/platform/gtk/KeyBindingTranslator.cpp	2013-04-08 16:05:52 UTC (rev 147916)
@@ -57,11 +57,10 @@
     translator->addPendingEditorCommand("Paste");
 }
 
-static void toggleOverwriteCallback(GtkWidget* widget, KeyBindingTranslator*)
+static void toggleOverwriteCallback(GtkWidget* widget, KeyBindingTranslator* translator)
 {
-    // We don't support toggling the overwrite mode, but the default callback expects
-    // the GtkTextView to have a layout, so we handle this signal just to stop it.
     g_signal_stop_emission_by_name(widget, "toggle-overwrite");
+    translator->addPendingEditorCommand("OverWrite");
 }
 
 // GTK+ will still send these signals to the web view. So we can safely stop signal
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to