Update selection handle position in Ref-Internet browser
authorTaeyun An <ty.an@samsung.com>
Fri, 12 Jul 2013 07:39:56 +0000 (16:39 +0900)
committerTaeyun An <ty.an@samsung.com>
Fri, 12 Jul 2013 09:09:54 +0000 (18:09 +0900)
[Title] Update selection handle position in Ref-Internet browser
[Issue#] N_SE-44441
[Problem] Selection Handles are not moving with selected text while swipe web page after rotate a few times.
[Cause] There is existed selection mode to false in updateHandlesAndContextMemu() method if it doesn't have range and it is in content editable.
[Solution] Check one more routine if gesture is working routine.

Change-Id: I13ed1dee1c9f977003144509d21a54f2b5221614

Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp
Source/WebKit2/UIProcess/tizen/WebContextMenuProxyTizen.cpp

index 470da01..47ff297 100644 (file)
@@ -434,9 +434,11 @@ void TextSelection::updateHandlesAndContextMenu(bool isShow, bool isScrolling)
         return;
     }
 
-    EditorState editorState = m_viewImpl->page()->editorState();
-    if (!editorState.selectionIsRange && editorState.isContentEditable)
-        setIsTextSelectionMode(false);
+    if (m_viewImpl->gestureClient->isGestureWorking()) {
+        EditorState editorState = m_viewImpl->page()->editorState();
+        if (!editorState.selectionIsRange && editorState.isContentEditable)
+            setIsTextSelectionMode(false);
+    }
 
     if (isShow) {
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
index ec9830b..4c90900 100755 (executable)
@@ -219,6 +219,9 @@ Eina_Bool WebContextMenuProxyTizen::contextMenuTimerCallback(void* data)
             evas_object_hide(contextMenuProxy->m_popup);
 
         contextMenuProxy->m_pageClientImpl->setIsContextMenuVisible(false);
+        EditorState editorState = contextMenuProxy->m_page->editorState();
+        if (!editorState.selectionIsRange && editorState.isContentEditable)
+            contextMenuProxy->m_pageClientImpl->setIsTextSelectionMode(false);
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
         contextMenuProxy->m_pageClientImpl->hideFocusRing();
 #endif
@@ -277,9 +280,12 @@ void WebContextMenuProxyTizen::showContextMenu(const WebCore::IntPoint& position
         if (m_isContextMenuForTextSelection) {
             if (!m_pageClientImpl->isTextSelectionMode())
                 m_pageClientImpl->setIsTextSelectionMode(true);
+
             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