summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-10-01 16:59:28 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-10-01 17:01:21 (GMT)
commit712eece4e399fe5ca916ecf7b6d77fdddddbf7fe (patch)
treeac6c53c492a6104efbd245cef8ae3fcef26a700f /src/3rdparty
parent2a54ab7fe6f3979a75154a02c0c810cf6cd28033 (diff)
downloadQt-712eece4e399fe5ca916ecf7b6d77fdddddbf7fe.zip
Qt-712eece4e399fe5ca916ecf7b6d77fdddddbf7fe.tar.gz
Qt-712eece4e399fe5ca916ecf7b6d77fdddddbf7fe.tar.bz2
Make Software Input Panel requests work with QGraphicsWebView _and_ QWebView by sharing the event code in handleSoftwareInputPanel().
Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2009-10-01 Reviewed by Tor Arne Vestbø. * Api/qwebpage.cpp: (QWebPagePrivate::mouseReleaseEvent): (QWebPagePrivate::handleSoftwareInputPanel): * Api/qwebpage_p.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog12
3 files changed, 19 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index d1a4059..942c3ea 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -764,10 +764,14 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
ev->setAccepted(accepted);
handleClipboard(ev, ev->button());
+ handleSoftwareInputPanel(ev->button());
+}
+void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button)
+{
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
if (view && view->testAttribute(Qt::WA_InputMethodEnabled)
- && ev->button() == Qt::LeftButton && qApp->autoSipEnabled()) {
+ && button == Qt::LeftButton && qApp->autoSipEnabled()) {
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
view->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
@@ -794,6 +798,7 @@ void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev)
ev->setAccepted(accepted);
handleClipboard(ev, ev->button());
+ handleSoftwareInputPanel(ev->button());
}
#ifndef QT_NO_CONTEXTMENU
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
index d41471a..b9571fa 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
@@ -111,6 +111,7 @@ public:
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
void handleClipboard(QEvent*, Qt::MouseButton);
+ void handleSoftwareInputPanel(Qt::MouseButton);
bool handleScrolling(QKeyEvent*, WebCore::Frame*);
void setInspector(QWebInspector*);
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 8b9b14f..fd2768c 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Make Software Input Panel requests work with QGraphicsWebView
+ _and_ QWebView by sharing the event code in handleSoftwareInputPanel().
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::mouseReleaseEvent):
+ (QWebPagePrivate::handleSoftwareInputPanel):
+ * Api/qwebpage_p.h:
+
2009-10-01 Kristian Amlie <kristian.amlie@nokia.com>
Reviewed by Simon Hausmann.