[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kim.1.gronholm at nokia.com
kim.1.gronholm at nokia.com
Wed Dec 22 11:29:37 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 1ad477af0b5e8644376edb7169f35dd2cc04a38f
Author: kim.1.gronholm at nokia.com <kim.1.gronholm at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 27 09:51:48 2010 +0000
2010-07-27 Kim Grönholm <kim.1.gronholm at nokia.com>
Reviewed by Simon Hausmann.
[Qt] Decouple QTouchEvent's accepted flag from JS prevent default
https://bugs.webkit.org/show_bug.cgi?id=42892
We need to always accept the QTouchEvents in order to get TouchUpdate and
TouchEnd events. QWebPage::event() return value is used to indicate
whether the default action was prevented for the touch events.
* Api/qgraphicswebview.cpp:
(QGraphicsWebView::sceneEvent):
* Api/qwebpage.cpp:
(QWebPagePrivate::touchEvent):
(QWebPage::event):
* Api/qwebpage_p.h:
* Api/qwebview.cpp:
(QWebView::event):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 8fbb8e2..853e637 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -319,8 +319,7 @@ bool QGraphicsWebView::sceneEvent(QEvent* event)
|| event->type() == QEvent::TouchEnd
|| event->type() == QEvent::TouchUpdate)) {
d->page->event(event);
- if (event->isAccepted())
- return true;
+ return true;
}
#endif
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 70e132c..1dda884 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -1391,14 +1391,14 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame)
}
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
-void QWebPagePrivate::touchEvent(QTouchEvent* event)
+bool QWebPagePrivate::touchEvent(QTouchEvent* event)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
- return;
+ return false;
- bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
- event->setAccepted(accepted);
+ event->setAccepted(true);
+ return frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
}
#endif
@@ -2842,8 +2842,7 @@ bool QWebPage::event(QEvent *ev)
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
- d->touchEvent(static_cast<QTouchEvent*>(ev));
- break;
+ return d->touchEvent(static_cast<QTouchEvent*>(ev));
#endif
#ifndef QT_NO_PROPERTIES
case QEvent::DynamicPropertyChange:
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index 54a1523..3df2004 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -132,7 +132,7 @@ public:
bool handleScrolling(QKeyEvent*, WebCore::Frame*);
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
- void touchEvent(QTouchEvent*);
+ bool touchEvent(QTouchEvent*);
#endif
void setInspector(QWebInspector*);
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 2defdbb..5673326 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -826,8 +826,7 @@ bool QWebView::event(QEvent *e)
|| e->type() == QEvent::TouchEnd
|| e->type() == QEvent::TouchUpdate) {
d->page->event(e);
- if (e->isAccepted())
- return true;
+ return true;
#endif
} else if (e->type() == QEvent::Leave)
d->page->event(e);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 2c62e25..2914174 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-27 Kim Grönholm <kim.1.gronholm at nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Decouple QTouchEvent's accepted flag from JS prevent default
+ https://bugs.webkit.org/show_bug.cgi?id=42892
+
+ We need to always accept the QTouchEvents in order to get TouchUpdate and
+ TouchEnd events. QWebPage::event() return value is used to indicate
+ whether the default action was prevented for the touch events.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::sceneEvent):
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::touchEvent):
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+ * Api/qwebview.cpp:
+ (QWebView::event):
+
2010-07-26 Tor Arne Vestbø <tor.arne.vestbo at nokia.com>
Reviewed by Simon Hausmann.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list