From a6566423eef757b0fe29148a7e74703d51c756b8 Mon Sep 17 00:00:00 2001 From: Taeyun An Date: Sat, 22 Jun 2013 00:25:08 +0900 Subject: [PATCH] Return 0 value if textselection handlers are invisible. [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 | 4 ++-- Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionHandle.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp b/Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp index 84efac3..726a020 100644 --- a/Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp +++ b/Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp @@ -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; diff --git a/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionHandle.cpp b/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionHandle.cpp index dfed306..1da7aae 100644 --- a/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionHandle.cpp +++ b/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionHandle.cpp @@ -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); -- 2.7.4