void* data;
} orientationLock;
#endif
+
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ bool isJavaScriptPopupStarted;
+#endif
#endif // #if OS(TIZEN)
};
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
Evas_Point position = {smartData->view.x, smartData->view.y};
priv->pageClient->page()->handleWheelEvent(NativeWebWheelEvent(wheelEvent, &position));
return true;
Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkView));
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
Eina_List* points = 0;
int count = evas_touch_point_list_count(smartData->base.evas);
Ewk_Touch_Point* point;
Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
if (!priv->exceedTouchMoveThreshold && evas_touch_point_list_count(smartData->base.evas)) {
Evas_Coord x, y;
evas_touch_point_list_nth_xy_get(smartData->base.evas, 0, &x, &y);
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
Evas_Point position = {smartData->view.x, smartData->view.y};
priv->pageClient->page()->handleMouseEvent(NativeWebMouseEvent(downEvent, &position));
return true;
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
Evas_Point position = {smartData->view.x, smartData->view.y};
priv->pageClient->page()->handleMouseEvent(NativeWebMouseEvent(upEvent, &position));
return true;
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
Evas_Point position = {smartData->view.x, smartData->view.y};
priv->pageClient->page()->handleMouseEvent(NativeWebMouseEvent(moveEvent, &position));
return true;
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
#if ENABLE(TIZEN_ISF_PORT)
Ecore_IMF_Event IMFEvent;
ecore_imf_evas_event_key_down_wrap(const_cast<Evas_Event_Key_Down*>(downEvent), &IMFEvent.key_down);
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
priv->pageClient->page()->handleKeyboardEvent(NativeWebKeyboardEvent(upEvent));
return true;
}
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
switch (event->type) {
case EWK_GESTURE_TAP:
priv->gestureClient->startTap(IntPoint(event->position.x, event->position.y));
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
switch (event->type) {
case EWK_GESTURE_TAP:
if (event->count == 1)
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
switch (event->type) {
case EWK_GESTURE_PAN:
priv->gestureClient->movePan(IntPoint(event->position.x, event->position.y));
Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
EINA_SAFETY_ON_NULL_RETURN(smartData->api);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_wheel);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
smartData->api->mouse_wheel(smartData, wheelEvent);
}
Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
EINA_SAFETY_ON_NULL_RETURN(smartData->api);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_down);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
smartData->api->mouse_down(smartData, downEvent);
}
Evas_Event_Mouse_Up* upEvent = static_cast<Evas_Event_Mouse_Up*>(eventInfo);
EINA_SAFETY_ON_NULL_RETURN(smartData->api);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_up);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
smartData->api->mouse_up(smartData, upEvent);
}
Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
EINA_SAFETY_ON_NULL_RETURN(smartData->api);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_move);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
smartData->api->mouse_move(smartData, moveEvent);
}
EINA_SAFETY_ON_NULL_RETURN(smartData->api);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->key_down);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
smartData->api->key_down(smartData, downEvent);
}
Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
EINA_SAFETY_ON_NULL_RETURN(smartData->api);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->key_up);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
smartData->api->key_up(smartData, upEvent);
}
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
// Start touchAnimator if current number of touch is one.
if (evas_touch_point_list_count(smartData->base.evas) == 1) {
priv->gestureRecognizer->initializeGesture();
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return;
+#endif
+
// Stop touchAnimator if current number of touch is one.
if (evas_touch_point_list_count(smartData->base.evas) == 1 && priv->touchAnimator) {
ecore_animator_del(priv->touchAnimator);
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
IntPoint point(x, y);
priv->pageClient->textSelectionDown(point, true);
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
IntPoint point(x, y);
priv->pageClient->textSelectionMove(point, true);
{
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
+
IntPoint point(x, y);
priv->pageClient->textSelectionUp(point);
#if ENABLE(TIZEN_DATALIST_ELEMENT)
priv->dataList = 0;
#endif
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ priv->isJavaScriptPopupStarted = false;
+#endif
+
#endif // #if OS(TIZEN)
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
if (!priv->alertContext || !priv->alertContext->javascriptAlertCallback)
return false;
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->alertContext->ewkView == ewkView, false);
int length = WKStringGetMaximumUTF8CStringSize(alertText);
OwnArrayPtr<char> alertTextBuffer = adoptArrayPtr(new char[length]);
WKStringGetUTF8CString(alertText, alertTextBuffer.get(), length);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->alertContext->javascriptAlertCallback(priv->alertContext->ewkView, alertTextBuffer.get(), priv->alertContext->userData) == EINA_FALSE)
+ return false;
+
+ priv->isJavaScriptPopupStarted = true;
+ return true;
+#else
return priv->alertContext->javascriptAlertCallback(priv->alertContext->ewkView, alertTextBuffer.get(), priv->alertContext->userData) == EINA_TRUE;
+#endif
}
bool ewkViewRunJavaScriptConfirm(Evas_Object* ewkView, WKStringRef message)
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
if (!priv->confirmContext || !priv->confirmContext->javascriptConfirmCallback)
return false;
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->confirmContext->ewkView == ewkView, false);
int length = WKStringGetMaximumUTF8CStringSize(message);
OwnArrayPtr<char> messageBuffer = adoptArrayPtr(new char[length]);
WKStringGetUTF8CString(message, messageBuffer.get(), length);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->confirmContext->javascriptConfirmCallback(priv->confirmContext->ewkView, messageBuffer.get(), priv->confirmContext->userData) == EINA_FALSE)
+ return false;
+
+ priv->isJavaScriptPopupStarted = true;
+ return true;
+#else
return priv->confirmContext->javascriptConfirmCallback(priv->confirmContext->ewkView, messageBuffer.get(), priv->confirmContext->userData) == EINA_TRUE;
+#endif
}
bool ewkViewRunJavaScriptPrompt(Evas_Object* ewkView, WKStringRef message, WKStringRef defaultValue)
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
if (!priv->promptContext || !priv->promptContext->javascriptPromptCallback)
return false;
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->isJavaScriptPopupStarted)
+ return false;
+#endif
EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->promptContext->ewkView == ewkView, false);
int length = WKStringGetMaximumUTF8CStringSize(message);
length = WKStringGetMaximumUTF8CStringSize(defaultValue);
OwnArrayPtr<char> defaultValueBuffer = adoptArrayPtr(new char[length]);
WKStringGetUTF8CString(defaultValue, defaultValueBuffer.get(), length);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ if (priv->promptContext->javascriptPromptCallback(priv->promptContext->ewkView, messageBuffer.get(), defaultValueBuffer.get(), priv->promptContext->userData) == EINA_FALSE)
+ return false;
+
+ priv->isJavaScriptPopupStarted = true;
+ return true;
+#else
return priv->promptContext->javascriptPromptCallback(priv->promptContext->ewkView, messageBuffer.get(), defaultValueBuffer.get(), priv->promptContext->userData) == EINA_TRUE;
+#endif
}
bool ewkViewRunOpenPanel(Evas_Object* ewkView, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ priv->isJavaScriptPopupStarted = false;
+#endif
+
WKPageReplyJavaScriptAlert(toAPI(ewk_view_page_get(ewkView)));
}
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ priv->isJavaScriptPopupStarted = false;
+#endif
+
WKPageReplyJavaScriptConfirm(toAPI(ewk_view_page_get(ewkView)), result == EINA_TRUE);
}
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ priv->isJavaScriptPopupStarted = false;
+#endif
+
WKRetainPtr<WKStringRef> resultString(AdoptWK, WKStringCreateWithUTF8CString(result));
WKPageReplyJavaScriptPrompt(toAPI(ewk_view_page_get(ewkView)), result ? resultString.get() : 0);
}