[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:40:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit a9f75d8759a41df90fc3ee75bf12fa3d1c0eb25e
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 23 05:15:16 2010 +0000
2010-09-22 Kwang Yul Seo <skyul at company100.net>
Reviewed by Adam Barth.
[BREWMP] Enable touch events
https://bugs.webkit.org/show_bug.cgi?id=46321
Enable TOUCH_EVENTS by porting PlatformTouchEvent and PlatformTouchPoint.
Brew MP does not support multi touch, so enable only single touch for now.
* platform/PlatformTouchEvent.h:
* platform/PlatformTouchPoint.h:
* platform/brew/PlatformTouchEventBrew.cpp: Added.
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/brew/PlatformTouchPointBrew.cpp: Added.
(WebCore::PlatformTouchPoint::PlatformTouchPoint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 09393a1..a081caa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-22 Kwang Yul Seo <skyul at company100.net>
+
+ Reviewed by Adam Barth.
+
+ [BREWMP] Enable touch events
+ https://bugs.webkit.org/show_bug.cgi?id=46321
+
+ Enable TOUCH_EVENTS by porting PlatformTouchEvent and PlatformTouchPoint.
+ Brew MP does not support multi touch, so enable only single touch for now.
+
+ * platform/PlatformTouchEvent.h:
+ * platform/PlatformTouchPoint.h:
+ * platform/brew/PlatformTouchEventBrew.cpp: Added.
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent):
+ * platform/brew/PlatformTouchPointBrew.cpp: Added.
+ (WebCore::PlatformTouchPoint::PlatformTouchPoint):
+
2010-09-22 Andy Estes <aestes at apple.com>
Rubber-stamped by Darin Adler.
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index aab6249..6fae2e6 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -35,6 +35,12 @@ QT_END_NAMESPACE
#include "IntPoint.h"
#endif
+#if PLATFORM(BREWMP)
+typedef unsigned short uint16;
+typedef unsigned long int uint32;
+#define AEEEvent uint16
+#endif
+
namespace WebCore {
enum TouchEventType {
@@ -57,6 +63,8 @@ public:
PlatformTouchEvent(QTouchEvent*);
#elif PLATFORM(ANDROID)
PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State, int metaState);
+#elif PLATFORM(BREWMP)
+ PlatformTouchEvent(AEEEvent, uint16 wParam, uint32 dwParam);
#endif
TouchEventType type() const { return m_type; }
diff --git a/WebCore/platform/PlatformTouchPoint.h b/WebCore/platform/PlatformTouchPoint.h
index 3a25736..bc9190e 100644
--- a/WebCore/platform/PlatformTouchPoint.h
+++ b/WebCore/platform/PlatformTouchPoint.h
@@ -48,6 +48,8 @@ public:
PlatformTouchPoint() {};
#elif PLATFORM(ANDROID)
PlatformTouchPoint(const IntPoint& windowPos, State);
+#elif PLATFORM(BREWMP)
+ PlatformTouchPoint(int id, const IntPoint& windowPos, State);
#endif
unsigned id() const { return m_id; }
diff --git a/WebCore/platform/brew/PlatformTouchEventBrew.cpp b/WebCore/platform/brew/PlatformTouchEventBrew.cpp
new file mode 100644
index 0000000..9f31dae
--- /dev/null
+++ b/WebCore/platform/brew/PlatformTouchEventBrew.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2010, Company 100, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformTouchEvent.h"
+
+#include <AEEEvent.h>
+#include <AEEPointerHelpers.h>
+#include <AEEVCodes.h>
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchEvent::PlatformTouchEvent(AEEEvent event, uint16 wParam, uint32 dwParam)
+ : m_metaKey(false)
+{
+ PlatformTouchPoint::State state;
+
+ switch (event) {
+ case EVT_POINTER_DOWN:
+ m_type = TouchStart;
+ state = PlatformTouchPoint::TouchPressed;
+ break;
+ case EVT_POINTER_UP:
+ m_type = TouchEnd;
+ state = PlatformTouchPoint::TouchReleased;
+ break;
+ case EVT_POINTER_MOVE:
+ case EVT_POINTER_STALE_MOVE:
+ m_type = TouchMove;
+ state = PlatformTouchPoint::TouchMoved;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+ char* dwParamStr = reinterpret_cast<char*>(dwParam);
+ int x, y;
+ AEE_POINTER_GET_XY(dwParamStr, &x, &y);
+ IntPoint windowPos = IntPoint(x, y);
+
+ int id = AEE_POINTER_GET_PTRID(dwParamStr);
+ m_touchPoints.append(PlatformTouchPoint(id, windowPos, state));
+
+ uint32 keyModifiers = AEE_POINTER_GET_KEY_MODIFIERS(dwParamStr);
+ m_altKey = keyModifiers & (KB_LALT | KB_RALT);
+ m_shiftKey = keyModifiers & (KB_LSHIFT | KB_RSHIFT);
+ m_ctrlKey = keyModifiers & (KB_LCTRL | KB_RCTRL);
+}
+
+}
+
+#endif
diff --git a/WebCore/platform/brew/PlatformTouchPointBrew.cpp b/WebCore/platform/brew/PlatformTouchPointBrew.cpp
new file mode 100644
index 0000000..6943182
--- /dev/null
+++ b/WebCore/platform/brew/PlatformTouchPointBrew.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2010, Company 100, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformTouchPoint.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchPoint::PlatformTouchPoint(int id, const IntPoint& windowPos, State state)
+ : m_id(id)
+ , m_state(state)
+ , m_screenPos(windowPos)
+ , m_pos(windowPos) { }
+
+}
+
+#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list