summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 20:06:03 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 20:06:03 +0000
commit43f36fc572140e18e8769a62a2d8dd8fa265d8e6 (patch)
treeca23162a6d1bb670dd7b673ab2cc08b3d870438e
parent49aeee5080135d65173fb06f117cbb19f87ae867 (diff)
downloadchromium_src-43f36fc572140e18e8769a62a2d8dd8fa265d8e6.zip
chromium_src-43f36fc572140e18e8769a62a2d8dd8fa265d8e6.tar.gz
chromium_src-43f36fc572140e18e8769a62a2d8dd8fa265d8e6.tar.bz2
[mac] Send cmd-c and friends back to browser.
Fixes cmd-c, cmd-v, cmd-x, cmd-a. The menu blinking is worth the extra IPC hop. BUG=25254 TEST=Select text, hit cmd-c. "Edit" menu should blink. Hit cmd-v. "Edit" menu should blink again, correct text should be pasted. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30045 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=30046 Review URL: http://codereview.chromium.org/330014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30079 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/editor_client_impl.cc9
-rw-r--r--webkit/tools/test_shell/keyboard_unittest.cc10
2 files changed, 14 insertions, 5 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index 80077ef..3e87091 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -458,16 +458,15 @@ static const KeyDownEntry keyDownEntries[] = {
{ WebCore::VKEY_INSERT, ShiftKey, "Paste" },
{ WebCore::VKEY_DELETE, ShiftKey, "Cut" },
#if PLATFORM(DARWIN)
- { 'C', CommandKey, "Copy" },
- { 'V', CommandKey, "Paste" },
+ // TODO(thakis): Remove -- crbug.com/25205
{ 'V', CommandKey | ShiftKey,
"PasteAndMatchStyle" },
- { 'X', CommandKey, "Cut" },
- { 'A', CommandKey, "SelectAll" },
+
+ // TODO(port): Remove once undo and redo are hooked up correctly in the menu
+ // and are validated correctly.
{ 'Z', CommandKey, "Undo" },
{ 'Z', CommandKey | ShiftKey,
"Redo" },
- { 'Y', CommandKey, "Redo" },
#else
{ 'C', CtrlKey, "Copy" },
{ 'V', CtrlKey, "Paste" },
diff --git a/webkit/tools/test_shell/keyboard_unittest.cc b/webkit/tools/test_shell/keyboard_unittest.cc
index 3ced54e..9673173 100644
--- a/webkit/tools/test_shell/keyboard_unittest.cc
+++ b/webkit/tools/test_shell/keyboard_unittest.cc
@@ -106,23 +106,33 @@ TEST_F(KeyboardTest, TestOSModifierZ) {
}
TEST_F(KeyboardTest, TestOSModifierY) {
+#if !defined(OS_MACOSX)
EXPECT_STREQ("Redo", InterpretOSModifierKeyPress('Y'));
+#endif
}
TEST_F(KeyboardTest, TestOSModifierA) {
+#if !defined(OS_MACOSX)
EXPECT_STREQ("SelectAll", InterpretOSModifierKeyPress('A'));
+#endif
}
TEST_F(KeyboardTest, TestOSModifierX) {
+#if !defined(OS_MACOSX)
EXPECT_STREQ("Cut", InterpretOSModifierKeyPress('X'));
+#endif
}
TEST_F(KeyboardTest, TestOSModifierC) {
+#if !defined(OS_MACOSX)
EXPECT_STREQ("Copy", InterpretOSModifierKeyPress('C'));
+#endif
}
TEST_F(KeyboardTest, TestOSModifierV) {
+#if !defined(OS_MACOSX)
EXPECT_STREQ("Paste", InterpretOSModifierKeyPress('V'));
+#endif
}
TEST_F(KeyboardTest, TestEscape) {