[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

commit-queue at webkit.org commit-queue at webkit.org
Fri Jan 21 14:40:42 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit f59758d1e13ba3bbe7da25e0b989894e92735da1
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 24 11:27:55 2010 +0000

    2010-12-24  Ryuan Choi  <ryuan.choi at samsung.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [EFL] Add option to enable Touch Events.
            https://bugs.webkit.org/show_bug.cgi?id=49125
    
            Add ENABLE_TOUCH_EVENTS option.
    
            * cmake/OptionsEfl.cmake:
            * cmakeconfig.h.cmake:
    2010-12-24  Ryuan Choi  <ryuan.choi at samsung.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [EFL] Add option to enable Touch Events.
            https://bugs.webkit.org/show_bug.cgi?id=49125
    
            Add files for EFL to support TOUCH_EVENTS.
    
            * CMakeLists.txt:
            * CMakeListsEfl.txt:
            * platform/PlatformTouchEvent.h: Add EFL related constructor.
            * platform/PlatformTouchPoint.h: ditto.
            * platform/efl/PlatformTouchEventEfl.cpp: Added.
            (WebCore::PlatformTouchEvent::PlatformTouchEvent):
            * platform/efl/PlatformTouchPointEfl.cpp: Added.
            (WebCore::PlatformTouchPoint::PlatformTouchPoint):
    2010-12-24  Ryuan Choi  <ryuan.choi at samsung.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [EFL] Add option to enable Touch Events.
            https://bugs.webkit.org/show_bug.cgi?id=49125
    
            Implement ewk_frame_feed_touch_event to feed touch events. Because EFL
            doesn't have touch events, Application should generate and pass it.
    
            * WebCoreSupport/ChromeClientEfl.h:
            (WebCore::ChromeClientEfl::needTouchEvents):
            * ewk/ewk_frame.cpp:
            (ewk_frame_feed_touch_event):
            * ewk/ewk_frame.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74626 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/ChangeLog b/ChangeLog
index 4c12db3..f8fcecd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-24  Ryuan Choi  <ryuan.choi at samsung.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [EFL] Add option to enable Touch Events.
+        https://bugs.webkit.org/show_bug.cgi?id=49125
+
+        Add ENABLE_TOUCH_EVENTS option.
+
+        * cmake/OptionsEfl.cmake:
+        * cmakeconfig.h.cmake:
+
 2010-12-23  Adam Barth  <abarth at webkit.org>
 
         Rubber-stamped by Eric Seidel.
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 334d56a..7c6e3e5 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -898,6 +898,9 @@ SET(WebCore_SOURCES
     dom/TagNodeList.cpp
     dom/Text.cpp
     dom/TextEvent.cpp
+    dom/Touch.cpp
+    dom/TouchEvent.cpp
+    dom/TouchList.cpp
     dom/TransformSourceLibxslt.cpp
     dom/Traversal.cpp
     dom/TreeWalker.cpp
diff --git a/WebCore/CMakeListsEfl.txt b/WebCore/CMakeListsEfl.txt
index 9613c8e..4c50d61 100644
--- a/WebCore/CMakeListsEfl.txt
+++ b/WebCore/CMakeListsEfl.txt
@@ -39,6 +39,8 @@ LIST(APPEND WebCore_SOURCES
   platform/efl/PlatformKeyboardEventEfl.cpp
   platform/efl/PlatformMouseEventEfl.cpp
   platform/efl/PlatformScreenEfl.cpp
+  platform/efl/PlatformTouchEventEfl.cpp
+  platform/efl/PlatformTouchPointEfl.cpp
   platform/efl/PlatformWheelEventEfl.cpp
   platform/efl/PopupMenuEfl.cpp
   platform/efl/RenderThemeEfl.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b8fa0f6..ee69b86 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-24  Ryuan Choi  <ryuan.choi at samsung.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [EFL] Add option to enable Touch Events.
+        https://bugs.webkit.org/show_bug.cgi?id=49125
+
+        Add files for EFL to support TOUCH_EVENTS.
+
+        * CMakeLists.txt:
+        * CMakeListsEfl.txt:
+        * platform/PlatformTouchEvent.h: Add EFL related constructor.
+        * platform/PlatformTouchPoint.h: ditto.
+        * platform/efl/PlatformTouchEventEfl.cpp: Added.
+        (WebCore::PlatformTouchEvent::PlatformTouchEvent):
+        * platform/efl/PlatformTouchPointEfl.cpp: Added.
+        (WebCore::PlatformTouchPoint::PlatformTouchPoint):
+
 2010-12-24  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index 69786a8..c6d677c 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -41,6 +41,10 @@ typedef unsigned long int uint32;
 #define AEEEvent uint16
 #endif
 
+#if PLATFORM(EFL)
+typedef struct _Eina_List Eina_List;
+#endif
+
 namespace WebCore {
 
 enum TouchEventType {
@@ -65,6 +69,8 @@ public:
     PlatformTouchEvent(const Vector<IntPoint>&, TouchEventType, PlatformTouchPoint::State, int metaState);
 #elif PLATFORM(BREWMP)
     PlatformTouchEvent(AEEEvent, uint16 wParam, uint32 dwParam);
+#elif PLATFORM(EFL)
+    PlatformTouchEvent(Eina_List*, const IntPoint, TouchEventType, int metaState);
 #endif
 
     TouchEventType type() const { return m_type; }
diff --git a/WebCore/platform/PlatformTouchPoint.h b/WebCore/platform/PlatformTouchPoint.h
index 5746b18..bc19f80 100644
--- a/WebCore/platform/PlatformTouchPoint.h
+++ b/WebCore/platform/PlatformTouchPoint.h
@@ -51,6 +51,8 @@ public:
     PlatformTouchPoint(unsigned id, const IntPoint& windowPos, State);
 #elif PLATFORM(BREWMP)
     PlatformTouchPoint(int id, const IntPoint& windowPos, State);
+#elif PLATFORM(EFL)
+    PlatformTouchPoint(unsigned id, const IntPoint& windowPos, State);
 #endif
 
     unsigned id() const { return m_id; }
diff --git a/WebCore/platform/efl/PlatformTouchEventEfl.cpp b/WebCore/platform/efl/PlatformTouchEventEfl.cpp
new file mode 100644
index 0000000..80dfe6f
--- /dev/null
+++ b/WebCore/platform/efl/PlatformTouchEventEfl.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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 "ewk_frame.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchEvent::PlatformTouchEvent(Eina_List* points, const IntPoint pos, TouchEventType type, int metaState)
+    : m_type(type)
+    , m_ctrlKey(false)
+    , m_altKey(false)
+    , m_shiftKey(false)
+    , m_metaKey(false)
+{
+    void* point;
+
+    EINA_LIST_FREE(points, point) {
+        Ewk_Touch_Point* p = static_cast<Ewk_Touch_Point*>(point);
+        IntPoint pnt = IntPoint(p->x - pos.x(), p->y - pos.y());
+
+        PlatformTouchPoint::State state = PlatformTouchPoint::TouchPressed;
+        switch (p->state) {
+        case EWK_TOUCH_POINT_PRESSED:
+            state = PlatformTouchPoint::TouchPressed;
+            break;
+        case EWK_TOUCH_POINT_RELEASED:
+            state = PlatformTouchPoint::TouchReleased;
+            break;
+        case EWK_TOUCH_POINT_MOVED:
+            state = PlatformTouchPoint::TouchMoved;
+            break;
+        case EWK_TOUCH_POINT_CANCELLED:
+            state = PlatformTouchPoint::TouchCancelled;
+            break;
+        }
+
+        m_touchPoints.append(PlatformTouchPoint(p->id, pnt, state));
+    }
+
+    // FIXME: We don't support metaState for now.
+}
+
+}
+
+#endif
diff --git a/WebCore/platform/efl/PlatformTouchPointEfl.cpp b/WebCore/platform/efl/PlatformTouchPointEfl.cpp
new file mode 100644
index 0000000..b181f68
--- /dev/null
+++ b/WebCore/platform/efl/PlatformTouchPointEfl.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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(unsigned id, const IntPoint& windowPos, State state)
+    : m_id(id)
+    , m_state(state)
+    , m_screenPos(windowPos)
+    , m_pos(windowPos) { }
+
+}
+
+#endif
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index f60f64e..3f6d6e8 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-24  Ryuan Choi  <ryuan.choi at samsung.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [EFL] Add option to enable Touch Events.
+        https://bugs.webkit.org/show_bug.cgi?id=49125
+
+        Implement ewk_frame_feed_touch_event to feed touch events. Because EFL
+        doesn't have touch events, Application should generate and pass it.
+
+        * WebCoreSupport/ChromeClientEfl.h:
+        (WebCore::ChromeClientEfl::needTouchEvents):
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_feed_touch_event):
+        * ewk/ewk_frame.h:
+
 2010-12-22  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index c6c82d4..a714dd4 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -120,6 +120,10 @@ public:
     virtual void showContextMenu() { }
 #endif
 
+#if ENABLE(TOUCH_EVENTS)
+    virtual void needTouchEvents(bool) { }
+#endif
+
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
     virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
     virtual void formStateDidChange(const Node*);
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 5076be5..c6d9068 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -36,6 +36,7 @@
 #include "KURL.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformMouseEvent.h"
+#include "PlatformTouchEvent.h"
 #include "PlatformWheelEvent.h"
 #include "ProgressTracker.h"
 #include "RefPtr.h"
@@ -1474,6 +1475,42 @@ Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* o, const Evas_Event_Mouse_Move*
     return sd->frame->eventHandler()->mouseMoved(event);
 }
 
+Eina_Bool ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState)
+{
+    Eina_Bool ret = EINA_FALSE;
+
+#if ENABLE(TOUCH_EVENTS)
+    EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(points, EINA_FALSE);
+
+    Evas_Coord x, y;
+    evas_object_geometry_get(sd->view, &x, &y, 0, 0);
+
+    WebCore::TouchEventType type = WebCore::TouchStart;
+    switch (action) {
+    case EWK_TOUCH_START:
+        type = WebCore::TouchStart;
+        break;
+    case EWK_TOUCH_END:
+        type = WebCore::TouchEnd;
+        break;
+    case EWK_TOUCH_MOVE:
+        type = WebCore::TouchMove;
+        break;
+    case EWK_TOUCH_CANCEL:
+        type = WebCore::TouchCancel;
+        break;
+    default:
+        return EINA_FALSE;
+    }
+
+    WebCore::PlatformTouchEvent te(points, WebCore::IntPoint(x, y), type, metaState);
+    ret = sd->frame->eventHandler()->handleTouchEvent(te);
+#endif
+    return ret;
+}
+
 static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent &event)
 {
     WebCore::ScrollDirection direction;
diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h
index 156bd82..63936f3 100644
--- a/WebKit/efl/ewk/ewk_frame.h
+++ b/WebKit/efl/ewk/ewk_frame.h
@@ -130,6 +130,26 @@ struct _Ewk_Hit_Test {
     } flags;
 };
 
+typedef enum {
+    EWK_TOUCH_START,
+    EWK_TOUCH_END,
+    EWK_TOUCH_MOVE,
+    EWK_TOUCH_CANCEL
+} Ewk_Touch_Event_Type;
+
+typedef enum {
+    EWK_TOUCH_POINT_PRESSED,
+    EWK_TOUCH_POINT_RELEASED,
+    EWK_TOUCH_POINT_MOVED,
+    EWK_TOUCH_POINT_CANCELLED
+} Ewk_Touch_Point_Type;
+
+typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
+struct _Ewk_Touch_Point {
+    unsigned int id;
+    int x, y;
+    Ewk_Touch_Point_Type state;
+};
 
 EAPI Evas_Object *ewk_frame_view_get(const Evas_Object *o);
 EAPI void         ewk_frame_theme_set(Evas_Object *o, const char *path);
@@ -200,6 +220,7 @@ EAPI Eina_Bool    ewk_frame_feed_mouse_wheel(Evas_Object *o, const Evas_Event_Mo
 EAPI Eina_Bool    ewk_frame_feed_mouse_down(Evas_Object *o, const Evas_Event_Mouse_Down *ev);
 EAPI Eina_Bool    ewk_frame_feed_mouse_up(Evas_Object *o, const Evas_Event_Mouse_Up *ev);
 EAPI Eina_Bool    ewk_frame_feed_mouse_move(Evas_Object *o, const Evas_Event_Mouse_Move *ev);
+EAPI Eina_Bool    ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState);
 EAPI Eina_Bool    ewk_frame_feed_key_down(Evas_Object *o, const Evas_Event_Key_Down *ev);
 EAPI Eina_Bool    ewk_frame_feed_key_up(Evas_Object *o, const Evas_Event_Key_Up *ev);
 
diff --git a/cmake/OptionsEfl.cmake b/cmake/OptionsEfl.cmake
index 93b2f37..6632a43 100644
--- a/cmake/OptionsEfl.cmake
+++ b/cmake/OptionsEfl.cmake
@@ -90,6 +90,7 @@ WEBKIT_FEATURE(ENABLE_SVG_ANIMATION "Enable SVG animation" DEFAULT ON SVG)
 WEBKIT_FEATURE(ENABLE_SVG_FONTS "Enable SVG fonts" DEFAULT ON SVG)
 WEBKIT_FEATURE(ENABLE_SVG_FOREIGN_OBJECT "Enable SVG foreign object" DEFAULT ON SVG)
 WEBKIT_FEATURE(ENABLE_SVG_USE "Enable SVG use" DEFAULT ON SVG)
+WEBKIT_FEATURE(ENABLE_TOUCH_EVENTS "Enable Touch Events" DEFAULT OFF)
 WEBKIT_FEATURE(ENABLE_VIDEO "Enable video" DEFAULT ON HTML)
 WEBKIT_FEATURE(ENABLE_WEB_SOCKETS "Enable web sockets" DEFAULT OFF)
 WEBKIT_FEATURE(ENABLE_WML "Enable WML" DEFAULT OFF)
diff --git a/cmakeconfig.h.cmake b/cmakeconfig.h.cmake
index 5a3d69c..f92fda5 100644
--- a/cmakeconfig.h.cmake
+++ b/cmakeconfig.h.cmake
@@ -33,6 +33,7 @@
 #define ENABLE_SVG_FONTS @ENABLE_SVG_FONTS_VALUE@
 #define ENABLE_SVG_FOREIGN_OBJECT @ENABLE_SVG_FOREIGN_OBJECT_VALUE@
 #define ENABLE_SVG_USE @ENABLE_SVG_USE_VALUE@
+#define ENABLE_TOUCH_EVENTS @ENABLE_TOUCH_EVENTS_VALUE@
 #define ENABLE_VIDEO @ENABLE_VIDEO_VALUE@
 #define ENABLE_WEB_SOCKETS @ENABLE_WEB_SOCKETS_VALUE@
 #define ENABLE_WML @ENABLE_WML_VALUE@

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list