Display select all menu in context menu only in text selection mode
authorTaeyun An <ty.an@samsung.com>
Wed, 22 May 2013 11:42:03 +0000 (20:42 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 5 Jun 2013 07:49:41 +0000 (16:49 +0900)
[Title] Display select all menu in context menu only in text selection mode
[Issue#] N_SE-39211
[Problem] Select all menu is appeared when it is not selection mode
[Cause] There is no selection mode check routine
[Solution] Add selection status check routine

Change-Id: If0fd189f17c65240e334e79eb8cdd5e9971a225b

Source/WebCore/page/ContextMenuController.cpp

index a080388..36eab64 100755 (executable)
@@ -839,7 +839,8 @@ void ContextMenuController::populate()
         FrameLoader* loader = frame->loader();
         KURL linkURL = m_hitTestResult.absoluteLinkURL();
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        appendItem(SelectAllItem, m_contextMenu.get());
+        if (m_hitTestResult.isSelected() || frame->selection()->isRange())
+            appendItem(SelectAllItem, m_contextMenu.get());
 #endif
         if (!linkURL.isEmpty()) {
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)