Reviewed by Darin.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 18:31:13 +0000 (18:31 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 18:31:13 +0000 (18:31 +0000)
        Resolved several FIXMEs in EditorCommand.
        Made recently added commands hidden from JS again.
        Removed BackwardDelete implementation, which used to be dead code, but got exposed now.

        Tests: editing/execCommand/delete-no-scroll.html
               editing/execCommand/forward-delete-no-scroll.html
               editing/execCommand/insert-line-break-no-scroll.html

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

21 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/5300379.html
LayoutTests/editing/deleting/delete-to-end-of-paragraph.html
LayoutTests/editing/deleting/smart-delete-003.html
LayoutTests/editing/deleting/smart-delete-004.html
LayoutTests/editing/execCommand/delete-no-scroll-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/delete-no-scroll.html [new file with mode: 0644]
LayoutTests/editing/execCommand/forward-delete-no-scroll-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/forward-delete-no-scroll.html [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-line-break-no-scroll-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-line-break-no-scroll.html [new file with mode: 0644]
LayoutTests/editing/selection/4947387.html
LayoutTests/editing/selection/5195166-1.html
LayoutTests/editing/selection/5195166-2.html
LayoutTests/editing/selection/select-line.html
LayoutTests/editing/selection/selection-actions.html
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/editing/EditorCommand.cpp
WebKit/ChangeLog
WebKit/StringsNotToBeLocalized.txt

index 594b2f9..d508d56 100644 (file)
@@ -2,6 +2,33 @@
 
         Reviewed by Darin.
 
+        Changed tests that were recently modified to use non-standard execCommand identifiers back to
+        textInputController.doCommand, re-added them to Windows skip list.
+
+        Added several tests for commands that have different behavior when invoked manually rather
+        than from JS.
+
+        * editing/deleting/5300379.html:
+        * editing/deleting/delete-to-end-of-paragraph.html:
+        * editing/deleting/smart-delete-003.html:
+        * editing/deleting/smart-delete-004.html:
+        * editing/execCommand/delete-no-scroll-expected.txt: Added.
+        * editing/execCommand/delete-no-scroll.html: Added.
+        * editing/execCommand/forward-delete-no-scroll-expected.txt: Added.
+        * editing/execCommand/forward-delete-no-scroll.html: Added.
+        * editing/execCommand/insert-line-break-no-scroll-expected.txt: Added.
+        * editing/execCommand/insert-line-break-no-scroll.html: Added.
+        * editing/selection/4947387.html:
+        * editing/selection/5195166-1.html:
+        * editing/selection/5195166-2.html:
+        * editing/selection/select-line.html:
+        * editing/selection/selection-actions.html:
+        * platform/win/Skipped:
+
+2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
+
+        Reviewed by Darin.
+
         http://bugs.webkit.org/show_bug.cgi?id=14555
         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
 
index e001a05..ea2b344 100644 (file)
@@ -6,10 +6,14 @@
 div = document.getElementById("div");
 sel = window.getSelection();
 sel.setPosition(div, 0);
-// Test to see if DeleteWordBackward hangs.
-document.execCommand("DeleteWordBackward");
-document.execCommand("InsertText", false, "Success FAIL");
-// Delete 'FAIL' with DeleteWordBackward to verify that it's not a no-op.
-document.execCommand("DeleteWordBackward");
-document.execCommand("DeleteBackward");
+if (window.layoutTestController) {
+    // Test to see if deleteWordBackward: hangs.
+    textInputController.doCommand("deleteWordBackward:");
+    document.execCommand("InsertText", false, "Success FAIL");
+    // Delete 'FAIL' with deleteWordBackward: to verify that it's not a no-op.
+    textInputController.doCommand("deleteWordBackward:");
+    textInputController.doCommand("deleteBackward:");
+} else {
+    document.execCommand("InsertText", false, "To run this test manually.  Delete all this text and then option-delete.  Safari shouldn't hang.");
+}
 </script>
index 8e426c2..40415a3 100644 (file)
 <script>
 
 function editingTest() {
-    try {
-        // test for 4570218 by using double deleteToEndOfParagraph
-        document.execCommand("DeleteToEndOfParagraph");    
-        document.execCommand("DeleteToEndOfParagraph");    
+    if (window.layoutTestController) {
+        
+        try {
+            // test for 4570218 by using double deleteToEndOfParagraph
+            textInputController.doCommand("deleteToEndOfParagraph:");    
+            textInputController.doCommand("deleteToEndOfParagraph:");    
 
-    } catch (ex) {
-        document.write("Exception: " + ex.description);
+        } catch (ex) {
+            document.write("Exception: " + ex.description);
+        }
+    } else {
+        document.write("(cannot run interactively)");
     }
 }
 
index 46b4c28..2b71d7d 100644 (file)
@@ -6,12 +6,14 @@ if (window.layoutTestController)
 <div id="div" contenteditable="true">foo bar baz</div>
 
 <script>
-var div = document.getElementById("div");
-var sel = window.getSelection();
-
-sel.setPosition(div, 0);
-sel.modify("move", "forward", "word");
-sel.modify("move", "forward", "word");
-sel.modify("extend", "backward", "word");
-document.execCommand("DeleteBackward");
+if (window.layoutTestController) {
+    var div = document.getElementById("div");
+    var sel = window.getSelection();
+    
+    sel.setPosition(div, 0);
+    sel.modify("move", "forward", "word");
+    sel.modify("move", "forward", "word");
+    sel.modify("extend", "backward", "word");
+    textInputController.doCommand("deleteBackward:");
+}
 </script>
index b07e4fd..49ec7e4 100644 (file)
@@ -6,12 +6,14 @@ if (window.layoutTestController)
 <div id="div" contenteditable="true">foo bar baz</div>
 
 <script>
-var div = document.getElementById("div");
-var sel = window.getSelection();
-
-sel.setPosition(div, 0);
-sel.modify("move", "forward", "word");
-sel.modify("move", "forward", "word");
-sel.modify("extend", "backward", "word");
-document.execCommand("DeleteForward");
+if (window.layoutTestController) {
+    var div = document.getElementById("div");
+    var sel = window.getSelection();
+    
+    sel.setPosition(div, 0);
+    sel.modify("move", "forward", "word");
+    sel.modify("move", "forward", "word");
+    sel.modify("extend", "backward", "word");
+    textInputController.doCommand("deleteForward:");
+}
 </script>
diff --git a/LayoutTests/editing/execCommand/delete-no-scroll-expected.txt b/LayoutTests/editing/execCommand/delete-no-scroll-expected.txt
new file mode 100644 (file)
index 0000000..9846147
--- /dev/null
@@ -0,0 +1,4 @@
+Matching IE, execCommand("Delete") should not scroll the page to make selection visible.
+
+a
+
diff --git a/LayoutTests/editing/execCommand/delete-no-scroll.html b/LayoutTests/editing/execCommand/delete-no-scroll.html
new file mode 100644 (file)
index 0000000..d8296b2
--- /dev/null
@@ -0,0 +1,34 @@
+<p>Matching IE, execCommand("Delete") should not scroll the page to make selection visible.</p>
+<div contenteditable>ab</div>
+<div style="height:10000"></div>
+<script>
+  if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+  }
+
+  var textDiv = document.getElementsByTagName('div')[0];
+  var text = textDiv.firstChild;
+  if (window.getSelection)
+    window.getSelection().setBaseAndExtent(text, 1, text, 2);
+  else {
+    var range = document.body.createTextRange();
+    range.moveToElementText(textDiv);
+    range.moveStart("character", 1);
+    range.select();
+  }
+  
+  setTimeout("finishTest()", 0);
+
+  function finishTest() {
+    window.scrollTo(0, 1000);
+    document.execCommand("Delete");
+
+    var result = (document.body.scrollTop == 1000) ? "SUCCESS" : "FAILURE";
+    if (window.layoutTestController) {
+      layoutTestController.notifyDone();
+      document.write(result);
+    } else
+      alert(result);
+  }
+</script>
diff --git a/LayoutTests/editing/execCommand/forward-delete-no-scroll-expected.txt b/LayoutTests/editing/execCommand/forward-delete-no-scroll-expected.txt
new file mode 100644 (file)
index 0000000..0ee5cad
--- /dev/null
@@ -0,0 +1,6 @@
+Matching other execCommand identifiers, execCommand("ForwardDelete") should not scroll the page to make selection visible.
+
+This test only works in WebKit, as other engines do not implement this command.
+
+
+SUCCESS
diff --git a/LayoutTests/editing/execCommand/forward-delete-no-scroll.html b/LayoutTests/editing/execCommand/forward-delete-no-scroll.html
new file mode 100644 (file)
index 0000000..75c3458
--- /dev/null
@@ -0,0 +1,17 @@
+<p>Matching other execCommand identifiers, execCommand("ForwardDelete") should not scroll the page to make selection visible.</p>
+<p>This test only works in WebKit, as other engines do not implement this command.</p>
+<div contenteditable>a</div>
+<div style="height:10000"></div>
+<script>
+  var text = document.getElementsByTagName('div')[0].firstChild;
+  window.getSelection().setBaseAndExtent(text, 0, text, 0);
+  window.scrollTo(0, 1000);
+  document.execCommand("ForwardDelete");
+
+  var result = (window.pageYOffset == 1000) ? "SUCCESS" : "FAILURE";
+  if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    document.write(result);
+  } else
+    alert(result);
+</script>
diff --git a/LayoutTests/editing/execCommand/insert-line-break-no-scroll-expected.txt b/LayoutTests/editing/execCommand/insert-line-break-no-scroll-expected.txt
new file mode 100644 (file)
index 0000000..8f07349
--- /dev/null
@@ -0,0 +1,7 @@
+Matching other execCommand identifiers, execCommand("InsertLineBreak") should not scroll the page to make selection visible.
+
+This test only works in WebKit, as other engines do not implement this command.
+
+
+a
+SUCCESS
diff --git a/LayoutTests/editing/execCommand/insert-line-break-no-scroll.html b/LayoutTests/editing/execCommand/insert-line-break-no-scroll.html
new file mode 100644 (file)
index 0000000..4a3e8fa
--- /dev/null
@@ -0,0 +1,17 @@
+<p>Matching other execCommand identifiers, execCommand("InsertLineBreak") should not scroll the page to make selection visible.</p>
+<p>This test only works in WebKit, as other engines do not implement this command.</p>
+<div contenteditable>a</div>
+<div style="height:10000"></div>
+<script>
+  var text = document.getElementsByTagName('div')[0].firstChild;
+  window.getSelection().setBaseAndExtent(text, 0, text, 0);
+  window.scrollTo(0, 1000);
+  document.execCommand("InsertLineBreak");
+
+  var result = (window.pageYOffset == 1000) ? "SUCCESS" : "FAILURE";
+  if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    document.write(result);
+  } else
+    alert(result);
+</script>
index a86a073..0f0c84f 100644 (file)
@@ -3,23 +3,24 @@
 
 <script>
 
-if (window.layoutTestController)
+if (window.layoutTestController) {
+
     window.layoutTestController.dumpEditingCallbacks();
     
-var div = document.getElementById("div");
-var text = div.firstChild;
-var sel = window.getSelection();
-
-sel.setPosition(text, text.length);
-document.execCommand("MoveToBeginningOfLineAndModifySelection");
-
-sel.setPosition(text, 0);
-document.execCommand("MoveToEndOfLineAndModifySelection");
-
-sel.setPosition(text, text.length);
-document.execCommand("MoveToBeginningOfParagraphAndModifySelection");
-
-sel.setPosition(text, 0);
-document.execCommand("MoveToEndOfParagraphAndModifySelection");
+    var div = document.getElementById("div");
+    var text = div.firstChild;
+    var sel = window.getSelection();
+    
+    sel.setPosition(text, text.length);
+    textInputController.doCommand("moveToBeginningOfLineAndModifySelection:");
+    
+    sel.setPosition(text, 0);
+    textInputController.doCommand("moveToEndOfLineAndModifySelection:");
 
+    sel.setPosition(text, text.length);
+    textInputController.doCommand("moveToBeginningOfParagraphAndModifySelection:");
+    
+    sel.setPosition(text, 0);
+    textInputController.doCommand("moveToEndOfParagraphAndModifySelection:");
+}
 </script>
index 1d444fa..b4398ee 100644 (file)
@@ -9,20 +9,23 @@ function log(str) {
     console.appendChild(li);
     li.appendChild(text);
 }
-var text = document.getElementById("div").firstChild;
-var selection = window.getSelection();
-
-// FIXME: m_lastChangeWasHorizontalExtension isn't cleared in several places
-// where it should be, when opening a new document for example.
-selection.setPosition(text, 0);
-selection.modify("move", "forward", "character");
-
-selection.setBaseAndExtent(text, 3 + 5, text, 3);
-// Extending this 5 character selection will select 6 characters.
-document.execCommand("MoveForwardAndModifySelection");
-// Extending it in this way flips the base and the extent.
-if (selection.extentOffset - selection.baseOffset != 6)
-    log("Failure: Selection isn't the right size.");
-else
-    log ("Success");
+if (window.layoutTestController) {
+    var text = document.getElementById("div").firstChild;
+    var selection = window.getSelection();
+    
+    // FIXME: m_lastChangeWasHorizontalExtension isn't cleared in several places
+    // where it should be, when opening a new document for example.
+    selection.setPosition(text, 0);
+    selection.modify("move", "forward", "character");
+    
+    selection.setBaseAndExtent(text, 3 + 5, text, 3);
+    // Extending this 5 character selection will select 6 characters.
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    // Extending it in this way flips the base and the extent.
+    if (selection.extentOffset - selection.baseOffset != 6)
+        log("Failure: Selection isn't the right size.");
+    else
+        log ("Success");
+} else
+    log ("Failure: This test cannot be run manually.")
 </script>
index ea43000..a8eb6ae 100644 (file)
@@ -9,13 +9,17 @@ function log(str) {
     console.appendChild(li);
     li.appendChild(text);
 }
-if (window.layoutTestController)
+if (window.layoutTestController) {
     window.layoutTestController.dumpEditingCallbacks();
-var text = document.getElementById("div").firstChild;
-var selection = window.getSelection();
-selection.setBaseAndExtent(text, 0, text, 0);
-document.execCommand("MoveForwardAndModifySelection");
-document.execCommand("MoveForwardAndModifySelection");
-document.execCommand("MoveForwardAndModifySelection");
-document.execCommand("MoveBackwardAndModifySelection");
+    var text = document.getElementById("div").firstChild;
+    var selection = window.getSelection();
+    selection.setBaseAndExtent(text, 0, text, 0);
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveBackwardAndModifySelection:");
+} else {
+    log("Failure: This test cannot be run manually.")
+}
+
 </script>
index 81e718a..2d10391 100644 (file)
@@ -9,5 +9,6 @@ var div = document.getElementById("div");
 var sel = window.getSelection();
 
 sel.setPosition(div, 0);
-document.execCommand("SelectLine");
+if (window.layoutTestController)
+    textInputController.doCommand("selectLine:");
 </script>
index 6b37410..affedaa 100644 (file)
@@ -24,37 +24,37 @@ function editingTest() {
     eventSender.mouseMoveTo(x, y);
     eventSender.mouseUp();
     
-    document.execCommand("MoveBackward");
-    document.execCommand("MoveBackwardAndModifySelection");
-    document.execCommand("MoveDown");
-    document.execCommand("MoveDownAndModifySelection");
-    document.execCommand("MoveForward");
-    document.execCommand("MoveForwardAndModifySelection");
-    document.execCommand("MoveLeft");
-    document.execCommand("MoveLeftAndModifySelection");
-    document.execCommand("MoveRight");
-    document.execCommand("MoveRightAndModifySelection");
-    document.execCommand("MoveToBeginningOfDocument");
-    document.execCommand("MoveToBeginningOfLine");
-    document.execCommand("MoveToBeginningOfParagraph");
-    document.execCommand("MoveToEndOfDocument");
-    document.execCommand("MoveToEndOfLine");
-    document.execCommand("MoveToEndOfParagraph");
-    document.execCommand("MoveUp");
-    document.execCommand("MoveUpAndModifySelection");
-    document.execCommand("MoveWordBackward");
-    document.execCommand("MoveWordBackwardAndModifySelection");
-    document.execCommand("MoveWordForward");
-    document.execCommand("MoveWordForwardAndModifySelection");
-    document.execCommand("MoveWordLeft");
-    document.execCommand("MoveWordRight");
-    document.execCommand("MoveWordRightAndModifySelection");
-    document.execCommand("MoveWordLeftAndModifySelection");
-    document.execCommand("MovePageDown");
-    document.execCommand("MovePageUp");
-    document.execCommand("SelectLine");
-    document.execCommand("SelectParagraph");
-    document.execCommand("SelectWord");
+    textInputController.doCommand("moveBackward:");
+    textInputController.doCommand("moveBackwardAndModifySelection:");
+    textInputController.doCommand("moveDown:");
+    textInputController.doCommand("moveDownAndModifySelection:");
+    textInputController.doCommand("moveForward:");
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveLeft:");
+    textInputController.doCommand("moveLeftAndModifySelection:");
+    textInputController.doCommand("moveRight:");
+    textInputController.doCommand("moveRightAndModifySelection:");
+    textInputController.doCommand("moveToBeginningOfDocument:");
+    textInputController.doCommand("moveToBeginningOfLine:");
+    textInputController.doCommand("moveToBeginningOfParagraph:");
+    textInputController.doCommand("moveToEndOfDocument:");
+    textInputController.doCommand("moveToEndOfLine:");
+    textInputController.doCommand("moveToEndOfParagraph:");
+    textInputController.doCommand("moveUp:");
+    textInputController.doCommand("moveUpAndModifySelection:");
+    textInputController.doCommand("moveWordBackward:");
+    textInputController.doCommand("moveWordBackwardAndModifySelection:");
+    textInputController.doCommand("moveWordForward:");
+    textInputController.doCommand("moveWordForwardAndModifySelection:");
+    textInputController.doCommand("moveWordLeft:");
+    textInputController.doCommand("moveWordRight:");
+    textInputController.doCommand("moveWordRightAndModifySelection:");
+    textInputController.doCommand("moveWordLeftAndModifySelection:");
+    textInputController.doCommand("pageDown:");
+    textInputController.doCommand("pageUp:");
+    textInputController.doCommand("selectLine:");
+    textInputController.doCommand("selectParagraph:");
+    textInputController.doCommand("selectWord:");
 }
 
 </script>
index ea25177..5c8d5be 100644 (file)
@@ -392,6 +392,17 @@ editing/selection/caret-rtl.html
 # Caret, RenderBlock
 editing/pasteboard/undoable-fragment-removes.html
 
+# Tests that use textInputController to execute commands.
+editing/deleting/5300379.html
+editing/deleting/delete-to-end-of-paragraph.html
+editing/deleting/smart-delete-003.html
+editing/deleting/smart-delete-004.html
+editing/selection/4947387.html
+editing/selection/5195166-1.html
+editing/selection/5195166-2.html
+editing/selection/select-line.html
+editing/selection/selection-actions.html
+
 ################################################################################
 ######################### All of above may be related ##########################
 ################################################################################
index 98395dd..5f3a9b2 100644 (file)
@@ -2,6 +2,25 @@
 
         Reviewed by Darin.
 
+        Resolved several FIXMEs in EditorCommand.
+        Made recently added commands hidden from JS again.
+        Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
+
+        Tests: editing/execCommand/delete-no-scroll.html
+               editing/execCommand/forward-delete-no-scroll.html
+               editing/execCommand/insert-line-break-no-scroll.html
+
+        * editing/EditorCommand.cpp:
+        (WebCore::executeDelete):
+        (WebCore::executeForwardDelete):
+        (WebCore::executeInsertLineBreak):
+        (WebCore::supportedFromMenuOrKeyBinding):
+        (WebCore::CommandEntry::):
+
+2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
+
+        Reviewed by Darin.
+
         http://bugs.webkit.org/show_bug.cgi?id=14555
         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
 
index 12c6e5d..664430f 100644 (file)
@@ -240,12 +240,6 @@ static bool executeBackColor(Frame* frame, Event*, EditorCommandSource source, c
     return executeApplyStyle(frame, source, EditActionSetBackgroundColor, CSS_PROP_BACKGROUND_COLOR, value);
 }
 
-static bool executeBackwardDelete(Frame* frame, Event*, EditorCommandSource, const String&)
-{
-    frame->editor()->deleteWithDirection(SelectionController::BACKWARD, CharacterGranularity, false, true);
-    return true;
-}
-
 static bool executeCopy(Frame* frame, Event*, EditorCommandSource, const String&)
 {
     frame->editor()->copy();
@@ -269,14 +263,15 @@ static bool executeCut(Frame* frame, Event*, EditorCommandSource, const String&)
 
 static bool executeDelete(Frame* frame, Event*, EditorCommandSource source, const String&)
 {
-    // FIXME: Not sure there's a real reason to have this do something different when invoked from DOM.
-    // At some point we should either merge these or remove this comment.
     switch (source) {
         case CommandFromMenuOrKeyBinding:
+            // Doesn't modify the text if the current selection isn't a range.
             frame->editor()->performDelete();
             return true;
         case CommandFromDOM:
         case CommandFromDOMWithUserInterface:
+            // If the curernt selection is a caret, delete the preceding character. IE performs forwardDelete, but we currently side with Firefox.
+            // Doesn't scroll to make the selection visible, or modify the kill ring (this time, siding with IE, not Firefox).
             TypingCommand::deleteKeyPressed(frame->document(), frame->selectionGranularity() == WordGranularity);
             return true;
     }
@@ -399,14 +394,15 @@ static bool executeFormatBlock(Frame* frame, Event*, EditorCommandSource, const
 
 static bool executeForwardDelete(Frame* frame, Event*, EditorCommandSource source, const String&)
 {
-    // FIXME: Not sure there's a real reason to have this do something different when invoked from DOM.
-    // At some point we should either merge these or remove this comment.
     switch (source) {
         case CommandFromMenuOrKeyBinding:
             frame->editor()->deleteWithDirection(SelectionController::FORWARD, CharacterGranularity, false, true);
             return true;
         case CommandFromDOM:
         case CommandFromDOMWithUserInterface:
+            // Doesn't scroll to make the selection visible, or modify the kill ring.
+            // ForwardDelete is not implemented in IE or Firefox, so this behavior is only needed for
+            // backward compatibility with ourselves, and for consistency with Delete.
             TypingCommand::forwardDeleteKeyPressed(frame->document());
             return true;
     }
@@ -448,13 +444,14 @@ static bool executeInsertImage(Frame* frame, Event*, EditorCommandSource, const
 
 static bool executeInsertLineBreak(Frame* frame, Event* event, EditorCommandSource source, const String&)
 {
-    // FIXME: Not sure there's a real reason to have this do something different when invoked from DOM.
-    // At some point we should either merge these or remove this comment.
     switch (source) {
         case CommandFromMenuOrKeyBinding:
             return targetFrame(frame, event)->eventHandler()->handleTextInputEvent("\n", event, true);
         case CommandFromDOM:
         case CommandFromDOMWithUserInterface:
+            // Doesn't scroll to make the selection visible, or modify the kill ring.
+            // InsertLineBreak is not implemented in IE or Firefox, so this behavior is only needed for
+            // backward compatibility with ourselves, and for consistency with other commands.
             TypingCommand::insertLineBreak(frame->document());
             return true;
     }
@@ -960,6 +957,11 @@ static bool supported(Frame*, EditorCommandSource)
     return true;
 }
 
+static bool supportedFromMenuOrKeyBinding(Frame*, EditorCommandSource source)
+{
+    return source == CommandFromMenuOrKeyBinding;
+}
+
 static bool supportedPaste(Frame* frame, EditorCommandSource source)
 {
     switch (source) {
@@ -1129,27 +1131,26 @@ static const CommandMap& createCommandMap()
     struct CommandEntry { const char* name; EditorInternalCommand command; };
     
     static const CommandEntry commands[] = {
-        { "AlignCenter", { executeJustifyCenter, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
-        { "AlignJustified", { executeJustifyFull, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
-        { "AlignLeft", { executeJustifyLeft, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
-        { "AlignRight", { executeJustifyRight, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
+        { "AlignCenter", { executeJustifyCenter, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
+        { "AlignJustified", { executeJustifyFull, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
+        { "AlignLeft", { executeJustifyLeft, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
+        { "AlignRight", { executeJustifyRight, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "BackColor", { executeBackColor, supported, enabledRangeInRichlyEditableText, stateNone, valueBackColor, notTextInsertion } },
-        { "BackwardDelete", { executeBackwardDelete, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
         { "Bold", { executeToggleBold, supported, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion } },
         { "Copy", { executeCopy, supported, enabledCopy, stateNone, valueNull, notTextInsertion } },
         { "CreateLink", { executeCreateLink, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "Cut", { executeCut, supported, enabledCut, stateNone, valueNull, notTextInsertion } },
         { "Delete", { executeDelete, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteBackward", { executeDeleteBackward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteBackwardByDecomposingPreviousCharacter", { executeDeleteBackwardByDecomposingPreviousCharacter, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteForward", { executeDeleteForward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteToBeginningOfLine", { executeDeleteToBeginningOfLine, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteToBeginningOfParagraph", { executeDeleteToBeginningOfParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteToEndOfLine", { executeDeleteToEndOfLine, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteToEndOfParagraph", { executeDeleteToEndOfParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteToMark", { executeDeleteToMark, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteWordBackward", { executeDeleteWordBackward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "DeleteWordForward", { executeDeleteWordForward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteBackward", { executeDeleteBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteBackwardByDecomposingPreviousCharacter", { executeDeleteBackwardByDecomposingPreviousCharacter, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteForward", { executeDeleteForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteToBeginningOfLine", { executeDeleteToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteToBeginningOfParagraph", { executeDeleteToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteToEndOfLine", { executeDeleteToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteToEndOfParagraph", { executeDeleteToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteToMark", { executeDeleteToMark, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteWordBackward", { executeDeleteWordBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "DeleteWordForward", { executeDeleteWordForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
         { "FindString", { executeFindString, supported, enabled, stateNone, valueNull, notTextInsertion } },
         { "FontName", { executeFontName, supported, enabledInEditableText, stateNone, valueFontName, notTextInsertion } },
         { "FontSize", { executeFontSize, supported, enabledInEditableText, stateNone, valueFontSize, notTextInsertion } },
@@ -1159,16 +1160,16 @@ static const CommandMap& createCommandMap()
         { "ForwardDelete", { executeForwardDelete, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
         { "HiliteColor", { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "Indent", { executeIndent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
-        { "InsertBacktab", { executeInsertBacktab, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion } },
-        { "InsertHTML", { executeInsertHTML, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "InsertBacktab", { executeInsertBacktab, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion } },
         { "InsertHorizontalRule", { executeInsertHorizontalRule, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
+        { "InsertHTML", { executeInsertHTML, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
         { "InsertImage", { executeInsertImage, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "InsertLineBreak", { executeInsertLineBreak, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion } },
-        { "InsertNewline", { executeInsertNewline, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion } },    
+        { "InsertNewline", { executeInsertNewline, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion } },    
         { "InsertNewlineInQuotedContent", { executeInsertNewlineInQuotedContent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "InsertOrderedList", { executeInsertOrderedList, supported, enabledInRichlyEditableText, stateOrderedList, valueNull, notTextInsertion } },
         { "InsertParagraph", { executeInsertParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "InsertTab", { executeInsertTab, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion } },
+        { "InsertTab", { executeInsertTab, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion } },
         { "InsertText", { executeInsertText, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion } },
         { "InsertUnorderedList", { executeInsertUnorderedList, supported, enabledInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion } },
         { "Italic", { executeToggleItalic, supported, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion } },
@@ -1177,48 +1178,48 @@ static const CommandMap& createCommandMap()
         { "JustifyLeft", { executeJustifyLeft, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "JustifyNone", { executeJustifyLeft, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "JustifyRight", { executeJustifyRight, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveBackward", { executeMoveBackward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveBackwardAndModifySelection", { executeMoveBackwardAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveDown", { executeMoveDown, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveDownAndModifySelection", { executeMoveDownAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveForward", { executeMoveForward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveForwardAndModifySelection", { executeMoveForwardAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveLeft", { executeMoveLeft, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveLeftAndModifySelection", { executeMoveLeftAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MovePageDown", { executeMovePageDown, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MovePageDownAndModifySelection", { executeMovePageDownAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MovePageUp", { executeMovePageUp, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MovePageUpAndModifySelection", { executeMovePageUpAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveParagraphBackwardAndModifySelection", { executeMoveParagraphBackwardAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveParagraphForwardAndModifySelection", { executeMoveParagraphForwardAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveRight", { executeMoveRight, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveRightAndModifySelection", { executeMoveRightAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginningOfDocumentAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfLine", { executeMoveToBeginningOfLine, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfLineAndModifySelection", { executeMoveToBeginningOfLineAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfParagraph", { executeMoveToBeginningOfParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfParagraphAndModifySelection", { executeMoveToBeginningOfParagraphAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfSentence", { executeMoveToBeginningOfSentence, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToBeginningOfSentenceAndModifySelection", { executeMoveToBeginningOfSentenceAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfDocument", { executeMoveToEndOfDocument, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfDocumentAndModifySelection", { executeMoveToEndOfDocumentAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfLine", { executeMoveToEndOfLine, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfLineAndModifySelection", { executeMoveToEndOfLineAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfParagraph", { executeMoveToEndOfParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfParagraphAndModifySelection", { executeMoveToEndOfParagraphAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfSentence", { executeMoveToEndOfSentence, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveToEndOfSentenceAndModifySelection", { executeMoveToEndOfSentenceAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveUp", { executeMoveUp, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveUpAndModifySelection", { executeMoveUpAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordBackward", { executeMoveWordBackward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordBackwardAndModifySelection", { executeMoveWordBackwardAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordForward", { executeMoveWordForward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordForwardAndModifySelection", { executeMoveWordForwardAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordLeft", { executeMoveWordLeft, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordLeftAndModifySelection", { executeMoveWordLeftAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordRight", { executeMoveWordRight, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "MoveWordRightAndModifySelection", { executeMoveWordRightAndModifySelection, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveBackward", { executeMoveBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveBackwardAndModifySelection", { executeMoveBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveDown", { executeMoveDown, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveDownAndModifySelection", { executeMoveDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveForward", { executeMoveForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveForwardAndModifySelection", { executeMoveForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveLeft", { executeMoveLeft, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveLeftAndModifySelection", { executeMoveLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MovePageDown", { executeMovePageDown, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MovePageDownAndModifySelection", { executeMovePageDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MovePageUp", { executeMovePageUp, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MovePageUpAndModifySelection", { executeMovePageUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveParagraphBackwardAndModifySelection", { executeMoveParagraphBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveParagraphForwardAndModifySelection", { executeMoveParagraphForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveRight", { executeMoveRight, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveRightAndModifySelection", { executeMoveRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfLine", { executeMoveToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfLineAndModifySelection", { executeMoveToBeginningOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfParagraph", { executeMoveToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfParagraphAndModifySelection", { executeMoveToBeginningOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfSentence", { executeMoveToBeginningOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToBeginningOfSentenceAndModifySelection", { executeMoveToBeginningOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfDocument", { executeMoveToEndOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfDocumentAndModifySelection", { executeMoveToEndOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfLine", { executeMoveToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfLineAndModifySelection", { executeMoveToEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfParagraph", { executeMoveToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfParagraphAndModifySelection", { executeMoveToEndOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfSentence", { executeMoveToEndOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveToEndOfSentenceAndModifySelection", { executeMoveToEndOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveUp", { executeMoveUp, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveUpAndModifySelection", { executeMoveUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordBackward", { executeMoveWordBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordBackwardAndModifySelection", { executeMoveWordBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordForward", { executeMoveWordForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordForwardAndModifySelection", { executeMoveWordForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordLeft", { executeMoveWordLeft, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordLeftAndModifySelection", { executeMoveWordLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordRight", { executeMoveWordRight, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "MoveWordRightAndModifySelection", { executeMoveWordRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
         { "Outdent", { executeOutdent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "Paste", { executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion } },
         { "PasteAndMatchStyle", { executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion } },
@@ -1226,27 +1227,27 @@ static const CommandMap& createCommandMap()
         { "Redo", { executeRedo, supported, enabledRedo, stateNone, valueNull, notTextInsertion } },
         { "RemoveFormat", { executeRemoveFormat, supported, enabledRangeInEditableText, stateNone, valueNull, notTextInsertion } },
         { "SelectAll", { executeSelectAll, supported, enabled, stateNone, valueNull, notTextInsertion } },
-        { "SelectLine", { executeSelectLine, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "SelectParagraph", { executeSelectParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "SelectSentence", { executeSelectSentence, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "SelectToMark", { executeSelectToMark, supported, enabledAnySelectionAndMark, stateNone, valueNull, notTextInsertion } },
-        { "SelectWord", { executeSelectWord, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "SetMark", { executeSetMark, supported, enabledAnySelection, stateNone, valueNull, notTextInsertion } },
+        { "SelectLine", { executeSelectLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "SelectParagraph", { executeSelectParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "SelectSentence", { executeSelectSentence, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "SelectToMark", { executeSelectToMark, supportedFromMenuOrKeyBinding, enabledAnySelectionAndMark, stateNone, valueNull, notTextInsertion } },
+        { "SelectWord", { executeSelectWord, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "SetMark", { executeSetMark, supportedFromMenuOrKeyBinding, enabledAnySelection, stateNone, valueNull, notTextInsertion } },
         { "Strikethrough", { executeStrikethrough, supported, enabledInRichlyEditableText, stateStrikethrough, valueNull, notTextInsertion } },
         { "Subscript", { executeSubscript, supported, enabledInRichlyEditableText, stateSubscript, valueNull, notTextInsertion } },
         { "Superscript", { executeSuperscript, supported, enabledInRichlyEditableText, stateSuperscript, valueNull, notTextInsertion } },
-        { "SwapWithMark", { executeSwapWithMark, supported, enabledAnySelectionAndMark, stateNone, valueNull, notTextInsertion } },
-        { "ToggleBold", { executeToggleBold, supported, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion } },
-        { "ToggleItalic", { executeToggleItalic, supported, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion } },
-        { "ToggleUnderline", { executeUnderline, supported, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion } },
+        { "SwapWithMark", { executeSwapWithMark, supportedFromMenuOrKeyBinding, enabledAnySelectionAndMark, stateNone, valueNull, notTextInsertion } },
+        { "ToggleBold", { executeToggleBold, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion } },
+        { "ToggleItalic", { executeToggleItalic, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion } },
+        { "ToggleUnderline", { executeUnderline, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion } },
         { "Transpose", { executeTranspose, supported, enableCaretInEditableText, stateNone, valueNull, notTextInsertion } },
         { "Underline", { executeUnderline, supported, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion } },
         { "Undo", { executeUndo, supported, enabledUndo, stateNone, valueNull, notTextInsertion } },
         { "Unlink", { executeUnlink, supported, enabledRangeInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
-        { "Unscript", { executeUnscript, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
+        { "Unscript", { executeUnscript, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion } },
         { "Unselect", { executeUnselect, supported, enabledAnySelection, stateNone, valueNull, notTextInsertion } },
-        { "Yank", { executeYank, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
-        { "YankAndSelect", { executeYankAndSelect, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "Yank", { executeYank, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
+        { "YankAndSelect", { executeYankAndSelect, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion } },
     };
 
     // These unsupported commands are listed here since they appear in the Microsoft
index a244fae..6ba4649 100644 (file)
@@ -1,3 +1,11 @@
+2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
+
+        Reviewed by Darin.
+
+        Removed "BackwardDelete", which is no longer present in source code.
+
+        * StringsNotToBeLocalized.txt:
+
 2007-12-16  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Maciej Stachowiak.
index 5ce7180..27f0cf6 100644 (file)
 "BEGIN:VCALENDAR"
 "BEGIN:VCARD"
 "BP_CreatePluginMIMETypesPreferences"
-"BackwardDelete"
 "CSS"
 "Cache-Control"
 "Content-Encoding"