Bug 893670 - Part 1: Restore Emacs shortcuts in textareas. r=masayuki
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 17 Jul 2013 20:00:26 -0500
changeset 152437 2f26d189329b4025eed54a23864ee07e4777215a
parent 152436 84e6087150456a086f1133db74f70cc341a07f9d
child 152438 53891879b3a4377d82fd23cc697421826071afeb
push id382
push userakeybl@mozilla.com
push dateMon, 21 Oct 2013 21:47:13 +0000
treeherdermozilla-release@5f1868ee45cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs893670
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 893670 - Part 1: Restore Emacs shortcuts in textareas. r=masayuki
widget/cocoa/NativeKeyBindings.mm
--- a/widget/cocoa/NativeKeyBindings.mm
+++ b/widget/cocoa/NativeKeyBindings.mm
@@ -59,24 +59,19 @@ NativeKeyBindings::Init(NativeKeyBinding
   SEL_TO_COMMAND(cut:, "cmd_cut");
   SEL_TO_COMMAND(delete:, "cmd_delete");
   SEL_TO_COMMAND(deleteBackward:, "cmd_deleteCharBackward");
   // SEL_TO_COMMAND(deleteBackwardByDecomposingPreviousCharacter:, );
   SEL_TO_COMMAND(deleteForward:, "cmd_deleteCharForward");
 
   // TODO: deleteTo* selectors are also supposed to add text to a kill buffer
   SEL_TO_COMMAND(deleteToBeginningOfLine:, "cmd_deleteToBeginningOfLine");
-  if (aType == eNativeKeyBindingsType_Input) {
-    SEL_TO_COMMAND(deleteToBeginningOfParagraph:,
-      "cmd_deleteToBeginningOfLine");
-  }
+  SEL_TO_COMMAND(deleteToBeginningOfParagraph:, "cmd_deleteToBeginningOfLine");
   SEL_TO_COMMAND(deleteToEndOfLine:, "cmd_deleteToEndOfLine");
-  if (aType == eNativeKeyBindingsType_Input) {
-    SEL_TO_COMMAND(deleteToEndOfParagraph:, "cmd_deleteToEndOfLine");
-  }
+  SEL_TO_COMMAND(deleteToEndOfParagraph:, "cmd_deleteToEndOfLine");
   // SEL_TO_COMMAND(deleteToMark:, );
 
   SEL_TO_COMMAND(deleteWordBackward:, "cmd_deleteWordBackward");
   SEL_TO_COMMAND(deleteWordForward:, "cmd_deleteWordForward");
   // SEL_TO_COMMAND(indent:, );
   // SEL_TO_COMMAND(insertBacktab:, );
   // SEL_TO_COMMAND(insertContainerBreak:, );
   // SEL_TO_COMMAND(insertLineBreak:, );
@@ -95,43 +90,35 @@ NativeKeyBindings::Init(NativeKeyBinding
   } else {
     SEL_TO_COMMAND(moveDown:, "cmd_lineNext");
   }
   SEL_TO_COMMAND(moveDownAndModifySelection:, "cmd_selectLineNext");
   SEL_TO_COMMAND(moveForward:, "cmd_charNext");
   SEL_TO_COMMAND(moveForwardAndModifySelection:, "cmd_selectCharNext");
   SEL_TO_COMMAND(moveLeft:, "cmd_charPrevious");
   SEL_TO_COMMAND(moveLeftAndModifySelection:, "cmd_selectCharPrevious");
-  if (aType == eNativeKeyBindingsType_Input) {
-    SEL_TO_COMMAND(moveParagraphBackwardAndModifySelection:,
-      "cmd_selectBeginLine");
-    SEL_TO_COMMAND(moveParagraphForwardAndModifySelection:,
-      "cmd_selectEndLine");
-  }
+  SEL_TO_COMMAND(moveParagraphBackwardAndModifySelection:,
+    "cmd_selectBeginLine");
+  SEL_TO_COMMAND(moveParagraphForwardAndModifySelection:, "cmd_selectEndLine");
   SEL_TO_COMMAND(moveRight:, "cmd_charNext");
   SEL_TO_COMMAND(moveRightAndModifySelection:, "cmd_selectCharNext");
   SEL_TO_COMMAND(moveToBeginningOfDocument:, "cmd_moveTop");
   SEL_TO_COMMAND(moveToBeginningOfDocumentAndModifySelection:, "cmd_selectTop");
   SEL_TO_COMMAND(moveToBeginningOfLine:, "cmd_beginLine");
   SEL_TO_COMMAND(moveToBeginningOfLineAndModifySelection:,
     "cmd_selectBeginLine");
-  if (aType == eNativeKeyBindingsType_Input) {
-    SEL_TO_COMMAND(moveToBeginningOfParagraph:, "cmd_beginLine");
-    SEL_TO_COMMAND(moveToBeginningOfParagraphAndModifySelection:,
-      "cmd_selectBeginLine");
-  }
+  SEL_TO_COMMAND(moveToBeginningOfParagraph:, "cmd_beginLine");
+  SEL_TO_COMMAND(moveToBeginningOfParagraphAndModifySelection:,
+    "cmd_selectBeginLine");
   SEL_TO_COMMAND(moveToEndOfDocument:, "cmd_moveBottom");
   SEL_TO_COMMAND(moveToEndOfDocumentAndModifySelection:, "cmd_selectBottom");
   SEL_TO_COMMAND(moveToEndOfLine:, "cmd_endLine");
   SEL_TO_COMMAND(moveToEndOfLineAndModifySelection:, "cmd_selectEndLine");
-  if (aType == eNativeKeyBindingsType_Input) {
-    SEL_TO_COMMAND(moveToEndOfParagraph:, "cmd_endLine");
-    SEL_TO_COMMAND(moveToEndOfParagraphAndModifySelection:,
-      "cmd_selectEndLine");
-  }
+  SEL_TO_COMMAND(moveToEndOfParagraph:, "cmd_endLine");
+  SEL_TO_COMMAND(moveToEndOfParagraphAndModifySelection:, "cmd_selectEndLine");
   SEL_TO_COMMAND(moveToLeftEndOfLine:, "cmd_beginLine");
   SEL_TO_COMMAND(moveToLeftEndOfLineAndModifySelection:, "cmd_selectBeginLine");
   SEL_TO_COMMAND(moveToRightEndOfLine:, "cmd_endLine");
   SEL_TO_COMMAND(moveToRightEndOfLineAndModifySelection:, "cmd_selectEndLine");
   if (aType == eNativeKeyBindingsType_Input) {
     SEL_TO_COMMAND(moveUp:, "cmd_beginLine");
   } else {
     SEL_TO_COMMAND(moveUp:, "cmd_linePrevious");