Fix for context menu flicker and Selection handler disappear on double tapping the...
authorSudarshan C P <sudarshan.cp@samsung.com>
Thu, 19 Sep 2013 21:22:08 +0000 (02:52 +0530)
committerTaeyun An <ty.an@samsung.com>
Thu, 10 Oct 2013 08:03:08 +0000 (17:03 +0900)
    [Title] Fix for context menu flicker/Selection handler disappear on double tapping the word in Email APP.
    [Issue#] P130917-03737
    [Problem] Double tapping on word, context menu flickers and again tapping selected word selection
              handler disappears.
    [Cause] On double tap UI process and WebProcess, both updates the context menu and selection handler,
            due to this flicker shown, again double tapping the selected word we are hiding the selection.
    [Solution] Handled the above scenario with proper condtiion for updating context menu and selection handler,
               in case of double tap.

Change-Id: I5f617c29572a80ee958650852cf7749d2c12aec3

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

index 68247ff..0638634 100755 (executable)
@@ -560,7 +560,7 @@ void TextSelection::updateHandlesAndContextMenu(bool isShow, bool isScrolling)
     }
 
     const EditorState& editorState = m_viewImpl->page()->editorState();
-    if (!editorState.selectionIsRange && editorState.isContentEditable) {
+    if (!isTextSelectionMode() && !editorState.selectionIsRange && editorState.isContentEditable) {
         setIsTextSelectionMode(false);
         return;
     }
@@ -924,16 +924,14 @@ void TextSelection::setAutoWordSelection(const IntPoint& point)
     IntPoint contentsPoint = m_viewImpl->transformFromScene().mapPoint(point);
 
     setAutoWordSelectionScheduled(false, IntPoint(0, 0));
-    setIsTextSelectionMode(false);
 
     bool result = m_viewImpl->page()->selectClosestWord(contentsPoint, true);
-    if (!result)
+    if (!result) {
+        setIsTextSelectionMode(false);
         return;
+    }
 
     setIsTextSelectionMode(true);
-
-    updateHandlers();
-    showContextMenu();
 }
 } // namespace WebKit