[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
benm at google.com
benm at google.com
Wed Mar 17 18:32:57 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d3762a6039a066e4df8b99c48510f0c987f5833e
Author: benm at google.com <benm at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 11 15:25:15 2010 +0000
[Android] The platform touch events on Android are missing support
for key modifiers.
https://bugs.webkit.org/show_bug.cgi?id=35521
Reviewed by Jeremy Orlow.
Add support in PlatformToucHEventAndroid for the platform supplying
key modifiers with touch events.
Fixes Android so it now passes basic-single-touch-events.html.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent): Fix two compiler warnings.
* platform/PlatformTouchEvent.h:
(WebCore::PlatformTouchEvent::PlatformTouchEvent): Add support for
key modifiers on Android.
* platform/android/PlatformTouchEventAndroid.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent): ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 352dbdc..ff79478 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-03-10 Ben Murdoch <benm at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [Android] The platform touch events on Android are missing support
+ for key modifiers.
+ https://bugs.webkit.org/show_bug.cgi?id=35521
+
+ Add support in PlatformToucHEventAndroid for the platform supplying
+ key modifiers with touch events.
+
+ Fixes Android so it now passes basic-single-touch-events.html.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Fix two compiler warnings.
+ * platform/PlatformTouchEvent.h:
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent): Add support for
+ key modifiers on Android.
+ * platform/android/PlatformTouchEventAndroid.cpp:
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent): ditto.
+
2010-03-10 Steve Block <steveblock at google.com>
Reviewed by Jeremy Orlow.
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 31dcc6d..ba5a04b 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2610,7 +2610,7 @@ static PassRefPtr<TouchList> assembleTargetTouches(Touch* touchTarget, TouchList
{
RefPtr<TouchList> targetTouches = TouchList::create();
- for (int i = 0; i < touches->length(); ++i) {
+ for (unsigned i = 0; i < touches->length(); ++i) {
if (touches->item(i)->target()->toNode()->isSameNode(touchTarget->target()->toNode()))
targetTouches->append(touches->item(i));
}
@@ -2629,7 +2629,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
const Vector<PlatformTouchPoint>& points = event.touchPoints();
AtomicString* eventName = 0;
- for (int i = 0; i < points.size(); ++i) {
+ for (unsigned i = 0; i < points.size(); ++i) {
const PlatformTouchPoint& point = points[i];
IntPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
HitTestResult result = hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ false);
@@ -2709,7 +2709,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
*eventName, touchEventTarget->toNode()->document()->defaultView(),
0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
-
ExceptionCode ec = 0;
touchEventTarget->dispatchEvent(cancelEv.get(), ec);
defaultPrevented |= cancelEv->defaultPrevented();
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index 45edd00..aab6249 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -56,7 +56,7 @@ public:
#if PLATFORM(QT)
PlatformTouchEvent(QTouchEvent*);
#elif PLATFORM(ANDROID)
- PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State);
+ PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State, int metaState);
#endif
TouchEventType type() const { return m_type; }
diff --git a/WebCore/platform/android/PlatformTouchEventAndroid.cpp b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
index 65d787d..e33aec0 100644
--- a/WebCore/platform/android/PlatformTouchEventAndroid.cpp
+++ b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
@@ -30,14 +30,22 @@
namespace WebCore {
-PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state)
+// These values should be kept in sync with those defined in the android.view.KeyEvent class from the Android SDK.
+enum AndroidMetaKeyState {
+ META_SHIFT_ON = 0x01,
+ META_ALT_ON = 0x02,
+ META_SYM_ON = 0x04
+};
+
+PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state, int metaState)
: m_type(type)
- , m_ctrlKey(false)
- , m_altKey(false)
- , m_shiftKey(false)
, m_metaKey(false)
{
m_touchPoints.append(PlatformTouchPoint(windowPos, state));
+
+ m_altKey = metaState & META_ALT_ON;
+ m_shiftKey = metaState & META_SHIFT_ON;
+ m_ctrlKey = metaState & META_SYM_ON;
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list