Added routine to ignore text selection when longtap on handle from OSP.
authorYuni Jeong <yhnet.jung@samsung.com>
Mon, 1 Apr 2013 10:19:12 +0000 (19:19 +0900)
committerYuni Jeong <yhnet.jung@samsung.com>
Mon, 1 Apr 2013 12:48:49 +0000 (21:48 +0900)
[Title] Added routine to ignore text selection when longtap on handle from OSP.
[Issue#] N/A
[Problem] When longtap on handle from OSP, text selection is cleared.
[Cause] When longtap on handle, textSelectionDown function is called from OSP.
        And then, function to clear text selection is called in textSelectiondown function.
[Solution] Added routine to ignore text selection when longtap on handle from OSP.

Change-Id: Idea04ec51ba2f1cc3eb9929c856453f17f4dca35

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

index a653683..15dc4eb 100644 (file)
@@ -456,6 +456,10 @@ Eina_Bool TextSelection::moveAnimatorCallback(void* data)
 // 'return true' means text selection is possible.
 bool TextSelection::textSelectionDown(const IntPoint& point, bool isStartedTextSelectionFromOutside)
 {
+    // text selection should be ignored when longtap on handle from osp
+    if (!isEnabled() && isTextSelectionHandleDowned())
+        return false;
+
     setIsTextSelectionMode(false);
 
     IntPoint contentsPoint = m_viewImpl->transformFromScene().mapPoint(point);
@@ -480,6 +484,10 @@ bool TextSelection::textSelectionDown(const IntPoint& point, bool isStartedTextS
 
 void TextSelection::textSelectionMove(const IntPoint& point, bool isStartedTextSelectionFromOutside)
 {
+    // text selection should be ignored when longtap on handle from osp
+    if (!isEnabled() && isTextSelectionHandleDowned())
+        return;
+
     if (!isTextSelectionMode()) {
         stopMoveAnimator();
         return;
@@ -502,6 +510,10 @@ void TextSelection::textSelectionMove(const IntPoint& point, bool isStartedTextS
 
 void TextSelection::textSelectionUp(const IntPoint& point, bool isStartedTextSelectionFromOutside)
 {
+    // text selection should be ignored when longtap on handle from osp
+    if (!isEnabled() && isTextSelectionHandleDowned())
+        return;
+
     stopMoveAnimator();
 
     if (!isTextSelectionMode() || !isTextSelectionDowned())