Changeset 152117 in webkit
- Timestamp:
- Jun 27, 2013 11:13:47 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r152105 r152117 1 2013-06-27 Ruth Fong <ruth_fong@apple.com> 2 3 Polish context menus for media elements 4 https://bugs.webkit.org/show_bug.cgi?id=118078 5 <rdar://problem/14278960> 6 7 Reviewed by Eric Carlson. 8 9 No new tests: media/context-menu-action.html, 10 which has been disabled by bug 116651, is used to test context menus. 11 12 * English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen" 13 and added strings "Show Controls" and "Hide Controls". 14 15 * page/ContextMenuController.cpp: Updated to include a new context menu item 16 that toggles betweeen "Show Controls" and "Hide Controls". 17 18 * platform/ContextMenuItem.h: 19 20 * platform/LocalizedStrings.cpp: 21 * platform/LocalizedStrings.h: 22 * platform/efl/LocalizedStringsEfl.cpp: 23 * platform/gtk/LocalizedStringsGtk.cpp: 24 * platform/qt/LocalizedStringsQt.cpp: 25 Added equivalents of localized strings "Show Controls" and "Hide Controls". 26 1 27 2013-06-27 Chris Fleizach <cfleizach@apple.com> 2 28 -
trunk/Source/WebCore/English.lproj/Localizable.strings
r151713 r152117 180 180 181 181 /* Video Enter Fullscreen context menu item */ 182 "Enter Full screen" = "Enter Fullscreen";182 "Enter Full Screen" = "Enter Full Screen"; 183 183 184 184 /* Video Exit Fullscreen context menu item */ 185 "Exit Full screen" = "Exit Fullscreen";185 "Exit Full Screen" = "Exit Full Screen"; 186 186 187 187 /* Default application name for Open With context menu */ … … 203 203 "HTML content" = "HTML content"; 204 204 205 /* Hide Media Controls context menu item */ 206 "Hide Controls" = "Hide Controls"; 207 205 208 /* menu item title */ 206 209 "Hide Spelling and Grammar" = "Hide Spelling and Grammar"; … … 410 413 "Show Colors" = "Show Colors"; 411 414 415 /* Show Media Controls context menu item */ 416 "Show Controls" = "Show Controls"; 417 412 418 /* Show fonts context menu item */ 413 419 "Show Fonts" = "Show Fonts"; -
trunk/Source/WebCore/page/ContextMenuController.cpp
r151656 r152117 746 746 #endif 747 747 748 #if PLATFORM(MAC) 749 #define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 1 750 #else 751 #define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 0 752 #endif 753 748 754 void ContextMenuController::populate() 749 755 { … … 772 778 ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute, 773 779 contextMenuItemTagMediaMute()); 780 #if SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 781 ContextMenuItem ToggleMediaControls(ActionType, ContextMenuItemTagToggleMediaControls, 782 contextMenuItemTagHideMediaControls()); 783 #else 774 784 ContextMenuItem ToggleMediaControls(CheckableActionType, ContextMenuItemTagToggleMediaControls, 775 785 contextMenuItemTagToggleMediaControls()); 786 #endif 776 787 ContextMenuItem ToggleMediaLoop(CheckableActionType, ContextMenuItemTagToggleMediaLoop, 777 788 contextMenuItemTagToggleMediaLoop()); … … 1364 1375 break; 1365 1376 case ContextMenuItemTagToggleMediaControls: 1377 #if SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 1378 item.setTitle(m_hitTestResult.mediaControlsEnabled() ? contextMenuItemTagHideMediaControls() : contextMenuItemTagShowMediaControls()); 1379 #else 1366 1380 shouldCheck = m_hitTestResult.mediaControlsEnabled(); 1381 #endif 1367 1382 break; 1368 1383 case ContextMenuItemTagToggleMediaLoop: -
trunk/Source/WebCore/platform/LocalizedStrings.cpp
r152035 r152117 495 495 } 496 496 497 String contextMenuItemTagShowMediaControls() 498 { 499 return WEB_UI_STRING("Show Controls", "Show Media Controls context menu item"); 500 } 501 502 String contextMenuItemTagHideMediaControls() 503 { 504 return WEB_UI_STRING("Hide Controls", "Hide Media Controls context menu item"); 505 } 506 497 507 String contextMenuItemTagToggleMediaLoop() 498 508 { … … 502 512 String contextMenuItemTagEnterVideoFullscreen() 503 513 { 504 return WEB_UI_STRING("Enter Full screen", "Video Enter Fullscreen context menu item");514 return WEB_UI_STRING("Enter Full Screen", "Video Enter Fullscreen context menu item"); 505 515 } 506 516 507 517 String contextMenuItemTagExitVideoFullscreen() 508 518 { 509 return WEB_UI_STRING("Exit Full screen", "Video Exit Fullscreen context menu item");519 return WEB_UI_STRING("Exit Full Screen", "Video Exit Fullscreen context menu item"); 510 520 } 511 521 -
trunk/Source/WebCore/platform/LocalizedStrings.h
r152035 r152117 138 138 String contextMenuItemTagCopyAudioLinkToClipboard(); 139 139 String contextMenuItemTagToggleMediaControls(); 140 String contextMenuItemTagShowMediaControls(); 141 String contextMenuItemTagHideMediaControls(); 140 142 String contextMenuItemTagToggleMediaLoop(); 141 143 String contextMenuItemTagEnterVideoFullscreen(); -
trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp
r151778 r152117 154 154 } 155 155 156 String contextMenuItemTagShowMediaControls() 157 { 158 return String::fromUTF8("Show Media Controls"); 159 } 160 161 String contextMenuitemTagHideMediaControls() 162 { 163 return String::fromUTF8("Hide Media Controls"); 164 } 165 156 166 String contextMenuItemTagToggleMediaLoop() 157 167 { -
trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
r151778 r152117 165 165 { 166 166 return String::fromUTF8(_("_Toggle Media Controls")); 167 } 168 169 String contextMenuItemTagShowMediaControls() 170 { 171 return String::fromUTF8(_("_Show Media Controls")); 172 } 173 174 String contextMenuItemTagHideMediaControls() 175 { 176 return String::fromUTF8(_("_Hide Media Controls")); 167 177 } 168 178 -
trunk/Source/WebCore/platform/qt/LocalizedStringsQt.cpp
r151656 r152117 157 157 { 158 158 return QCoreApplication::translate("QWebPage", "Toggle Controls", "Toggle Media Controls"); 159 } 160 161 String contextMenuItemTagShowMediaControls() 162 { 163 return QCoreApplication::translate("QWebPage", "Show Controls", "Show Media Controls"); 164 } 165 166 String contextMenuItemTagHideMediaControls() 167 { 168 return QCoreApplication::translate("QWebPage", "Hide Controls", "Hide Media Controls"); 159 169 } 160 170
Note: See TracChangeset
for help on using the changeset viewer.