[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
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;
#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);