Prevent to show context menu after paste
authorTaeyun An <ty.an@samsung.com>
Thu, 10 Oct 2013 12:45:10 +0000 (21:45 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 10 Oct 2013 13:12:45 +0000 (13:12 +0000)
[Title] Prevent to show context menu after paste
[Issue#] N_SE-53993
[Problem] Context menu is appearing after paste operation via selection menu
[Cause] Condition is wrong related context menu hide
[Solution] Prevent to show context menu after paste

Change-Id: I25177afd82f5e08bc57916437d094bef4cdb984f

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

index 754a381..53baa39 100755 (executable)
@@ -394,14 +394,6 @@ void PageClientImpl::didChangeViewportProperties(const WebCore::ViewportAttribut
     double scaleRatioBeforeRotation = m_scaleFactor / m_viewportConstraints.minimumScale;
     m_viewportConstraints = computeViewportConstraints(attributes);
 
-#if ENABLE(TIZEN_GESTURE)
-    bool doubleTapEnabled = userScalable();
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    doubleTapEnabled |= ewk_settings_select_word_automatically_get(ewk_view_settings_get(m_viewImpl->view()));
-#endif
-    m_viewImpl->setDoubleTapEnabled(doubleTapEnabled);
-#endif
-
     // Initially, m_scaleFactor is not decided yet.
     // So, we should update visible content rect at here.
     if (!m_scaleFactor) {
@@ -420,7 +412,11 @@ void PageClientImpl::didChangeViewportProperties(const WebCore::ViewportAttribut
     }
 
 #if ENABLE(TIZEN_GESTURE)
-    m_viewImpl->setDoubleTapEnabled(userScalable());
+    bool doubleTapEnabled = userScalable();
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    doubleTapEnabled |= ewk_settings_select_word_automatically_get(ewk_view_settings_get(m_viewImpl->view()));
+#endif
+    m_viewImpl->setDoubleTapEnabled(doubleTapEnabled);
 #endif
 
 #if ENABLE(TIZEN_DLOG_SUPPORT)
index 9464db1..97298df 100755 (executable)
@@ -563,7 +563,7 @@ void TextSelection::updateHandlesAndContextMenu(bool isShow, bool isScrolling)
     }
 
     const EditorState& editorState = m_viewImpl->page()->editorState();
-    if (!isTextSelectionMode() && !editorState.selectionIsRange && editorState.isContentEditable) {
+    if (!editorState.selectionIsRange && editorState.isContentEditable) {
         setIsTextSelectionMode(false);
         return;
     }
@@ -852,6 +852,11 @@ void TextSelection::showHandlesAndContextMenu()
 
         m_lastLeftHandleRect = leftRect;
         m_lastRightHandleRect = rightRect;
+    } else {
+        if (m_showTimer) {
+            ecore_timer_del(m_showTimer);
+            m_showTimer = 0;
+        }
     }
 }