Commit 50e394a6 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2010-12-23 Jan Erik Hanssen <jhanssen@sencha.com>

        Reviewed by Alexey Proskuryakov.

        [Qt] Composition text is not removed from the editor when composition is cancelled
        https://bugs.webkit.org/show_bug.cgi?id=29391

        Ensure that the composition text is cleared when an empty QInputMethodEvent
        is received and the editor is in composition mode.

        * editing/input/ime-composition-clearpreedit-expected.txt: Added.
        * editing/input/ime-composition-clearpreedit.html: Added.
        * platform/gtk/Skipped:
        * platform/mac-wk2/Skipped:
        * platform/qt-wk2/Skipped:
2010-12-23  Jan Erik Hanssen  <jhanssen@sencha.com>

        Reviewed by Alexey Proskuryakov.

        [Qt] Composition text is not removed from the editor when composition is cancelled
        https://bugs.webkit.org/show_bug.cgi?id=29391

        Ensure that the composition text is cleared when an empty QInputMethodEvent
        is received and the editor is in composition mode.

        * Api/qwebpage.cpp:
        (QWebPagePrivate::inputMethodEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a4875cbb
2010-12-23 Jan Erik Hanssen <jhanssen@sencha.com>
Reviewed by Alexey Proskuryakov.
[Qt] Composition text is not removed from the editor when composition is cancelled
https://bugs.webkit.org/show_bug.cgi?id=29391
Ensure that the composition text is cleared when an empty QInputMethodEvent
is received and the editor is in composition mode.
* editing/input/ime-composition-clearpreedit-expected.txt: Added.
* editing/input/ime-composition-clearpreedit.html: Added.
* platform/gtk/Skipped:
* platform/mac-wk2/Skipped:
* platform/qt-wk2/Skipped:
2010-12-23 Benjamin Kalman <kalman@chromium.org>
Reviewed by Ryosuke Niwa.
......
This tests that clearing a text compose doesn't leave the composed text behild in the text field
To test manually, enable an IME, input characters, clear the compose and see if the input field only contains the initial value
SUCCESS COMPOSE
SUCCESS CLEAR
<html>
<head>
<title></title>
</head>
<body>
<p>This tests that clearing a text compose doesn't leave the composed text behild in the text field</p>
<p>To test manually, enable an IME, input characters, clear the compose and see if the input field only contains the initial value</p>
<input id="test" type="text" value=""/>
<ul id="console"></ul>
<script language="javascript" type="text/javascript">
function log(str) {
var li = document.createElement('li');
li.appendChild(document.createTextNode(str));
var console = document.getElementById('console');
console.appendChild(li);
}
var test = document.getElementById('test');
test.focus();
if (window.layoutTestController) {
layoutTestController.dumpAsText();
// Compose text.
textInputController.setMarkedText('5', 5, 1);
textInputController.setMarkedText('6', 5, 1);
textInputController.setMarkedText('7', 5, 1);
// Verify that the input field contains the composed value
log(test.value == "7" ? "SUCCESS COMPOSE" : "FAILED COMPOSE");
textInputController.setMarkedText('', 0, 1);
// Verify that the input field only contains its initial value
log(test.value == "" ? "SUCCESS CLEAR" : "FAILED CLEAR");
}
</script>
</body>
</html>
......@@ -4698,6 +4698,7 @@ fast/forms/input-maxlength-ime-preedit.html
fast/text/international/thai-cursor-position.html
fast/events/ime-composition-events-001.html
fast/dom/tab-in-right-alignment.html
editing/input/ime-composition-clearpreedit.html
# No User Scripts
userscripts/script-not-run-for-fragments.html
......
......@@ -1418,6 +1418,7 @@ http/tests/loading/state-object-security-exception.html
# WebKitTestRunner needs textInputController
# <https://bugs.webkit.org/show_bug.cgi?id=42337>
editing/input/ime-composition-clearpreedit.html
editing/spelling/spelling-contenteditable.html
editing/spelling/spelling-textarea.html
editing/spelling/spelling-backspace-between-lines.html
......
......@@ -1618,6 +1618,7 @@ fast/history/gesture-before-onload-location-href.html
# WebKitTestRunner needs textInputController
# <https://bugs.webkit.org/show_bug.cgi?id=42337>
editing/input/ime-composition-clearpreedit.html
editing/spelling/spelling-backspace-between-lines.html
editing/selection/5825350-1.html
editing/selection/5825350-2.html
......
......@@ -1099,6 +1099,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
editor->confirmComposition(ev->commitString());
else if (!hasSelection && !ev->preeditString().isEmpty())
editor->setComposition(ev->preeditString(), underlines, 0, 0);
else if (ev->preeditString().isEmpty() && editor->hasComposition())
editor->confirmComposition(String());
ev->accept();
}
......
2010-12-23 Jan Erik Hanssen <jhanssen@sencha.com>
Reviewed by Alexey Proskuryakov.
[Qt] Composition text is not removed from the editor when composition is cancelled
https://bugs.webkit.org/show_bug.cgi?id=29391
Ensure that the composition text is cleared when an empty QInputMethodEvent
is received and the editor is in composition mode.
* Api/qwebpage.cpp:
(QWebPagePrivate::inputMethodEvent):
2010-12-23 Jan Erik Hanssen <jhanssen@sencha.com>
 
Reviewed by Andreas Kling.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment