From b40ebe5858d045da56b1bbda526ccdac8ea7a021 Mon Sep 17 00:00:00 2001 From: "prathmesh.m" Date: Tue, 26 Mar 2013 13:04:47 +0900 Subject: [PATCH] Incorrect display of menu option on a playing video [Title] Incorret display of menu optionon playing video [Issue#] WEB-2827 [Problem] Unmute option not displayed after selecting mute on a playing video [Cause] No option unmute was present [Solution] Added the string unmute for display Change-Id: Ib2a3cf5a89efeafd8d0f68552e7cdaa01e3b4d2d --- Source/WebCore/page/ContextMenuController.cpp | 11 +++++++++++ Source/WebCore/platform/LocalizedStrings.h | 3 +++ Source/WebCore/platform/efl/tizen/LocalizedStringsTizen.cpp | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/Source/WebCore/page/ContextMenuController.cpp b/Source/WebCore/page/ContextMenuController.cpp index a05ec15..92ae602 100755 --- a/Source/WebCore/page/ContextMenuController.cpp +++ b/Source/WebCore/page/ContextMenuController.cpp @@ -775,6 +775,10 @@ void ContextMenuController::populate() contextMenuItemTagMediaPlay()); ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute, contextMenuItemTagMediaMute()); +#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2) + ContextMenuItem MediaUnMute(ActionType, ContextMenuItemTagMediaMute, + contextMenuItemTagMediaUnMute()); +#endif ContextMenuItem ToggleMediaControls(CheckableActionType, ContextMenuItemTagToggleMediaControls, contextMenuItemTagToggleMediaControls()); ContextMenuItem ToggleMediaLoop(CheckableActionType, ContextMenuItemTagToggleMediaLoop, @@ -885,7 +889,14 @@ void ContextMenuController::populate() appendItem(*separatorItem(), m_contextMenu.get()); appendItem(MediaPlayPause, m_contextMenu.get()); +#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2) + if (m_hitTestResult.mediaMuted()) + appendItem(MediaUnMute, m_contextMenu.get()); + else + appendItem(MediaMute, m_contextMenu.get()); +#else appendItem(MediaMute, m_contextMenu.get()); +#endif appendItem(ToggleMediaControls, m_contextMenu.get()); appendItem(ToggleMediaLoop, m_contextMenu.get()); appendItem(EnterVideoFullscreen, m_contextMenu.get()); diff --git a/Source/WebCore/platform/LocalizedStrings.h b/Source/WebCore/platform/LocalizedStrings.h index d878678..2233bc7 100755 --- a/Source/WebCore/platform/LocalizedStrings.h +++ b/Source/WebCore/platform/LocalizedStrings.h @@ -146,6 +146,9 @@ namespace WebCore { String contextMenuItemTagMediaPlay(); String contextMenuItemTagMediaPause(); String contextMenuItemTagMediaMute(); +#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2) + String contextMenuItemTagMediaUnMute(); +#endif String contextMenuItemTagInspectElement(); #endif // ENABLE(CONTEXT_MENUS) diff --git a/Source/WebCore/platform/efl/tizen/LocalizedStringsTizen.cpp b/Source/WebCore/platform/efl/tizen/LocalizedStringsTizen.cpp index d4f082e..a50de88 100644 --- a/Source/WebCore/platform/efl/tizen/LocalizedStringsTizen.cpp +++ b/Source/WebCore/platform/efl/tizen/LocalizedStringsTizen.cpp @@ -335,6 +335,13 @@ String contextMenuItemTagMediaMute() return String::fromUTF8("Mute"); } +#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2) +String contextMenuItemTagMediaUnMute() +{ + return String::fromUTF8("Unmute"); +} +#endif + String contextMenuItemTagInspectElement() { return String::fromUTF8("Inspect element"); -- 2.7.4