[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:19:57 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4fef01278e98f8b1c483136423a7ad3a173484f0
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Sep 11 07:07:00 2010 +0000
2010-09-10 yi shen <yi.4.shen at nokia.com>
Reviewed by Antonio Gomes.
[Qt] selected text gets deleted when qgraphicswebview losts focus
https://bugs.webkit.org/show_bug.cgi?id=45539
* Api/qwebpage.cpp:
(QWebPagePrivate::inputMethodEvent):
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::inputMethods):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 8bf9208..a81ff56 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -1201,7 +1201,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
(selection.length < 0) ? selection.start : selection.start + selection.length);
} else
#endif
- editor->setComposition(preedit, underlines, preedit.length(), 0);
+ if (!preedit.isEmpty())
+ editor->setComposition(preedit, underlines, preedit.length(), 0);
}
ev->accept();
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 1d5040b..ec15703 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-10 yi shen <yi.4.shen at nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] selected text gets deleted when qgraphicswebview losts focus
+ https://bugs.webkit.org/show_bug.cgi?id=45539
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
2010-09-10 Sam Weinig <sam at webkit.org>
Fix Qt build.
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 9a6c35f..da19b0e 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1661,6 +1661,22 @@ void tst_QWebPage::inputMethods()
QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
#endif
+#if QT_VERSION >= 0x040600
+ //START - Test for sending empty QInputMethodEvent
+ page->mainFrame()->setHtml("<html><body>" \
+ "<input type='text' id='input3' value='QtWebKit2'/>" \
+ "</body></html>");
+ page->mainFrame()->evaluateJavaScript("var inputEle = document.getElementById('input3'); inputEle.focus(); inputEle.select();");
+
+ //Send empty QInputMethodEvent
+ QInputMethodEvent emptyEvent;
+ page->event(&emptyEvent);
+
+ QString inputValue = page->mainFrame()->evaluateJavaScript("document.getElementById('input3').value").toString();
+ QCOMPARE(inputValue, QString("QtWebKit2"));
+ //END - Test for sending empty QInputMethodEvent
+#endif
+
delete container;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list