Return 0 value if textselection handlers are invisible.
authorTaeyun An <ty.an@samsung.com>
Fri, 21 Jun 2013 15:25:08 +0000 (00:25 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 24 Jun 2013 10:03:33 +0000 (10:03 +0000)
[Title] Return 0 value if textselection handlers are invisible.
[Issue#] N_SE-42094
[Problem] Sometimes Focus ring isn't disappear when tapping after showing context menu.
[Cause] There are existed invisible textselection handlers it makes ignore focus ring hide routine.
[Solution] Return 0 value if textselection handlers are invisible.

Change-Id: Ied695051f92992fdb93ae273f1078ed01a056606

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

index 84efac3..726a020 100644 (file)
@@ -614,11 +614,11 @@ void TextSelection::textSelectionUp(const IntPoint& point, bool isStartedTextSel
 TextSelectionHandle* TextSelection::getSelectedHandle(const IntPoint& position)
 {
     WebCore::IntRect leftHandleRect = m_leftHandle->getHandleRect();
-    if (leftHandleRect.contains(position))
+    if (!leftHandleRect.isEmpty() && leftHandleRect.contains(position))
         return m_leftHandle;
 
     WebCore::IntRect rightHandleRect = m_rightHandle->getHandleRect();
-    if (rightHandleRect.contains(position))
+    if (!rightHandleRect.isEmpty() && rightHandleRect.contains(position))
         return m_rightHandle;
 
     return 0;
index dfed306..1da7aae 100644 (file)
@@ -108,6 +108,9 @@ void TextSelectionHandle::hide()
 #if ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
 const IntRect TextSelectionHandle::getHandleRect()
 {
+    if (!evas_object_visible_get(m_icon))
+        return IntRect();
+
     int x, y;
     evas_object_geometry_get(m_icon, &x, &y, 0, 0);