Changed the handle type from "bottom" to "top" when the handle go to the bottom of...
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / tizen / WebContextMenuProxyTizen.cpp
index ea64bc2..2a47512 100755 (executable)
@@ -82,6 +82,10 @@ void WebContextMenuProxyTizen::contextMenuItemSelectedCallback(void* data, Evas_
     menuProxy->m_pageClientImpl->hideFocusRing();
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    menuProxy->m_pageClientImpl->initTextSelectionHandlesMouseDownedStatus();
+#endif
+
     menuProxy->m_page->contextMenuItemSelected(itemData);
     menuProxy->hideContextMenu();
 
@@ -123,8 +127,8 @@ void WebContextMenuProxyTizen::createEflMenu(const Vector<WebContextMenuItemData
             if (!m_items.at(i).iconFile().isEmpty()) {
                 icon = elm_icon_add(m_popup);
                 TIZEN_LOGI("icon file path : %s", m_items.at(i).iconFile().utf8().data());
-                if (!elm_icon_file_set(icon, m_items.at(i).iconFile().utf8().data(), NULL)) {
-                    TIZEN_LOGE("elm_icon_file_set is failed");
+                if (!elm_image_file_set(icon, m_items.at(i).iconFile().utf8().data(), NULL)) {
+                    TIZEN_LOGE("elm_image_file_set is failed");
                     icon = 0;
                 }
             }
@@ -181,15 +185,20 @@ void WebContextMenuProxyTizen::showContextMenu(const WebCore::IntPoint& position
             popupPosition.move(-scrollPosition.x(), -scrollPosition.y());
         }
 #endif
+        popupPosition.setX(popupPosition.x() + webViewX);
+        popupPosition.setY(popupPosition.y() + webViewY);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        if ( m_pageClientImpl->isTextSelectionMode()) {
+        if (m_pageClientImpl->isTextSelectionMode()) {
+            elm_object_style_set(m_popup,"copypaste");
             elm_ctxpopup_horizontal_set(m_popup, EINA_TRUE);
             elm_ctxpopup_direction_priority_set(m_popup, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UP);
+
+            m_pageClientImpl->changeContextMenuPosition(popupPosition);
         }
 #endif
 
-        evas_object_move(m_popup, popupPosition.x() + webViewX, popupPosition.y() + webViewY);
+        evas_object_move(m_popup, popupPosition.x(), popupPosition.y());
         evas_object_show(m_popup);
 
         evas_object_smart_callback_add(m_popup, "dismissed", contextMenuPopupDismissedCallback, m_pageClientImpl);