*** empty log message ***
[WebKit-https.git] / LayoutTests / editing / editing.js
index fab7510832915b2d9fd4e7cfee3bee540ca0e942..324ae32fb66a885f93189866c7b68b2151507c0f 100644 (file)
@@ -39,6 +39,20 @@ function extendSelectionForwardByCharacterCommand() {
 
 //-------------------------------------------------------------------------------------------------------
 
+function execExtendSelectionForwardByLineCommand() {
+    selection.modify("extend", "forward", "line");
+}
+function extendSelectionForwardByCharacterCommand() {
+    if (commandDelay > 0) {
+        window.setTimeout(execExtendSelectionForwardByCharacterCommand, commandCount * commandDelay);
+        commandCount++;
+    }
+    else {
+        execExtendSelectionForwardByCharacterCommand();
+    }
+}
+//-------------------------------------------------------------------------------------------------------
+
 function execMoveSelectionBackwardByCharacterCommand() {
     selection.modify("move", "backward", "character");
 }
@@ -82,6 +96,7 @@ function boldCommand() {
     }
 }
 
+
 //-------------------------------------------------------------------------------------------------------
 
 function execInsertNewlineCommand() {
@@ -243,6 +258,7 @@ function runEditingTest() {
 
 //-------------------------------------------------------------------------------------------------------
 
+
 function execBackColorCommand() {
     document.execCommand("BackColor", false, "Chartreuse");
 }
@@ -256,23 +272,10 @@ function backColorCommand() {
     }
 }
 
-//-------------------------------------------------------------------------------------------------------
-
-function execForeColorCommand() {
-    document.execCommand("ForeColor", false, "Purple");
-}
-function foreColorCommand() {
-    if (commandDelay > 0) {
-        window.setTimeout(execForeColorCommand, commandCount * commandDelay);
-        commandCount++;
-    }
-    else {
-        execForeColorCommand();
-    }
-}
 
 //-------------------------------------------------------------------------------------------------------
 
+
 function execFontNameCommand() {
     document.execCommand("FontName", false, "Courier");
 }
@@ -288,15 +291,18 @@ function fontNameCommand() {
 
 //-------------------------------------------------------------------------------------------------------
 
-function execFontSizeCommand() {
-    document.execCommand("FontSize", false, "48px");
+
+function runCommand(command, arg1, arg2) {
+    document.execCommand(command,arg1,arg2);
 }
-function fontSizeCommand() {
+
+function executeCommand(command,arg1,arg2) {
     if (commandDelay > 0) {
-        window.setTimeout(execFontSizeCommand, commandCount * commandDelay);
+        window.setTimeout(runCommand, commandCount * commandDelay);
         commandCount++;
     }
     else {
-        execFontSizeCommand();
+        runCommand(command,arg1,arg2);
     }
-}
\ No newline at end of file
+}
+