[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:45:07 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 259ced7acdf2ca0f8474726bd1139fd20043c3b4
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jun 11 18:33:50 2004 +0000
Reviewed by Trey
Lay some groundwork for better testing of inserting newlines. Layout
tests that use this new code will be coming soon.
* khtml/editing/jsediting.cpp: Add commands for bold and inserting newlines.
* layout-tests/editing/editing.js: Added new insertNewline command.
which calls through to TypingCommand::insertNewline. There was no way to get
to this command from JS before this addition.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/editing/editing.js b/LayoutTests/editing/editing.js
index 0ba011d..9eb2a91 100644
--- a/LayoutTests/editing/editing.js
+++ b/LayoutTests/editing/editing.js
@@ -69,6 +69,36 @@ function extendSelectionBackwardByCharacterCommand() {
//-------------------------------------------------------------------------------------------------------
+function execBoldCommand() {
+ document.execCommand("Bold");
+}
+function boldCommand() {
+ if (commandDelay > 0) {
+ window.setTimeout(execBoldCommand, commandCount * commandDelay);
+ commandCount++;
+ }
+ else {
+ execBoldCommand();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------------
+
+function execInsertNewlineCommand() {
+ document.execCommand("InsertNewline");
+}
+function insertNewlineCommand() {
+ if (commandDelay > 0) {
+ window.setTimeout(execInsertNewlineCommand, commandCount * commandDelay);
+ commandCount++;
+ }
+ else {
+ execInsertNewlineCommand();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------------
+
function execTypeCharacterCommand() {
document.execCommand("InsertText", false, "x");
}
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 161bbd8..d2d5b6e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
2004-06-11 Ken Kocienda <kocienda at apple.com>
+ Reviewed by Trey
+
+ Lay some groundwork for better testing of inserting newlines. Layout
+ tests that use this new code will be coming soon.
+
+ * khtml/editing/jsediting.cpp: Add commands for bold and inserting newlines.
+ * layout-tests/editing/editing.js: Added new insertNewline command.
+ which calls through to TypingCommand::insertNewline. There was no way to get
+ to this command from JS before this addition.
+
+2004-06-11 Ken Kocienda <kocienda at apple.com>
+
Reviewed by Darin
Javascript execCommand system wants to use case-insensitive QDict.
diff --git a/WebCore/khtml/editing/jsediting.cpp b/WebCore/khtml/editing/jsediting.cpp
index edd14b5..232ad86 100644
--- a/WebCore/khtml/editing/jsediting.cpp
+++ b/WebCore/khtml/editing/jsediting.cpp
@@ -223,6 +223,12 @@ bool execIndent(KHTMLPart *part, bool userInterface, const DOMString &value)
return false;
}
+bool execInsertNewline(KHTMLPart *part, bool userInterface, const DOMString &value)
+{
+ TypingCommand::insertNewline(part->xmlDocImpl());
+ return true;
+}
+
bool execInsertParagraph(KHTMLPart *part, bool userInterface, const DOMString &value)
{
// FIXME: Implement.
@@ -450,6 +456,7 @@ QDict<CommandImp> createCommandDictionary()
{ "fontSize", { execFontSize, enabledAnySelection, stateNone, valueFontSize } },
{ "foreColor", { execForeColor, enabledAnySelection, stateNone, valueForeColor } },
{ "indent", { execIndent, enabledAnySelection, stateNone, valueNull } },
+ { "insertNewline", { execInsertNewline, enabledAnySelection, stateNone, valueNull } },
{ "insertParagraph", { execInsertParagraph, enabledAnySelection, stateNone, valueNull } },
{ "insertText", { execInsertText, enabledAnySelection, stateNone, valueNull } },
{ "italic", { execItalic, enabledAnySelection, stateItalic, valueNull } },
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list