2010-11-20 Sheriff Bot <webkit.review.bot@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Nov 2010 17:33:26 +0000 (17:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Nov 2010 17:33:26 +0000 (17:33 +0000)
        Unreviewed, rolling out r72471.
        http://trac.webkit.org/changeset/72471
        https://bugs.webkit.org/show_bug.cgi?id=49865

        broke two IME tests on Qt (Requested by kling on #webkit).

        * Api/qwebpage.cpp:
        (QWebPagePrivate::inputMethodEvent):
        * tests/qwebpage/tst_qwebpage.cpp:
        (tst_QWebPage::inputMethods):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72475 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/Api/qwebpage.cpp
WebKit/qt/ChangeLog
WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

index a81ad08..2e8c6b7 100644 (file)
@@ -1080,15 +1080,9 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
         }
     }
 
-    if (node && ev->replacementLength() > 0) {
-        int cursorPos = frame->selection()->extent().offsetInContainerNode();
-        int start = cursorPos + ev->replacementStart();
-        setSelectionRange(node, start, start + ev->replacementLength());
-        // Commit regardless of whether commitString is empty, to get rid of selection.
+    if (!ev->commitString().isEmpty())
         editor->confirmComposition(ev->commitString());
-    } else if (!ev->commitString().isEmpty())
-        editor->confirmComposition(ev->commitString());
-    if (!hasSelection && !ev->preeditString().isEmpty())
+    else if (!hasSelection && !ev->preeditString().isEmpty())
         editor->setComposition(ev->preeditString(), underlines, 0, 0);
 
     ev->accept();
index eec494e..83ced7f 100644 (file)
@@ -1,3 +1,16 @@
+2010-11-20  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r72471.
+        http://trac.webkit.org/changeset/72471
+        https://bugs.webkit.org/show_bug.cgi?id=49865
+
+        broke two IME tests on Qt (Requested by kling on #webkit).
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::inputMethodEvent):
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::inputMethods):
+
 2010-11-19  Kristian Amlie  <kristian.amlie@nokia.com>
 
         Reviewed by Andreas Kling.
index 1f6ada0..413984a 100644 (file)
@@ -1568,20 +1568,6 @@ void tst_QWebPage::inputMethods()
     page->event(&evpres);
     page->event(&evrel);
 
-    {
-        QList<QInputMethodEvent::Attribute> attributes;
-        QInputMethodEvent event(QString(), attributes);
-        event.setCommitString("XXX", 0, 0);
-        page->event(&event);
-        event.setCommitString(QString(), -2, 2); // Erase two characters.
-        page->event(&event);
-        event.setCommitString(QString(), -1, 1); // Erase one character.
-        page->event(&event);
-        variant = page->inputMethodQuery(Qt::ImSurroundingText);
-        value = variant.value<QString>();
-        QCOMPARE(value, QString("QtWebKit"));
-    }
-
     //Move to the start of the line
     page->triggerAction(QWebPage::MoveToStartOfLine);