[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
ap at apple.com
ap at apple.com
Tue Jan 5 23:59:42 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit f467db9f7405bb22bee17c6db06113ebf5e7c3e0
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 24 05:49:15 2009 +0000
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=32905
With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion
Test: platform/mac/editing/input/selection-change-closes-typing.html
* editing/Editor.cpp: (WebCore::Editor::confirmComposition): If this function wasn't allowed
to change selection, it needs to close the current typing command - otherwise, its idea of
selection would be used for future typing.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 223bb29..fafbc09 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-23 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32905
+ With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion
+
+ * platform/mac/editing/input/selection-change-closes-typing-expected.txt: Added.
+ * platform/mac/editing/input/selection-change-closes-typing.html: Added.
+
2009-12-23 David Levin <levin at chromium.org>
REGRESSION (r52494): Assertion failure in Frame::caretBlinkTimerFired() (selection()->isCaret())
diff --git a/LayoutTests/platform/mac/editing/input/selection-change-closes-typing-expected.txt b/LayoutTests/platform/mac/editing/input/selection-change-closes-typing-expected.txt
new file mode 100644
index 0000000..b0c6375
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/input/selection-change-closes-typing-expected.txt
@@ -0,0 +1,5 @@
+Test for bug 32905: With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion.
+
+Should say PASS: PASS
+
+
diff --git a/LayoutTests/platform/mac/editing/input/selection-change-closes-typing.html b/LayoutTests/platform/mac/editing/input/selection-change-closes-typing.html
new file mode 100644
index 0000000..a7b8f6d
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/input/selection-change-closes-typing.html
@@ -0,0 +1,31 @@
+<html>
+<body>
+<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32905">bug 32905</a>:
+With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion.</p>
+<p>Should say PASS: </p>
+<input id="test">
+<script type="text/javascript">
+
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var testInput = document.getElementById("test");
+ testInput.focus();
+
+ if (window.layoutTestController) {
+
+ try {
+ textInputController.setMarkedText("P", 1, 0);
+ testInput.value="PAS";
+ eventSender.keyDown("S");
+
+ document.getElementsByTagName("p")[1].innerHTML += testInput.value;
+
+ } catch (ex) {
+ document.write("Exception: " + ex.description);
+ }
+ } else
+ document.write("This test only runs in automated mode<br>");
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fac25eb..f0a70ef 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-23 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32905
+ With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion
+
+ Test: platform/mac/editing/input/selection-change-closes-typing.html
+
+ * editing/Editor.cpp: (WebCore::Editor::confirmComposition): If this function wasn't allowed
+ to change selection, it needs to close the current typing command - otherwise, its idea of
+ selection would be used for future typing.
+
2009-12-23 Yuta Kitamura <yutak at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 0744fd6..0bf0ba1 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -1391,8 +1391,11 @@ void Editor::confirmComposition(const String& text, bool preserveSelection)
insertText(text, 0);
- if (preserveSelection)
+ if (preserveSelection) {
m_frame->selection()->setSelection(oldSelection, false, false);
+ // An open typing command that disagrees about current selection would cause issues with typing later on.
+ TypingCommand::closeTyping(m_lastEditCommand.get());
+ }
setIgnoreCompositionSelectionChange(false);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list