Fixed that context menu doesn't disappear by selecting buttons besides webview in...
authorYuni Jeong <yhnet.jung@samsung.com>
Wed, 29 Aug 2012 13:02:03 +0000 (22:02 +0900)
committerYuni Jeong <yhnet.jung@samsung.com>
Thu, 30 Aug 2012 02:32:12 +0000 (11:32 +0900)
[Title] Fixed that context menu doesn't disappear by selecting button besides webview in browser.
        - ex) back, bookmark, more... buttons of browser control bar & reader icon & ...
[Issue#] WEB-1541, WEB-1135, N_SE-7964
[Problem] context menu doesn't disappear by selecting buttons besides webview in browser.
[Cause] There is no routine for hiding context menu in case of this issue.
[Solution] If webview state be change to 'focus-out' state,
           Added routine for hiding context menu and text selection off.

Change-Id: I993b7b6ec9652f2a889ac1e1bb3ce0e345a4601b

Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/efl/WebContextMenuProxyEfl.cpp

index 71474bf..e894d35 100755 (executable)
@@ -437,6 +437,17 @@ static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
         ecore_imf_context_focus_out(context);
     }
 #endif
+
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    if (priv->pageClient->isTextSelectionMode())
+        priv->pageClient->setIsTextSelectionMode(false);
+#endif
+
+#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
+    if (priv->pageClient->isContextMenuVisible())
+        priv->pageClient->page()->hideContextMenu();
+#endif
+
 #if OS(TIZEN)
     priv->pageClient->setViewFocused(false);
 #endif // #if OS(TIZEN)
index 8b0d791..f736230 100755 (executable)
@@ -146,6 +146,7 @@ void WebContextMenuProxyEfl::showContextMenu(const WebCore::IntPoint& position,
 
         evas_object_smart_callback_add(m_popup, "dismissed", contextMenuPopupDismissedCallback, m_pageClientImpl);
 
+        evas_object_focus_set(m_webView, true);
         m_pageClientImpl->setIsContextMenuVisible(true);
     }
 #else