#if ENABLE(TIZEN_GEOLOCATION)
#include "ewk_geolocation_private.h"
+#include "ewk_geolocation_provider_private.h"
#include "ewk_security_origin.h"
-#include "ewk_view_geolocation_provider.h"
#endif
#if ENABLE(TOUCH_EVENTS)
#include "WKDictionary.h"
#include "ewk_web_application_icon_data_private.h"
#endif
+
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+#include "AutoFillPopup.h"
+#endif
#endif // #if OS(TIZEN)
using namespace WebKit;
static Eina_Bool _ewk_view_input_picker_show(Ewk_View_Smart_Data*, Ewk_Input_Type, const char* inputValue);
#endif
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-static Eina_Bool _ewk_view_data_list_show(Ewk_View_Smart_Data*, Ewk_Input_Type, Eina_List*);
-static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data*, Ewk_Input_Type);
-#endif
-
#if ENABLE(TIZEN_INPUT_COLOR_PICKER)
static Eina_Bool _ewk_input_picker_color_request(Ewk_View_Smart_Data*, int, int, int, int);
static Eina_Bool _ewk_input_picker_color_dismiss(Ewk_View_Smart_Data*);
}
#endif
+#if ENABLE(TIZEN_GEOLOCATION)
+static Eina_Bool _ewk_view_geolocation_validity_check(void* eventInfo)
+{
+ Evas_Object* ewkView = static_cast<Evas_Object*>(eventInfo);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, true);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, true);
+
+ return impl->isValidLocationService();
+}
+#endif
+
// Default Event Handling.
static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
{
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- if (impl->pageClient->isTextSelectionMode())
+ if (impl->pageClient->isTextSelectionMode() && ewk_settings_clear_text_selection_automatically_get(impl->settings()))
impl->pageClient->setIsTextSelectionMode(false);
#endif
return true;
}
+#if ENABLE(TIZEN_FOCUS_UI)
+bool isFocusUIActivationKeyname(const char* key)
+{
+ return !strcmp(key, "Up") || !strcmp(key, "Down") || !strcmp(key, "Left") || !strcmp(key, "Right") || !strcmp(key, "Tab");
+}
+#endif
+
static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Down* downEvent)
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+#if ENABLE(TIZEN_FOCUS_UI)
+ if (InputMethodContextEfl::shouldUseExternalKeyboard() && !impl->page()->focusUIEnabled()) {
+ if (isFocusUIActivationKeyname(downEvent->keyname))
+ impl->page()->setFocusUIEnabled(true);
+ return false;
+ }
+#endif
+
bool isFiltered = false;
InputMethodContextEfl* inputMethodContext = impl->inputMethodContext();
if (inputMethodContext)
inputMethodContext->handleKeyDownEvent(downEvent, &isFiltered);
+#if ENABLE(TIZEN_ISF_PORT)
+ NativeWebKeyboardEvent nativeEvent(downEvent, isFiltered);
+ nativeEvent.setInputMethodContextID(impl->pageProxy->editorState().inputMethodContextID);
+ impl->pageProxy->handleKeyboardEvent(nativeEvent);
+#else
impl->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(downEvent, isFiltered));
+#endif
+
return true;
}
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+#if ENABLE(TIZEN_FOCUS_UI)
+ if (InputMethodContextEfl::shouldUseExternalKeyboard() && !impl->page()->focusUIEnabled())
+ return false;
+#endif
+
impl->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(upEvent));
return true;
}
#endif
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
- if (impl->focusRing) {
- if (event->type == EWK_GESTURE_TAP && event->count == 1) {
- impl->focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
+ FocusRing* focusRing = impl->focusRing();
+ if (focusRing) {
+ if (event->type == EWK_GESTURE_TAP) {
+ if (event->count == 1)
+ focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
} else if (event->type == EWK_GESTURE_PAN) {
if (impl->exceedTouchMoveThreshold)
- impl->focusRing->hide();
- } else {
- if (event->type != EWK_GESTURE_LONG_PRESS) {
+ focusRing->requestToHide();
+ } else if (event->type != EWK_GESTURE_LONG_PRESS) {
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
- if (!impl->pageClient->isContextMenuVisible())
+ if (!impl->pageClient->isContextMenuVisible())
#endif
- impl->focusRing->hide();
- }
+ focusRing->requestToHide();
}
}
#endif
if (ewk_settings_text_selection_enabled_get(impl->settings()))
impl->pageClient->setIsTextSelectionMode(false);
#endif
+
IntPoint scenePoint(event->position.x, event->position.y);
IntPoint contentsPoint = impl->transformFromScene().mapPoint(scenePoint);
- WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(contentsPoint);
+ WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(contentsPoint, WebHitTestResult::HitTestModeDefault | WebHitTestResult::HitTestModeSetFocus);
if (!hitTestResultData.absoluteMediaURL.isEmpty())
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);
+ if (focusRing)
+ focusRing->showWithContextMenu(scenePoint, hitTestResultData.focusedColor, hitTestResultData.focusedRects);
#endif
- impl->gestureClient->showContextMenu(scenePoint);
break;
}
#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);
+ if (focusRing)
+ focusRing->showWithContextMenu(scenePoint, hitTestResultData.focusedColor, hitTestResultData.focusedRects);
#endif
- impl->gestureClient->showContextMenu(scenePoint);
break;
}
+
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
// 3. Check for text selection.
if (ewk_settings_text_selection_enabled_get(impl->settings())) {
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) {
+ FocusRing* focusRing = impl->focusRing();
+ if (focusRing) {
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
- if (!impl->pageClient->isContextMenuVisible())
+ if (!impl->pageClient->isContextMenuVisible() || impl->pageClient->isTextSelectionMode())
#endif
- impl->focusRing->hide();
+ 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 (focusRing)
+ 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();
+ FocusRing* focusRing = impl->focusRing();
+ if (focusRing && !(event->type == EWK_GESTURE_PAN && !impl->exceedTouchMoveThreshold)) {
+#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
+ if (!impl->pageClient->isContextMenuVisible())
+#endif
+ focusRing->requestToHide(true);
+ }
#endif
switch (event->type) {
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
ewk_view_main_frame_scrollbar_visible_set(impl->view(), false);
- evas_object_smart_callback_call(impl->view(), "fullscreen,enterfullscreen", 0);
+ bool isNeed = impl->page()->fullScreenManager()->exitFullScreenByHwBackKey();
+ evas_object_smart_callback_call(impl->view(), "fullscreen,enterfullscreen", &isNeed);
return true;
}
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- return impl->pageClient->textSelectionDown(IntPoint(x, y), true);
+ return impl->pageClient->textSelectionDown(IntPoint(x, y));
}
Eina_Bool _ewk_view_text_selection_move(Ewk_View_Smart_Data* smartData, int x, int y)
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
IntPoint point(x, y);
- impl->pageClient->textSelectionMove(point, true);
+ impl->pageClient->textSelectionMove(point);
return true;
}
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- impl->pageClient->showFormDataCandidate(IntRect(x, y, w, h));
+ impl->pageClient->showAutoFillPopup(IntRect(x, y, w, h));
return true;
}
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- impl->pageClient->hideFormDataCandidate();
+ impl->pageClient->hideAutoFillPopup();
return true;
}
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- Vector<String> formData;
+ Vector<AutoFillPopupItem> formData;
Eina_List* list;
void* data;
EINA_LIST_FOREACH(dataList, list, data)
- formData.append(String::fromUTF8(static_cast<char*>(data)));
+ formData.append(AutoFillPopupItem(String::fromUTF8(static_cast<char*>(data)), candidateAutoFill));
- impl->pageClient->updateFormDataCandidate(formData);
+ impl->pageClient->updateAutoFillPopup(formData);
return true;
}
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- return impl->pageClient->isShowingFormDataCandidate();
+ return impl->pageClient->isShowingAutoFillPopup();
}
#endif
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- return ScreenReaderProxy::screenReader().executeAction(impl, static_cast<Elm_Access_Action_Info*>(actionInfo));
+ return ScreenReaderProxy::executeAction(impl, 0, static_cast<Elm_Access_Action_Info*>(actionInfo));
}
#endif
#endif // #if OS(TIZEN)
EwkViewImpl::removeFromPageViewMap(ewkView);
EWK_VIEW_SD_GET(ewkView, smartData);
#if ENABLE(TIZEN_SCREEN_READER)
- ScreenReaderProxy::screenReader().disable(smartData->priv);
+ ScreenReaderProxy::screenReader().finalize(smartData->priv);
#endif
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER)
+ // Close color picker if it's opened.
+ if (smartData && smartData->priv && smartData->priv->inputPicker->isColorPickerShown())
+ ewk_view_color_picker_color_set(ewkView, 0, 0, 0, 0);
+#endif
+
+#if ENABLE(TIZEN_GEOLOCATION)
+ if (smartData) {
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+ Ewk_Geolocation_Provider* geolocationProvider = impl->context->geolocationProvider();
+ TIZEN_LOGI("_ewk_view_smart_del:: unwatch validity");
+ geolocationProvider->unwatchValidity(ewkView);
+ }
+#endif
+
if (smartData && smartData->priv)
_ewk_view_impl_del(smartData->priv);
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
evas_object_image_native_surface_set(smartData->image, 0);
+ Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
+ impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
#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);
- impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
+ impl->pageClient->updateVisibleContentRectSize(IntSize(width, height));
if (ewk_view_is_opengl_backend(ewkView))
impl->pageClient->displayViewport();
#endif
}
if (smartData->changed.position) {
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+ IntSize diff(x - smartData->view.x, y - smartData->view.y);
+#endif
+
evas_object_move(smartData->image, x, y);
smartData->view.x = x;
smartData->view.y = y;
#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);
+ if (impl->pageClient->isTextSelectionMode()) {
+ impl->pageClient->updateTextSelectionHandlesAndContextMenu(false);
+ impl->pageClient->requestToShowTextSelectionHandlesAndContextMenu();
+ }
+#endif
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+ if (impl->focusRing())
+ impl->focusRing()->moveBy(diff);
#endif
#endif // #if OS(TIZEN)
}
if (evas_object_clipees_get(smartData->base.clipper))
evas_object_show(smartData->base.clipper);
evas_object_show(smartData->image);
+
+#if ENABLE(TIZEN_SCREEN_READER)
+ ScreenReaderProxy::screenReader().initialize(impl);
+#endif
}
static void _ewk_view_smart_hide(Evas_Object* ewkView)
#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
api->input_picker_show = _ewk_view_input_picker_show;
#endif
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
- api->data_list_show = _ewk_view_data_list_show;
- api->data_list_hide = _ewk_view_data_list_hide;
-#endif
#if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
api->orientation_lock = _ewk_orientation_lock;
api->orientation_unlock = _ewk_orientation_unlock;
impl->pageProxy->pageGroup()->preferences()->setForceCompositingMode(true);
impl->pageProxy->pageGroup()->preferences()->setFrameFlatteningEnabled(true);
impl->pageProxy->pageGroup()->preferences()->setAllowUniversalAccessFromFileURLs(true);
-
- int deviceWidth, deviceHeight;
- ecore_evas_screen_geometry_get(ecore_evas_ecore_evas_get(evas_object_evas_get(ewkView)), 0, 0, &deviceWidth, &deviceHeight);
- impl->pageProxy->pageGroup()->preferences()->setDeviceWidth(deviceWidth);
- impl->pageProxy->pageGroup()->preferences()->setDeviceHeight(deviceHeight);
#endif
impl->pageProxy->initializeWebPage();
ewkViewTizenClientAttachClient(ewkView);
#if ENABLE(TIZEN_GEOLOCATION)
- ewkViewGeolocationProviderAttachProvider(ewkView, impl->context->wkContext());
+ Ewk_Geolocation_Provider* geolocationProvider = impl->context->geolocationProvider();
+ geolocationProvider->watchValidity(GeolocationValidityCallbackData(_ewk_view_geolocation_validity_check, ewkView));
#endif
#if ENABLE(TIZEN_NOTIFICATIONS)
if (!impl->context->xWindow())
impl->context->setXWindow(elm_win_xwindow_get(ewkView));
#endif
-
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
- impl->focusRing = FocusRing::create(impl);
-#endif
}
static Evas_Object* _ewk_view_add_with_smart(Evas* canvas, Evas_Smart* smart)
if (!ewkView)
return 0;
-#if ENABLE(TIZEN_ICON_DATABASE)
- //set default iconDatabasePath
- WKContextRef contextRef = context->wkContext();
- toImpl(contextRef)->setIconDatabasePath(toImpl(contextRef)->iconDatabasePath());
-#endif
-
#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+ impl->pageClient->prepareRestoredVisibleContectRect();
impl->pageProxy->reload(/*reloadFromOrigin*/ false);
impl->informURLChange();
}
#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+#if ENABLE(TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM)
+void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value, bool isInputInForm)
+#else
void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value)
+#endif // TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
- if (!ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView)))
- return;
-
if (value.isEmpty()) {
if(smartData->api->formdata_candidate_is_showing(smartData))
smartData->api->formdata_candidate_hide(smartData);
return;
}
- Vector<String> popupCandidates;
- ewk_view_form_candidate_data_get(ewkView, name, popupCandidates);
- std::sort(popupCandidates.begin(), popupCandidates.end(), WTF::codePointCompareLessThan);
+ Eina_List* optionList = 0;
+ Vector<String> popupOptionLists = impl->pageProxy->getFocusedInputElementDataList();
+ std::sort(popupOptionLists.begin(), popupOptionLists.end(), WTF::codePointCompareLessThan);
+ for (size_t i = 0; i < popupOptionLists.size(); ++i) {
+ if (popupOptionLists[i].startsWith(value, false))
+ optionList = eina_list_append(optionList, eina_stringshare_add(popupOptionLists[i].utf8().data()));
+ }
Eina_List* candidateList = 0;
- for (size_t i = 0; i < popupCandidates.size(); ++i) {
- if (popupCandidates[i].startsWith(value, false))
- candidateList = eina_list_append(candidateList, eina_stringshare_add(popupCandidates[i].utf8().data()));
+ if (ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView))) {
+ Vector<String> popupCandidates;
+ ewk_view_form_candidate_data_get(ewkView, name, popupCandidates);
+ std::sort(popupCandidates.begin(), popupCandidates.end(), WTF::codePointCompareLessThan);
+
+ for (size_t i = 0; i < popupCandidates.size(); ++i) {
+ if (popupCandidates[i].startsWith(value, false))
+ candidateList = eina_list_append(candidateList, eina_stringshare_add(popupCandidates[i].utf8().data()));
+ }
+ }
+
+ Vector<AutoFillPopupItem> formData;
+
+#if ENABLE(TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM)
+ if (ewk_settings_form_profile_data_enabled_get(ewk_view_settings_get(ewkView)) && isInputInForm) {
+ Vector<std::pair<int, std::pair<String, String> > > profileFormCandidates;
+ ewk_view_profile_form_candidate_data_get(ewkView, name, value, profileFormCandidates);
+ for (size_t ittr = 0; ittr < profileFormCandidates.size(); ++ittr) {
+ std::pair<int, std::pair<String, String> > fullData(profileFormCandidates[ittr]);
+ std::pair<String, String> dispStrings(fullData.second);
+ formData.append(AutoFillPopupItem(dispStrings.first, dispStrings.second, fullData.first, profileAutoFill));
+ }
+ }
+#endif
+
+ Eina_List* list;
+ void* data;
+ if (eina_list_count(optionList)) {
+ EINA_LIST_FOREACH(optionList, list, data)
+ formData.append(AutoFillPopupItem(String::fromUTF8(static_cast<char*>(data)), dataListAutoFill));
+ }
+
+ if (eina_list_count(candidateList) && ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView))) {
+ EINA_LIST_FOREACH(candidateList, list, data)
+ formData.append(AutoFillPopupItem(String::fromUTF8(static_cast<char*>(data)), candidateAutoFill));
}
- if (!eina_list_count(candidateList)) {
+ if (!formData.size()) {
if(smartData->api->formdata_candidate_is_showing(smartData))
smartData->api->formdata_candidate_hide(smartData);
return;
}
- smartData->api->formdata_candidate_update_data(smartData, candidateList);
+ if (formData[0].itemtype == profileAutoFill)
+ impl->pageClient->updateAutoFillPopup(formData);
+ else {
+ Eina_List* autoFillList = 0;
- IntRect inputFieldRect = impl->pageClient->focusedNodeRect();
+ if (eina_list_count(optionList)) {
+ EINA_LIST_FOREACH(optionList, list, data)
+ autoFillList = eina_list_append(autoFillList, eina_stringshare_add(static_cast<char*>(data)));
+ }
+ if (eina_list_count(candidateList)) {
+ EINA_LIST_FOREACH(candidateList, list, data)
+ autoFillList = eina_list_append(autoFillList, eina_stringshare_add(static_cast<char*>(data)));
+ }
+ smartData->api->formdata_candidate_update_data(smartData, autoFillList);
+ }
+
+ IntRect inputFieldRect = impl->transformToScene().mapRect(impl->pageClient->focusedNodeRect());
smartData->api->formdata_candidate_show(smartData, inputFieldRect.x(), inputFieldRect.y(), inputFieldRect.width(), inputFieldRect.height());
}
-void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm)
+void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm, bool isAutoComplete)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
if (!ewk_settings_autofill_password_form_enabled_get(ewk_view_settings_get(ewkView))
&& !ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView)))
return;
+
+ // if isAutoComplete is off then return
+ if (isPasswordForm && !isAutoComplete)
+ return;
+
ewk_view_context_get(ewkView)->addFormData(impl->url(), formData, isPasswordForm);
}
if (!passwordFormData.size())
return;
- String passwordFormAutofill = String::fromUTF8("try { function passwordFormAutofill() { var inputFields;");
+ String passwordFormAutofill = "try { function passwordFormAutofill() { var inputFields;";
for (size_t i = 0; i < passwordFormData.size(); i++) {
- passwordFormAutofill += String::fromUTF8(" inputFields = document.getElementsByName(\"");
- passwordFormAutofill += passwordFormData[i].first;
- passwordFormAutofill += String::fromUTF8("\");");
- passwordFormAutofill += String::fromUTF8(" for (var i = 0; i < inputFields.length; i++)");
- passwordFormAutofill += String::fromUTF8(" if (inputFields[i].tagName.toLowerCase() == \"input\" && (inputFields[i].type.toLowerCase() == \"text\" || inputFields[i].type.toLowerCase() == \"password\" || inputFields[i].type.toLowerCase() == \"email\"))");
- passwordFormAutofill += String::fromUTF8(" inputFields[i].value = \"");
- passwordFormAutofill += passwordFormData[i].second;
- passwordFormAutofill += String::fromUTF8("\";");
+ passwordFormAutofill += String::format(" inputFields = document.getElementsByName(\"%s\");"
+ " for (var i = 0; i < inputFields.length; i++)"
+ " if (inputFields[i].tagName.toLowerCase() == \"input\" && (inputFields[i].type.toLowerCase() == \"text\" || inputFields[i].type.toLowerCase() == \"password\" || inputFields[i].type.toLowerCase() == \"email\")"
+ " && inputFields[i].autocomplete.toLowerCase() != \"off\")"
+ " inputFields[i].value = \"",passwordFormData[i].first.utf8().data());
+ passwordFormAutofill.append(passwordFormData[i].second);
+ passwordFormAutofill += "\";";
}
- passwordFormAutofill += String::fromUTF8("} passwordFormAutofill(); } catch(e) { }");
+ passwordFormAutofill += "} passwordFormAutofill(); } catch(e) { }";
ewk_view_script_execute(ewkView, passwordFormAutofill.utf8().data(), 0, 0);
}
}
#endif
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-static Eina_Bool _ewk_view_data_list_show(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType, Eina_List* optionList)
-{
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
- impl->inputPicker->showDataList(inputType, optionList);
- return true;
-}
-
-static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType)
-{
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
- impl->inputPicker->hideDataList(inputType);
- return true;
-}
-#endif
-
#if ENABLE(TIZEN_INPUT_COLOR_PICKER)
static Eina_Bool _ewk_input_picker_color_request(Ewk_View_Smart_Data* smartData, int r, int g, int b, int a)
{
return true;
}
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-FocusRing* ewkViewGetFocusRing(Evas_Object* ewkView)
-{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
-
- return impl->focusRing.get();
-}
-#endif
-
Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
impl->gestureClient->reset();
#endif
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+ if (impl->focusRing())
+ impl->focusRing()->hide(false);
+#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);
}
impl->geolocationPermissionRequests = eina_list_remove(impl->geolocationPermissionRequests, geolocationPermissionRequest);
}
-
-void ewkViewSetGeolocation(Evas_Object* ewkView, Ewk_Geolocation* geolocation)
-{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
- impl->geolocation = geolocation;
-}
-
-Ewk_Geolocation* ewkViewGetGeolocation(Evas_Object* ewkView)
-{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
-
- return impl->geolocation;
-}
-
-bool ewkViewIsValidLocationService(Evas_Object* ewkView)
-{
- TIZEN_LOGI("geolocation,valid");
-
- bool valid = true;
- evas_object_smart_callback_call(ewkView, "geolocation,valid", &valid);
- return valid;
-}
#endif
void ewkViewFormSubmit(Evas_Object* ewkView, Ewk_Form_Data* formData)
*maximumScale = constraints.maximumScale;
}
-bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExternalKeyboard)
+bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExternalKeyboard, Eina_Bool adjustForContentSizeChanged)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- double scaleFactor = impl->pageClient->scaleFactor();
- IntSize contentsSize = impl->pageProxy->contentsSize();
-
- double newScaleFactor = scaleFactor;
- // Readable zoom value is dependent on device DPI
- if (scaleFactor < impl->pageProxy->deviceScaleFactor()
- && impl->pageClient->viewportConstraints().userScalable)
- newScaleFactor = impl->pageProxy->deviceScaleFactor();
-
- // Readable zoom value should be inside of viewport scale range
- newScaleFactor = impl->pageClient->adjustScaleWithViewport(newScaleFactor);
-
- // scale contents' size with new scale factor
-#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
- contentsSize.scale(newScaleFactor);
-#else
- contentsSize.scale(newScaleFactor / scaleFactor);
-#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
// 2. external keyboard is not connected(if adjustForExternalKeyboard is true)
// 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 && !impl->inputMethodContext())
- || (!adjustForExternalKeyboard && !impl->inputMethodContext()->isShow()))
+ || (!adjustForContentSizeChanged && impl->pageProxy->editorState().isContentRichlyEditable)
+ || (adjustForContentSizeChanged && !impl->inputMethodContext()->isShow()))
#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
&& !(impl->pageClient->isClipboardWindowOpened())
#endif
return false;
#endif
+ double scaleFactor = impl->pageClient->scaleFactor();
+ IntSize contentsSize = impl->pageProxy->contentsSize();
+
+ double newScaleFactor = scaleFactor;
+ // Readable zoom value is dependent on device DPI
+ if (scaleFactor < impl->pageProxy->deviceScaleFactor()
+ && impl->pageClient->viewportConstraints().userScalable)
+ newScaleFactor = impl->pageProxy->deviceScaleFactor();
+
+ // Readable zoom value should be inside of viewport scale range
+ newScaleFactor = impl->pageClient->adjustScaleWithViewport(newScaleFactor);
+
// caret position can be outside of visible rect.
// we need to consider it.
- IntRect selectionRect = impl->pageProxy->getSelectionRect(true);
+ IntRect selectionRect = impl->pageProxy->editorState().selectionRect;
IntRect focusedNodeRect = impl->pageClient->focusedNodeRect();
+ IntRect focusedNodeRectScaled = focusedNodeRect;
+
+ if (selectionRect.isEmpty())
+ return false;
+
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
- selectionRect.scale(newScaleFactor);
- focusedNodeRect.scale(newScaleFactor);
+ focusedNodeRectScaled.scale(newScaleFactor);
#else
- selectionRect.scale(newScaleFactor / scaleFactor);
- focusedNodeRect.scale(newScaleFactor / scaleFactor);
+ focusedNodeRectScaled.scale(newScaleFactor / scaleFactor);
#endif
- if (selectionRect.isEmpty())
- return false;
IntRect visibleRect = impl->pageClient->visibleContentRect();
- IntPoint scrollPosition = visibleRect.location();
- // Do not adjust scroll position if selection rect (caret) is visible after scaling.
- if (!visibleRect.contains(selectionRect)) {
- // set paddings
- scrollPosition = IntPoint(selectionRect.x() - visibleRect.width() / 3, selectionRect.y() - visibleRect.height() / 3);
- // If both input field's position x and selection rect can be displayed together,
- // adjust scroll position to input field's position x.
- if (!focusedNodeRect.isEmpty() && selectionRect.x() - focusedNodeRect.x() < visibleRect.width() * 4 / 5)
- scrollPosition.setX(focusedNodeRect.x());
- }
+ if (visibleRect.contains(focusedNodeRectScaled))
+ return false;
-#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
- impl->pageClient->setVisibleContentRect(IntRect(scrollPosition, impl->size()), newScaleFactor);
-#else
- if (newScaleFactor != scaleFactor)
- impl->pageProxy->scalePage(newScaleFactor, scrollPosition);
- else
- impl->pageProxy->scrollMainFrameTo(scrollPosition);
+#if ENABLE(TIZEN_WEBKIT2_INPUT_FIELD_ZOOM)
+ impl->inputFieldZoom->startInputFieldZoom(impl->transformFromScene().mapPoint(IntPoint(selectionRect.x(), selectionRect.y()))
+ , IntRect(focusedNodeRect.x(), selectionRect.y(), focusedNodeRect.width(), selectionRect.height()));
#endif
- evas_object_move(smartData->image, smartData->view.x, smartData->view.y);
+
return true;
}
evas_object_image_data_set(smartData->image, pixels);
evas_object_image_data_update_add(smartData->image, 0, 0, ow, oh);
- ewkViewFrameRendered(smartData->self);
+ if (impl->pageClient->notifiedNonemptyLayout() && impl->pageClient->canUpdateVisibleContentRect())
+ ewkViewFrameRendered(smartData->self);
impl->compositionAnimator = 0;
// Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
// the ActiveDOMObject.
if (!impl->suspendedResources && (!impl->isWaitingForJavaScriptPopupReply || !impl->isWaitingForApplicationCachePermission || !impl->isWaitingForExceededQuotaPopupReply)) {
+ impl->pageProxy->suspendAnimations();
impl->pageProxy->suspendJavaScriptAndResource();
impl->suspendedResources = true;
}
// Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
// the ActiveDOMObject.
if (impl->suspendedResources && (!impl->isWaitingForJavaScriptPopupReply || !impl->isWaitingForApplicationCachePermission || !impl->isWaitingForExceededQuotaPopupReply)) {
+ impl->pageProxy->resumeAnimations();
impl->pageProxy->resumeJavaScriptAndResource();
impl->suspendedResources = false;
}
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->pageClient->setDragMode(false);
#endif
-#if ENABLE(TIZEN_SCREEN_READER)
- if (enable)
- ScreenReaderProxy::screenReader().enable(impl);
+ impl->pageClient->setIsVisible(enable);
+ return true;
+}
#endif
- impl->pageClient->setIsVisible(enable);
+#if ENABLE(TIZEN_BACKGROUND_DISK_CACHE)
+Eina_Bool ewk_view_foreground_set(Evas_Object* ewkView, Eina_Bool enable)
+{
return true;
}
#endif
return true;
}
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+void ewkViewNotifyPopupReplyWaitingState(Evas_Object* ewkView, bool isWaiting)
+{
+ if (isWaiting)
+ evas_object_smart_callback_call(ewkView, "popup,reply,wait,start", 0);
+ else
+ evas_object_smart_callback_call(ewkView, "popup,reply,wait,finish", 0);
+}
+#endif
+
bool ewkViewRunJavaScriptAlert(Evas_Object* ewkView, WKStringRef alertText)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
unsigned int i = 0;
KURL base(KURL(), "file://");
EINA_LIST_FOREACH(fileUrls, list, data) {
- KURL url(base, static_cast<char*>(data));
+ KURL url(base, String::fromUTF8(static_cast<char*>(data)));
items[i++] = WKURLCreateWithUTF8CString(url.string().utf8().data());
}
WKRetainPtr<WKArrayRef> filesArray(AdoptWK, WKArrayCreate(items, size));
IntRect leftSelectionRect;
IntRect rightSelectionRect;
- if (!impl->pageProxy->getSelectionHandlers(leftSelectionRect, rightSelectionRect)) {
+ int selectionDirection = 1;
+ if (!impl->pageProxy->getSelectionHandlers(leftSelectionRect, rightSelectionRect, selectionDirection)) {
leftRect->x = 0;
leftRect->y = 0;
leftRect->w = 0;
return ewk_settings_clear_text_selection_automatically_get(ewk_view_settings_get(ewkView));
}
-void ewk_view_text_selection_range_clear(Evas_Object* ewkView)
+Eina_Bool ewk_view_text_selection_clear(Evas_Object* ewkView)
{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- impl->pageProxy->selectionRangeClear();
+ bool isTextSelectionMode = impl->pageClient->isTextSelectionMode();
+ impl->pageClient->setIsTextSelectionMode(false);
+ return isTextSelectionMode;
+}
+
+Eina_Bool ewk_view_text_selection_range_clear(Evas_Object* ewkView)
+{
+ return ewk_view_text_selection_clear(ewkView);
}
#endif // #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
}
#endif
+void ewk_view_current_target_input_element_value_set(Evas_Object* ewkView, const char* value)
+{
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+ impl->pageProxy->setCurrentTargetInputElementValue(String::fromUTF8(value));
+#endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+}
+
void ewk_view_focused_input_element_value_set(Evas_Object* ewkView, const char* value)
{
#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
#endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
}
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-void ewkViewDataListShowRequest(Evas_Object* ewkView, Ewk_Input_Type inputType, Vector<String> optionList)
-{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
- EINA_SAFETY_ON_NULL_RETURN(smartData->api);
- EINA_SAFETY_ON_NULL_RETURN(smartData->api->data_list_show);
-
- if (impl->dataList)
- ewkViewDataListHideRequest(ewkView, inputType);
-
- for (Vector<String>::const_iterator it = optionList.begin(); it != optionList.end(); ++it) {
- String value = *it;
- impl->dataList = eina_list_append(impl->dataList, eina_stringshare_add(value.utf8().data()));
- }
-
- smartData->api->data_list_show(smartData, inputType, impl->dataList);
-}
-
-void ewkViewDataListHideRequest(Evas_Object* ewkView, Ewk_Input_Type inputType)
-{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
- EINA_SAFETY_ON_NULL_RETURN(impl->dataList);
- EINA_SAFETY_ON_NULL_RETURN(smartData->api);
- EINA_SAFETY_ON_NULL_RETURN(smartData->api->data_list_hide);
-
- impl->deleteDataList();
-
- smartData->api->data_list_hide(smartData, inputType);
-}
-#endif
-
-void ewk_view_data_list_close(Evas_Object* ewkView, const char* value)
-{
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
- impl->deleteDataList();
-
- ewk_view_focused_input_element_value_set(ewkView, value);
-#endif
-}
-
Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* ewkView)
{
#if ENABLE(TIZEN_GESTURE)
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
- if (impl->focusRing && wasHandled)
- impl->focusRing->hide();
+ if (impl->focusRing() && wasHandled)
+ impl->focusRing()->hide();
#endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
if (impl->mouseEventsEnabled())
evas_object_smart_callback_call(ewkView, "touchmove,handled", static_cast<void*>(&wasHandled));
impl->wasHandledTouchMove = wasHandled;
} else if (type == WebEvent::TouchEnd && !impl->exceedTouchMoveThreshold) {
- if (!wasHandled) {
- impl->gestureClient->setMovingEnabled(!wasHandled);
+ if (!wasHandled)
impl->gestureClient->setTapEnabled(!wasHandled);
- }
#if ENABLE(TIZEN_ISF_PORT)
- else {
+ else if (impl->pageProxy->isViewVisible()) {
IntPoint pointForHitTest = impl->transformFromScene().mapPoint(IntPoint(impl->touchDownPoint.x, impl->touchDownPoint.y));
WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(pointForHitTest);
- if (hitTestResultData.isContentEditable && impl->inputMethodContext()) {
- evas_object_focus_set(ewkView, true);
- impl->inputMethodContext()->updateTextInputState();
- }
+ if (hitTestResultData.isContentEditable && impl->inputMethodContext())
+ impl->inputMethodContext()->updateTextInputStateByUserAction(true);
}
#endif
}
}
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void ewkViewDidGetTextStyleStateForSelection(Evas_Object* ewkView, int underlineState, int italicState, int boldState, const IntPoint& startPoint, const IntPoint& endPoint)
+void ewkViewTextStyleState(Evas_Object* ewkView, const IntPoint& startPoint, const IntPoint& endPoint)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
EditorState editorState = impl->page()->editorState();
-
- Ewk_Text_Style* textStyle = ewkTextStyleCreate(underlineState, italicState, boldState, startPoint, endPoint, editorState.bgColor, editorState.color);
+ Ewk_Text_Style* textStyle = ewkTextStyleCreate(editorState, startPoint, endPoint);
evas_object_smart_callback_call(ewkView, "text,style,state", static_cast<void*>(textStyle));
ewkTextStyleDelete(textStyle);
}
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+#if ENABLE(TIZEN_FOCUS_UI)
+ if (type == EWK_TOUCH_START)
+ impl->page()->setFocusUIEnabled(false);
+#endif
+
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
if (impl->pageClient->isTextSelectionMode() && eina_list_count(points) == 1) {
Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_data_get(points));
#if ENABLE(TIZEN_GESTURE)
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
// We don't want to process touch event when context menu is shown.
- if (impl->pageClient->isContextMenuVisible() && type != EWK_TOUCH_CANCEL)
+ if ((impl->pageClient->isContextMenuVisible() && type != EWK_TOUCH_CANCEL)
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+ && !impl->pageClient->isTextSelectionMode()
+#endif
+ )
return true;
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
#endif
}
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-void ewkViewFocusRingHide(Evas_Object* ewkView)
-{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
- if (impl->focusRing)
- impl->focusRing->hide();
-}
-#endif
-
void ewk_view_content_security_policy_set(Evas_Object* ewkView, const char* policy, Ewk_CSP_Header_Type type)
{
#if ENABLE(TIZEN_CSP)
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
+}
+
+Eina_Bool ewk_view_draws_transparent_background_set(Evas_Object* ewkView, Eina_Bool enabled)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+
+ impl->pageProxy->setDrawsTransparentBackground(enabled);
+ evas_object_image_alpha_set(smartData->image, enabled);
+
+ return true;
+}
+
+Eina_Bool ewk_view_draws_transparent_background_get(Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+
+ return impl->pageProxy->drawsTransparentBackground();
+}