Title: [152243] branches/safari-537-branch/Source/WebCore

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-01 20:33:04 UTC (rev 152243)
@@ -1,5 +1,35 @@
 2013-07-01  Lucas Forschler  <[email protected]>
 
+        Merge r152117
+
+    2013-06-27  Ruth Fong  <[email protected]>
+
+            Polish context menus for media elements
+            https://bugs.webkit.org/show_bug.cgi?id=118078
+            <rdar://problem/14278960>
+
+            Reviewed by Eric Carlson.
+
+            No new tests: media/context-menu-action.html,
+            which has been disabled by bug 116651, is used to test context menus.
+
+            * English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen"
+            and added strings "Show Controls" and "Hide Controls".
+
+            * page/ContextMenuController.cpp: Updated to include a new context menu item 
+            that toggles betweeen "Show Controls" and "Hide Controls".
+
+            * platform/ContextMenuItem.h:
+
+            * platform/LocalizedStrings.cpp:
+            * platform/LocalizedStrings.h:
+            * platform/efl/LocalizedStringsEfl.cpp:
+            * platform/gtk/LocalizedStringsGtk.cpp:
+            * platform/qt/LocalizedStringsQt.cpp:
+            Added equivalents of localized strings "Show Controls" and "Hide Controls".
+
+2013-07-01  Lucas Forschler  <[email protected]>
+
         Merge r152065
 
     2013-06-26  Roger Fong  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/English.lproj/Localizable.strings (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/English.lproj/Localizable.strings	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/English.lproj/Localizable.strings	2013-07-01 20:33:04 UTC (rev 152243)
@@ -179,10 +179,10 @@
 "Drag (Undo action name)" = "Drag";
 
 /* Video Enter Fullscreen context menu item */
-"Enter Fullscreen" = "Enter Fullscreen";
+"Enter Full Screen" = "Enter Full Screen";
 
 /* Video Exit Fullscreen context menu item */
-"Exit Fullscreen" = "Exit Fullscreen";
+"Exit Full Screen" = "Exit Full Screen";
 
 /* Default application name for Open With context menu */
 "Finder" = "Finder";
@@ -202,6 +202,9 @@
 /* accessibility role description for web area */
 "HTML content" = "HTML content";
 
+/* Hide Media Controls context menu item */
+"Hide Controls" = "Hide Controls";
+
 /* menu item title */
 "Hide Spelling and Grammar" = "Hide Spelling and Grammar";
 
@@ -409,6 +412,9 @@
 /* Show colors context menu item */
 "Show Colors" = "Show Colors";
 
+/* Show Media Controls context menu item */
+"Show Controls" = "Show Controls";
+
 /* Show fonts context menu item */
 "Show Fonts" = "Show Fonts";
 

Modified: branches/safari-537-branch/Source/WebCore/page/ContextMenuController.cpp (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/page/ContextMenuController.cpp	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/page/ContextMenuController.cpp	2013-07-01 20:33:04 UTC (rev 152243)
@@ -745,6 +745,12 @@
 #define SUPPORTS_TOGGLE_VIDEO_FULLSCREEN 0
 #endif
 
+#if PLATFORM(MAC)
+#define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 1
+#else
+#define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 0
+#endif
+
 void ContextMenuController::populate()
 {
     ContextMenuItem OpenLinkItem(ActionType, ContextMenuItemTagOpenLink, contextMenuItemTagOpenLink());
@@ -771,8 +777,13 @@
         contextMenuItemTagMediaPlay());
     ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute, 
         contextMenuItemTagMediaMute());
+#if SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS
+    ContextMenuItem ToggleMediaControls(ActionType, ContextMenuItemTagToggleMediaControls,
+        contextMenuItemTagHideMediaControls());
+#else
     ContextMenuItem ToggleMediaControls(CheckableActionType, ContextMenuItemTagToggleMediaControls, 
         contextMenuItemTagToggleMediaControls());
+#endif
     ContextMenuItem ToggleMediaLoop(CheckableActionType, ContextMenuItemTagToggleMediaLoop, 
         contextMenuItemTagToggleMediaLoop());
     ContextMenuItem EnterVideoFullscreen(ActionType, ContextMenuItemTagEnterVideoFullscreen,
@@ -1363,7 +1374,11 @@
                 item.setTitle(contextMenuItemTagCopyAudioLinkToClipboard());
             break;
         case ContextMenuItemTagToggleMediaControls:
+#if SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS
+            item.setTitle(m_hitTestResult.mediaControlsEnabled() ? contextMenuItemTagHideMediaControls() : contextMenuItemTagShowMediaControls());
+#else
             shouldCheck = m_hitTestResult.mediaControlsEnabled();
+#endif
             break;
         case ContextMenuItemTagToggleMediaLoop:
             shouldCheck = m_hitTestResult.mediaLoopEnabled();

Modified: branches/safari-537-branch/Source/WebCore/platform/LocalizedStrings.cpp (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/platform/LocalizedStrings.cpp	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/platform/LocalizedStrings.cpp	2013-07-01 20:33:04 UTC (rev 152243)
@@ -494,6 +494,16 @@
     return WEB_UI_STRING("Controls", "Media Controls context menu item");
 }
 
+String contextMenuItemTagShowMediaControls()
+{
+    return WEB_UI_STRING("Show Controls", "Show Media Controls context menu item");
+}
+
+String contextMenuItemTagHideMediaControls()
+{
+    return WEB_UI_STRING("Hide Controls", "Hide Media Controls context menu item");
+}
+
 String contextMenuItemTagToggleMediaLoop()
 {
     return WEB_UI_STRING("Loop", "Media Loop context menu item");
@@ -501,12 +511,12 @@
 
 String contextMenuItemTagEnterVideoFullscreen()
 {
-    return WEB_UI_STRING("Enter Fullscreen", "Video Enter Fullscreen context menu item");
+    return WEB_UI_STRING("Enter Full Screen", "Video Enter Fullscreen context menu item");
 }
 
 String contextMenuItemTagExitVideoFullscreen()
 {
-    return WEB_UI_STRING("Exit Fullscreen", "Video Exit Fullscreen context menu item");
+    return WEB_UI_STRING("Exit Full Screen", "Video Exit Fullscreen context menu item");
 }
 
 String contextMenuItemTagMediaPlay()

Modified: branches/safari-537-branch/Source/WebCore/platform/LocalizedStrings.h (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/platform/LocalizedStrings.h	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/platform/LocalizedStrings.h	2013-07-01 20:33:04 UTC (rev 152243)
@@ -137,6 +137,8 @@
     String contextMenuItemTagCopyVideoLinkToClipboard();
     String contextMenuItemTagCopyAudioLinkToClipboard();
     String contextMenuItemTagToggleMediaControls();
+    String contextMenuItemTagShowMediaControls();
+    String contextMenuItemTagHideMediaControls();
     String contextMenuItemTagToggleMediaLoop();
     String contextMenuItemTagEnterVideoFullscreen();
     String contextMenuItemTagExitVideoFullscreen();

Modified: branches/safari-537-branch/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2013-07-01 20:33:04 UTC (rev 152243)
@@ -153,6 +153,16 @@
     return String::fromUTF8("Toggle Media Controls");
 }
 
+String contextMenuItemTagShowMediaControls()
+{
+    return String::fromUTF8("Show Media Controls");
+}
+
+String contextMenuitemTagHideMediaControls()
+{
+    return String::fromUTF8("Hide Media Controls");
+}
+
 String contextMenuItemTagToggleMediaLoop()
 {
     return String::fromUTF8("Toggle Media Loop Playback");

Modified: branches/safari-537-branch/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2013-07-01 20:33:04 UTC (rev 152243)
@@ -166,6 +166,16 @@
     return String::fromUTF8(_("_Toggle Media Controls"));
 }
 
+String contextMenuItemTagShowMediaControls()
+{
+    return String::fromUTF8(_("_Show Media Controls"));
+}
+
+String contextMenuItemTagHideMediaControls()
+{
+    return String::fromUTF8(_("_Hide Media Controls"));
+}
+
 String contextMenuItemTagToggleMediaLoop()
 {
     return String::fromUTF8(_("Toggle Media _Loop Playback"));

Modified: branches/safari-537-branch/Source/WebCore/platform/qt/LocalizedStringsQt.cpp (152242 => 152243)


--- branches/safari-537-branch/Source/WebCore/platform/qt/LocalizedStringsQt.cpp	2013-07-01 20:30:21 UTC (rev 152242)
+++ branches/safari-537-branch/Source/WebCore/platform/qt/LocalizedStringsQt.cpp	2013-07-01 20:33:04 UTC (rev 152243)
@@ -158,6 +158,16 @@
     return QCoreApplication::translate("QWebPage", "Toggle Controls", "Toggle Media Controls");
 }
 
+String contextMenuItemTagShowMediaControls()
+{
+    return QCoreApplication::translate("QWebPage", "Show Controls", "Show Media Controls");
+}
+
+String contextMenuItemTagHideMediaControls()
+{
+    return QCoreApplication::translate("QWebPage", "Hide Controls", "Hide Media Controls");
+}
+
 String contextMenuItemTagToggleMediaLoop()
 {
     return QCoreApplication::translate("QWebPage", "Toggle Loop", "Toggle Media Loop Playback");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to