summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-03-01 12:14:11 +0000
committerBen Murdoch <benm@google.com>2010-03-11 17:16:08 +0000
commit0361ff17d43cdfdc6c9d3ae65e8716a4cbeed862 (patch)
tree6e1fcdc3029b7ad96fc502fdb7525243244aaa1f
parentaf63f0d78dd59f396707681f28fe70ab300fcd8d (diff)
downloadexternal_webkit-0361ff17d43cdfdc6c9d3ae65e8716a4cbeed862.zip
external_webkit-0361ff17d43cdfdc6c9d3ae65e8716a4cbeed862.tar.gz
external_webkit-0361ff17d43cdfdc6c9d3ae65e8716a4cbeed862.tar.bz2
Prepare touch key modifiers for upstreaming.
Fix two compiler warnings in EventHandler.cpp The webkit bug tracking this was https://bugs.webkit.org/show_bug.cgi?id=35521 and was landed to the WebKit tree as r55843. Change-Id: Id49ba00d49bf98797a79b6f55b1cb1f906f5e0ad
-rw-r--r--WebCore/page/EventHandler.cpp7
-rw-r--r--WebCore/platform/PlatformTouchEvent.h1
-rw-r--r--WebCore/platform/android/PlatformTouchEventAndroid.cpp3
3 files changed, 2 insertions, 9 deletions
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 233fd05..6082cfe 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2554,7 +2554,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));
}
@@ -2573,7 +2573,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);
@@ -2653,7 +2653,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();
@@ -2693,7 +2692,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(longpressEv.get(), ec);
defaultPrevented |= longpressEv->defaultPrevented();
@@ -2704,7 +2702,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(doubleTapEv.get(), ec);
defaultPrevented |= doubleTapEv->defaultPrevented();
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index 7e2ac84..d300a82 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -60,7 +60,6 @@ public:
#if PLATFORM(QT)
PlatformTouchEvent(QTouchEvent*);
#elif PLATFORM(ANDROID)
- // TODO (benm): eventTime and metaState are new and need to be upstreamed.
PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State, int metaState);
#endif
diff --git a/WebCore/platform/android/PlatformTouchEventAndroid.cpp b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
index 0b3ac13..e33aec0 100644
--- a/WebCore/platform/android/PlatformTouchEventAndroid.cpp
+++ b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
@@ -30,7 +30,6 @@
namespace WebCore {
-// TODO(benm): This enum needs upstreaming.
// 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,
@@ -38,14 +37,12 @@ enum AndroidMetaKeyState {
META_SYM_ON = 0x04
};
-// TODO (benm): metaState are new and needs to be upstreamed.
PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state, int metaState)
: m_type(type)
, m_metaKey(false)
{
m_touchPoints.append(PlatformTouchPoint(windowPos, state));
- // TODO(benm): metaState needs upstreaming.
m_altKey = metaState & META_ALT_ON;
m_shiftKey = metaState & META_SHIFT_ON;
m_ctrlKey = metaState & META_SYM_ON;