[Title] Enable double tap only if page is scalable.
[Issue#] N/A
[Problem] The buttons of web applications which are implemented to use click event respond too slow.
[Cause] The click event is occured after 0.4 ms in order to check double tap.
[Solution] Actually, the double tap is not used in the page which is not scalable.
So, disable double tap for non-scalable page and make click directly.
Change-Id: Idfccad41ad9ce9bec3cd55b1272263fc10af76cd
}
#endif
-#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
+#if ENABLE(TIZEN_GESTURE)
+#if ENABLE(TOUCH_EVENTS)
void EwkViewImpl::feedTouchEventsByType(Ewk_Touch_Event_Type type)
{
feedTouchEvents(type);
}
#endif
+
+void EwkViewImpl::setDoubleTapEnabled(bool enabled)
+{
+ gestureRecognizer->setDoubleTapEnabled(enabled);
+}
+#endif
+
#endif //#if OS(TIZEN)
const WebCore::IntPoint scrollPosition() const { return m_scrollPosition; }
#endif
-#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
+#if ENABLE(TIZEN_GESTURE)
+#if ENABLE(TOUCH_EVENTS)
void feedTouchEventsByType(Ewk_Touch_Event_Type);
#endif
+ void setDoubleTapEnabled(bool);
#endif
// FIXME: Make members private for encapsulation.
double scaleRatioBeforeRotation = m_scaleFactor / m_viewportConstraints.minimumScale;
m_viewportConstraints = computeViewportConstraints(attributes);
+#if ENABLE(TIZEN_GESTURE)
+ m_viewImpl->setDoubleTapEnabled(userScalable());
+#endif
+
// Initially, m_scaleFactor is not decided yet.
// So, we should update visible content rect at here.
if (!m_scaleFactor) {
return;
}
- // Process Tap if current page is not scalable.
- PageClientImpl::ViewportConstraints constraints = pageClientImpl->viewportConstraints();
- if (constraints.userScalable && constraints.maximumScale - constraints.minimumScale > numeric_limits<float>::epsilon())
- m_smartZoom->start(position.x(), position.y());
- else
- endTap(position);
+ m_smartZoom->start(position.x(), position.y());
}
void GestureClient::setZoomableArea(const IntPoint& target, const IntRect& area)
evas_object_event_callback_del(m_viewWidget, EVAS_CALLBACK_MOUSE_UP, onMouseUp);
}
+void GestureRecognizer::setDoubleTapEnabled(bool enabled)
+{
+ if (enabled)
+ elm_gesture_layer_double_tap_timeout_set(m_gestureObject, 0.4);
+ // FIXME: If double tap timeout is zero, the gesture_layer does not make tap and makes double tap without any delay.
+ // So, we have to set double tap timeout as small value to make tap and disable double tap.
+ // The value will be changed to zero when elm_gesture_layer works correctly.
+ else
+ elm_gesture_layer_double_tap_timeout_set(m_gestureObject, 0.00001);
+}
+
void GestureRecognizer::initializeCallbacks()
{
// Add gesture callbacks.
}
~GestureRecognizer();
+ void setDoubleTapEnabled(bool);
+
private:
explicit GestureRecognizer(Evas_Object*);
void initializeCallbacks();