summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/Api
diff options
context:
space:
mode:
authorJoe Ligman <joseph.ligman@nokia.com>2009-10-09 17:31:50 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-10-11 20:28:47 (GMT)
commit3e584d5dfaa778ccaeaeb572aecbc979f5a7ef3e (patch)
tree89e57887b169c40456fba782f01caeceec59e24f /src/3rdparty/webkit/WebKit/qt/Api
parent997ca7464c26e4ca20fa6c593e84db86afe660f1 (diff)
downloadQt-3e584d5dfaa778ccaeaeb572aecbc979f5a7ef3e.zip
Qt-3e584d5dfaa778ccaeaeb572aecbc979f5a7ef3e.tar.gz
Qt-3e584d5dfaa778ccaeaeb572aecbc979f5a7ef3e.tar.bz2
2009-10-09 Joe Ligman <joseph.ligman@nokia.com>
Reviewed by Simon Hausmann. Sets Qt::WA_InputMethodEnabled and Qt::ImhHiddenText for password fields in EditorClientQt setInputMethodState. This change is needed so widgets such as the s60 software input panel can receive input method events for password fields. It's up to the Qt platform to determine which widget will receive input method events when these flags are set. Also added implementation for setInputMethodEnabled and setInputMethodHint to QGraphicsWebViewPrivate and QWebViewPrivate. This change removes the direct dependency on QWebView and uses QWebPageClient. Added autotest to tst_qwebpage.cpp https://bugs.webkit.org/show_bug.cgi?id=30023 * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::setInputMethodEnabled): (QGraphicsWebViewPrivate::setInputMethodHint): * Api/qwebview.cpp: (QWebViewPrivate::setInputMethodEnabled): (QWebViewPrivate::setInputMethodHint): * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::setInputMethodState): * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods): 2009-10-09 Joe Ligman <joseph.ligman@nokia.com> Reviewed by Simon Hausmann. [Qt] Added pure virtual methods setInputMethodEnabled and setInputMethodHint to QWebPageClient https://bugs.webkit.org/show_bug.cgi?id=30023 * platform/qt/QWebPageClient.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49397 268f45cc-cd09-0410-ab3c-d52691b4dbfc Signed-off-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp19
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp18
2 files changed, 37 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
index 2a0ee20..b11890d 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
@@ -44,6 +44,10 @@ public:
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
+ virtual void setInputMethodEnabled(bool enable);
+#if QT_VERSION >= 0x040600
+ virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
+#endif
virtual QCursor cursor() const;
virtual void updateCursor(const QCursor& cursor);
@@ -95,6 +99,21 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
q->update(QRectF(dirtyRect));
}
+void QGraphicsWebViewPrivate::setInputMethodEnabled(bool enable)
+{
+ q->setAttribute(Qt::WA_InputMethodEnabled, enable);
+}
+
+#if QT_VERSION >= 0x040600
+void QGraphicsWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
+{
+ if (enable)
+ q->setInputMethodHints(q->inputMethodHints() | hint);
+ else
+ q->setInputMethodHints(q->inputMethodHints() & ~hint);
+}
+#endif
+
QCursor QGraphicsWebViewPrivate::cursor() const
{
return q->cursor();
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index 882f3d7..b06b93a 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -47,6 +47,10 @@ public:
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
+ virtual void setInputMethodEnabled(bool enable);
+#if QT_VERSION >= 0x040600
+ virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
+#endif
virtual QCursor cursor() const;
virtual void updateCursor(const QCursor& cursor);
@@ -72,6 +76,20 @@ void QWebViewPrivate::update(const QRect & dirtyRect)
view->update(dirtyRect);
}
+void QWebViewPrivate::setInputMethodEnabled(bool enable)
+{
+ view->setAttribute(Qt::WA_InputMethodEnabled, enable);
+}
+#if QT_VERSION >= 0x040600
+void QWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
+{
+ if (enable)
+ view->setInputMethodHints(view->inputMethodHints() | hint);
+ else
+ view->setInputMethodHints(view->inputMethodHints() & ~hint);
+}
+#endif
+
QCursor QWebViewPrivate::cursor() const
{
return view->cursor();