[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
ap at apple.com
ap at apple.com
Wed Dec 22 11:54:35 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 06149d51756755c14f2da0b6b34441af3ecb5e9c
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 11 06:20:25 2010 +0000
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=43803
<rdar://problem/6988023> Only the last Korean character can be shown if font style is enabled while typing (43803)
Test: platform/mac/editing/input/bold-node.html
* editing/Editor.cpp: (WebCore::Editor::setComposition): It is not clear to me what the
"baseNode == extentNode" check is about in this function , but let's try to make it more
likely that it passes.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 95662cc..d612800 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-10 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43803
+ <rdar://problem/6988023> Only the last Korean character can be shown if font style is enabled while typing (43803)
+
+ * platform/mac/editing/input/bold-node-expected.txt: Added.
+ * platform/mac/editing/input/bold-node.html: Added.
+
2010-08-10 Matthew Delaney <mdelaney at apple.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/mac/editing/input/bold-node-expected.txt b/LayoutTests/platform/mac/editing/input/bold-node-expected.txt
new file mode 100644
index 0000000..200ef24
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/input/bold-node-expected.txt
@@ -0,0 +1,3 @@
+Test for rdar://problem/6988023: Only the last Korean character can be shown if font style is enabled while typing.
+
+PASS
diff --git a/LayoutTests/platform/mac/editing/input/bold-node.html b/LayoutTests/platform/mac/editing/input/bold-node.html
new file mode 100644
index 0000000..bd32962
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/input/bold-node.html
@@ -0,0 +1,23 @@
+<meta charset="utf-8">
+<body>
+<p>Test for <a href="rdar://problem/6988023">rdar://problem/6988023</a>: Only the last Korean character can be shown if font style is enabled while typing.</p>
+<div contenteditable id=div></div>
+<script>
+var div = document.getElementById("div");
+div.focus();
+
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+
+ textInputController.insertText("a");
+ textInputController.doCommand("toggleBold:");
+ textInputController.setMarkedText("b", 0, 1);
+ div.innerHTML = (textInputController.hasMarkedText()) ? "PASS" : "FAIL";
+} else {
+ document.write("To test manually:<br>" +
+ "1. Type any character to the focused input field, then enable 2-Set Hangul input method.<br>" +
+ "2. Press 'Command + B', 'Command + I' or 'Command + U'.<br>" +
+ "3. Type any Korean characters (e.g. \"한글(gksrmf)\" ) after the character typed in Step 1, check the results.");
+}
+</script>
+</body>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9641517..4210961 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-10 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43803
+ <rdar://problem/6988023> Only the last Korean character can be shown if font style is enabled while typing (43803)
+
+ Test: platform/mac/editing/input/bold-node.html
+
+ * editing/Editor.cpp: (WebCore::Editor::setComposition): It is not clear to me what the
+ "baseNode == extentNode" check is about in this function , but let's try to make it more
+ likely that it passes.
+
2010-08-10 Hayato Ito <hayato at chromium.org>
Reviewed by Kent Tamura.
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 7a1ad4d..34d97f1 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -1514,10 +1514,13 @@ void Editor::setComposition(const String& text, const Vector<CompositionUnderlin
if (!text.isEmpty()) {
TypingCommand::insertText(m_frame->document(), text, true, true);
- Node* baseNode = m_frame->selection()->base().node();
- unsigned baseOffset = m_frame->selection()->base().deprecatedEditingOffset();
- Node* extentNode = m_frame->selection()->extent().node();
- unsigned extentOffset = m_frame->selection()->extent().deprecatedEditingOffset();
+ // Find out what node has the composition now.
+ Position base = m_frame->selection()->base().downstream();
+ Position extent = m_frame->selection()->extent();
+ Node* baseNode = base.node();
+ unsigned baseOffset = base.deprecatedEditingOffset();
+ Node* extentNode = extent.node();
+ unsigned extentOffset = extent.deprecatedEditingOffset();
if (baseNode && baseNode == extentNode && baseNode->isTextNode() && baseOffset + text.length() == extentOffset) {
m_compositionNode = static_cast<Text*>(baseNode);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list