impl->focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
} else if (event->type == EWK_GESTURE_PAN) {
if (impl->exceedTouchMoveThreshold)
- impl->focusRing->hide();
+ impl->focusRing->requestToHide();
} else {
if (event->type != EWK_GESTURE_LONG_PRESS) {
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
if (!impl->pageClient->isContextMenuVisible())
#endif
- impl->focusRing->hide();
+ impl->focusRing->requestToHide();
}
}
}
break;
#if ENABLE(TIZEN_DRAG_SUPPORT)
// 1. Check to start dragging.
- if (hitTestResultData.isDragSupport) {
+ if (hitTestResultData.isDragSupport && !hitTestResultData.isContentEditable) {
impl->pageClient->setDragPoint(scenePoint);
+ if (impl->pageClient->isDragMode()) {
+ impl->pageClient->setDragMode(false);
+ }
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
if (impl->focusRing)
impl->focusRing->show(IntRect(), true);
}
#endif
// 2. Check to show context menu.
- if (!hitTestResultData.absoluteImageURL.isEmpty()
- || !hitTestResultData.absoluteLinkURL.isEmpty()) {
+ if ((!hitTestResultData.absoluteImageURL.isEmpty() || !hitTestResultData.absoluteLinkURL.isEmpty())
+ && !hitTestResultData.isContentEditable) {
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
if (impl->focusRing)
impl->focusRing->show(IntRect(), true);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
- if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned())
+ if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned()) {
+ impl->pageClient->initTextSelectionHandlesMouseDownedStatus();
return true;
+ }
#endif
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
if (impl->focusRing) {
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
- if (!impl->pageClient->isContextMenuVisible())
+ if (!impl->pageClient->isContextMenuVisible() || impl->pageClient->isTextSelectionMode())
#endif
- impl->focusRing->hide();
+ impl->focusRing->requestToHide();
}
#endif
#endif
impl->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
- } else if (event->count == 2)
+ } else if (event->count == 2) {
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+ if (impl->focusRing)
+ impl->focusRing->requestToHide(true);
+#endif
impl->gestureClient->endDoubleTap(IntPoint(event->position.x, event->position.y));
+ }
break;
case EWK_GESTURE_LONG_PRESS:
-#if ENABLE(TIZEN_DRAG_SUPPORT)
- if (impl->pageClient->isDragMode())
- impl->pageClient->setDragMode(false);
-#endif
// Prcess endTap for LONG_PRESS gesture if text-selection and context menu did not work
impl->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
break;
#endif
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
- if (impl->focusRing && !(event->type == EWK_GESTURE_PAN && !impl->exceedTouchMoveThreshold))
- impl->focusRing->hide();
+ if (impl->focusRing && !(event->type == EWK_GESTURE_PAN && !impl->exceedTouchMoveThreshold)) {
+#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
+ if (!impl->pageClient->isContextMenuVisible())
+#endif
+ impl->focusRing->requestToHide(true);
+ }
#endif
switch (event->type) {
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
evas_object_image_native_surface_set(smartData->image, 0);
+#if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
+ if (impl->pageClient->isVisible()) {
+ Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
+ impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
+ } else
+ impl->pageClient->setDeferUpdateViewportSize(true);
+#else
Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
+#endif
+
#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
if (!ewk_view_is_opengl_backend(ewkView))
_ewk_view_composite(smartData);
#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
+ int newAngle = ecore_evas_rotation_get(ee);
+#if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
+ if (impl->pageClient->deferUpdateViewportSize()) {
+ impl->pageClient->updateViewportSize(IntSize(width, height), newAngle);
+ }
+#endif
impl->pageClient->updateVisibleContentRectSize(IntSize(width, height));
if (ewk_view_is_opengl_backend(ewkView))
impl->pageClient->displayViewport();
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
impl->pageClient->frameRectChanged();
#endif
-#if ENABLE(TIZEN_SCREEN_READER)
- impl->pageProxy->recalcScreenReaderFocusRect();
-#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
impl->pageClient->updateTextSelectionHandlesAndContextMenu(true);
#endif
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
impl->gestureClient->reset();
#endif
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+ if (impl->focusRing)
+ impl->focusRing->hide();
+#endif
#if ENABLE(TIZEN_ISF_PORT)
impl->inputMethodContext()->hideIMFContext();
#endif
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+ if (smartData->api->formdata_candidate_is_showing(smartData))
+ smartData->api->formdata_candidate_hide(smartData);
+#endif
impl->informURLChange();
evas_object_smart_callback_call(ewkView, "load,committed", 0);
}
#endif
#if ENABLE(TIZEN_ISF_PORT)
- Ecore_X_Window rootWin = ecore_x_window_root_first_get();
- ecore_x_event_mask_set(rootWin, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
- Ecore_X_Atom xAtom = ecore_x_atom_get("X External Keyboard Exist");
- unsigned int connectedKeyboardNum = 0;
- bool isExternalKeyboardConnected = false;
-
- // get connected keyboard number
- if (ecore_x_window_prop_card32_get(rootWin, xAtom, &connectedKeyboardNum, 1)
- && connectedKeyboardNum)
- isExternalKeyboardConnected = true;
-
// We should treat both of ECORE_IMF_INPUT_PANEL_STATE_SHOW and ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW
// as IME is shown. ECORE_IMF_INPUT_PANEL_STATE_HIDE is ignored at here.
// input field zoom should not work with below conditions
// 3. imfContext is null(if adjustForExternalKeyboard is false)
// 4. input panel state is hidden(if adjustForExternalKeyboard is false)
if ((!(static_cast<PageClient*>(impl->pageClient.get()))->isViewFocused()
- || (adjustForExternalKeyboard && !isExternalKeyboardConnected)
+ || (adjustForExternalKeyboard && !InputMethodContextEfl::shouldUseExternalKeyboard())
|| (!adjustForExternalKeyboard && !impl->inputMethodContext())
|| (!adjustForExternalKeyboard && !impl->inputMethodContext()->isShow()))
#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+#if OS(TIZEN)
+ WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKPageCopyUserAgent(toAPI(impl->pageProxy.get())));
+
+ int length = WKStringGetMaximumUTF8CStringSize(userAgentString.get());
+ OwnArrayPtr<char> buffer = adoptArrayPtr(new char[length]);
+ WKStringGetUTF8CString(userAgentString.get(), buffer.get(), length);
+ impl->userAgent = buffer.get();
+#else
if (!impl->userAgent) {
WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKPageCopyUserAgent(toAPI(impl->pageProxy.get())));
WKStringGetUTF8CString(userAgentString.get(), buffer.get(), length);
impl->userAgent = buffer.get();
}
+#endif
return impl->userAgent;
}
+
+#if OS(TIZEN)
+Eina_Bool ewk_view_application_name_for_user_agent_set(Evas_Object* ewkView, const char* applicationName)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(applicationName, false);
+
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+
+ WKRetainPtr<WKStringRef> applicationNameString(AdoptWK, WKStringCreateWithUTF8CString(applicationName));
+ WKPageSetApplicationNameForUserAgent(toAPI(impl->pageProxy.get()), applicationNameString.get());
+
+ return true;
+}
+
+const char* ewk_view_application_name_for_user_agent_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+
+ WKRetainPtr<WKStringRef> applicationNameString(AdoptWK, WKPageCopyApplicationNameForUserAgent(toAPI(impl->pageProxy.get())));
+
+ int length = WKStringGetMaximumUTF8CStringSize(applicationNameString.get());
+ OwnArrayPtr<char> buffer = adoptArrayPtr(new char[length]);
+ WKStringGetUTF8CString(applicationNameString.get(), buffer.get(), length);
+ impl->applicationName = buffer.get();
+
+ return impl->applicationName;
+}
+#endif
+
Eina_Bool ewk_view_custom_header_add(const Evas_Object* ewkView, const char* name, const char* value)
{
#if ENABLE(TIZEN_CUSTOM_HEADERS)
impl->pageProxy->useSettingsFont();
#endif
}
+
+void ewk_view_fullscreen_exit(Evas_Object* ewkView)
+{
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ TIZEN_LOGI("");
+
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+ if (!impl->pageProxy->fullScreenManager()->isFullScreen())
+ return;
+
+ impl->pageProxy->fullScreenManager()->requestExitFullScreen();
+#else
+ UNUSED_PARAM(ewkView);
+#endif
+}