fix javascript touch event operation when SetScrollEnabled(false)
authorSeongjun Yim <se201.yim@samsung.com>
Thu, 11 Apr 2013 04:05:46 +0000 (13:05 +0900)
committerSeongjun Yim <se201.yim@samsung.com>
Thu, 11 Apr 2013 06:46:55 +0000 (15:46 +0900)
Change-Id: I5044f8027ae6ea7577262ae11f80b9fd146a4a8e
Signed-off-by: Seongjun Yim <se201.yim@samsung.com>
inc/FWebCtrlWeb.h
src/controls/FWebCtrl_GestureState.cpp
src/controls/FWebCtrl_Web.cpp

index 9fa6877..b3cfb5c 100755 (executable)
@@ -597,6 +597,7 @@ public:
         * @param[in]   enable                  Set to @c true to enable the scrolling of the web page, @n
         *                                                                      else @c false
         * @exception   E_SUCCESS                       The method is successful.
+        * @remarks             This method doesn't affect javascript touch event.
         */
        result SetScrollEnabled(bool enable);
 
index a7bd5a0..19bfb84 100755 (executable)
@@ -204,15 +204,18 @@ _PanningGestureState::OnTouchPressed(const _Control& source, const _TouchInfo& t
 bool
 _PanningGestureState::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
 {
-       const Ewk_View_Smart_Data* pSmartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get( __pWebCore->GetWebNativeNode()));
-       SysAssertf(pSmartData, "Failed to get webkit smart data.");
+       if (_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
+       {
+               const Ewk_View_Smart_Data* pSmartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get( __pWebCore->GetWebNativeNode()));
+               SysAssertf(pSmartData, "Failed to get webkit smart data.");
 
-       Ewk_Event_Gesture gestureEvent;
+               Ewk_Event_Gesture gestureEvent;
 
-       Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(touchInfo.GetCurrentPosition())));
+               Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(touchInfo.GetCurrentPosition())));
 
-       SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
-       pSmartData->api->gesture_move(const_cast<Ewk_View_Smart_Data*>(pSmartData), &gestureEvent);
+               SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
+               pSmartData->api->gesture_move(const_cast<Ewk_View_Smart_Data*>(pSmartData), &gestureEvent);
+       }
 
        return true;
 }
index efc3be8..9824302 100755 (executable)
@@ -448,16 +448,9 @@ _Web::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
 {
        if (__pEflWebkit.get())
        {
-               if (_WebSettingImpl::GetInstance(__pWebSetting.get())->IsScrollEnabled())
-               {
-                       SendTouchEventForJavaScript(touchInfo);
+               SendTouchEventForJavaScript(touchInfo);
 
-                       return __pGestureHandler->OnTouchMoved(source, touchInfo);
-               }
-               else if (__gestureType == WEB_GESTURE_TYPE_TAP)
-               {
-                       return __pGestureHandler->OnTouchMoved(source, touchInfo);
-               }
+               return __pGestureHandler->OnTouchMoved(source, touchInfo);
        }
 
        return true;