Changeset 198900 in webkit
- Timestamp:
- Mar 31, 2016 11:23:29 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r198895 r198900 1 2016-03-30 Ada Chan <adachan@apple.com> 2 3 Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms. 4 https://bugs.webkit.org/show_bug.cgi?id=156031 5 6 Reviewed by Eric Carlson. 7 8 * page/ContextMenuController.cpp: 9 (WebCore::ContextMenuController::contextMenuItemSelected): 10 Handle the selection of the context menu item. 11 (WebCore::ContextMenuController::populate): 12 Add this menu item on Mac. 13 (WebCore::ContextMenuController::checkOrEnableIfNeeded): 14 Set the menu item's title depending on the current enhanced fullscreen state 15 and enable this menu item if supported. 16 17 * platform/ContextMenuItem.h: 18 Define the new tag for this menu item. 19 20 * platform/LocalizedStrings.cpp: 21 (WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen): 22 (WebCore::contextMenuItemTagExitVideoEnhancedFullscreen): 23 * platform/LocalizedStrings.h: 24 25 * rendering/HitTestResult.cpp: 26 (WebCore::HitTestResult::mediaSupportsEnhancedFullscreen): 27 (WebCore::HitTestResult::mediaIsInEnhancedFullscreen): 28 (WebCore::HitTestResult::toggleEnhancedFullscreenForVideo): 29 * rendering/HitTestResult.h: 30 1 31 2016-03-31 Nan Wang <n_wang@apple.com> 2 32 -
trunk/Source/WebCore/page/ContextMenuController.cpp
r194305 r198900 280 280 m_context.hitTestResult().toggleMediaMuteState(); 281 281 break; 282 case ContextMenuItemTagToggleVideoEnhancedFullscreen: 283 m_context.hitTestResult().toggleEnhancedFullscreenForVideo(); 284 break; 282 285 case ContextMenuItemTagOpenFrameInNewWindow: { 283 286 DocumentLoader* loader = frame->loader().documentLoader(); … … 767 770 ContextMenuItem ToggleVideoFullscreen(ActionType, ContextMenuItemTagToggleVideoFullscreen, 768 771 contextMenuItemTagEnterVideoFullscreen()); 772 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 773 ContextMenuItem ToggleVideoEnhancedFullscreen(ActionType, ContextMenuItemTagToggleVideoEnhancedFullscreen, contextMenuItemTagEnterVideoEnhancedFullscreen()); 774 #endif 769 775 #if PLATFORM(COCOA) 770 776 ContextMenuItem SearchSpotlightItem(ActionType, ContextMenuItemTagSearchInSpotlight, … … 863 869 #else 864 870 appendItem(EnterVideoFullscreen, m_contextMenu.get()); 871 #endif 872 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 873 appendItem(ToggleVideoEnhancedFullscreen, m_contextMenu.get()); 865 874 #endif 866 875 appendItem(*separatorItem(), m_contextMenu.get()); … … 1363 1372 shouldEnable = m_context.hitTestResult().mediaSupportsFullscreen(); 1364 1373 break; 1374 case ContextMenuItemTagToggleVideoEnhancedFullscreen: 1375 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 1376 item.setTitle(m_context.hitTestResult().mediaIsInEnhancedFullscreen() ? contextMenuItemTagExitVideoEnhancedFullscreen() : contextMenuItemTagEnterVideoEnhancedFullscreen()); 1377 #endif 1378 shouldEnable = m_context.hitTestResult().mediaSupportsEnhancedFullscreen(); 1379 break; 1365 1380 case ContextMenuItemTagOpenFrameInNewWindow: 1366 1381 case ContextMenuItemTagSpellingGuess: -
trunk/Source/WebCore/platform/ContextMenuItem.h
r192394 r198900 147 147 ContextMenuItemTagDictationAlternative, 148 148 ContextMenuItemTagToggleVideoFullscreen, 149 ContextMenuItemTagShareMenu, 149 ContextMenuItemTagShareMenu, 150 ContextMenuItemTagToggleVideoEnhancedFullscreen, 150 151 ContextMenuItemBaseCustomTag = 5000, 151 152 ContextMenuItemLastCustomTag = 5999, -
trunk/Source/WebCore/platform/LocalizedStrings.cpp
r198381 r198900 507 507 return WEB_UI_STRING("Exit Full Screen", "Video Exit Fullscreen context menu item"); 508 508 } 509 510 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 511 512 #if USE(APPLE_INTERNAL_SDK) 513 #include <WebKitAdditions/ContextMenuLocalizedStringsAdditions.cpp> 514 #else 515 String contextMenuItemTagEnterVideoEnhancedFullscreen() 516 { 517 return { }; 518 } 519 520 String contextMenuItemTagExitVideoEnhancedFullscreen() 521 { 522 return { }; 523 } 524 #endif 525 526 #endif 509 527 510 528 String contextMenuItemTagMediaPlay() -
trunk/Source/WebCore/platform/LocalizedStrings.h
r198381 r198900 140 140 String contextMenuItemTagEnterVideoFullscreen(); 141 141 String contextMenuItemTagExitVideoFullscreen(); 142 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 143 String contextMenuItemTagEnterVideoEnhancedFullscreen(); 144 String contextMenuItemTagExitVideoEnhancedFullscreen(); 145 #endif 142 146 String contextMenuItemTagMediaPlay(); 143 147 String contextMenuItemTagMediaPause(); -
trunk/Source/WebCore/rendering/HitTestResult.cpp
r195487 r198900 774 774 } 775 775 776 #if USE(APPLE_INTERNAL_SDK) 777 #include <WebKitAdditions/HitTestResultAdditions.cpp> 778 #else 779 bool HitTestResult::mediaSupportsEnhancedFullscreen() const 780 { 781 return false; 782 } 783 784 bool HitTestResult::mediaIsInEnhancedFullscreen() const 785 { 786 return false; 787 } 788 789 void HitTestResult::toggleEnhancedFullscreenForVideo() const 790 { 791 } 792 #endif 793 776 794 } // namespace WebCore -
trunk/Source/WebCore/rendering/HitTestResult.h
r182957 r198900 128 128 bool mediaMuted() const; 129 129 void toggleMediaMuteState() const; 130 bool mediaSupportsEnhancedFullscreen() const; 131 bool mediaIsInEnhancedFullscreen() const; 132 void toggleEnhancedFullscreenForVideo() const; 133 130 134 WEBCORE_EXPORT bool isDownloadableMedia() const; 131 135 WEBCORE_EXPORT bool isOverTextInsideFormControlElement() const; -
trunk/Source/WebKit/mac/ChangeLog
r198655 r198900 1 2016-03-30 Ada Chan <adachan@apple.com> 2 3 Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms. 4 https://bugs.webkit.org/show_bug.cgi?id=156031 5 6 Reviewed by Eric Carlson. 7 8 * WebView/WebHTMLView.mm: 9 (toAction): 10 (toTag): 11 * WebView/WebUIDelegatePrivate.h: 12 1 13 2016-03-24 Said Abou-Hallawa <sabouhallawa@apple,com> 2 14 -
trunk/Source/WebKit/mac/WebView/WebHTMLView.mm
r198547 r198900 348 348 case WebMenuItemTagEnterVideoFullscreen: 349 349 return ContextMenuItemTagEnterVideoFullscreen; 350 case WebMenuItemTagToggleVideoEnhancedFullscreen: 351 return ContextMenuItemTagToggleVideoEnhancedFullscreen; 350 352 case WebMenuItemTagMediaPlayPause: 351 353 return ContextMenuItemTagMediaPlayPause; … … 534 536 case ContextMenuItemTagShareMenu: 535 537 return WebMenuItemTagShareMenu; 538 case ContextMenuItemTagToggleVideoEnhancedFullscreen: 539 return WebMenuItemTagToggleVideoEnhancedFullscreen; 536 540 537 541 case ContextMenuItemBaseCustomTag ... ContextMenuItemLastCustomTag: -
trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
r193944 r198900 103 103 WebMenuItemTagToggleVideoFullscreen, 104 104 WebMenuItemTagShareMenu, 105 WebMenuItemTagToggleVideoEnhancedFullscreen, 105 106 }; 106 107 -
trunk/Source/WebKit2/ChangeLog
r198896 r198900 1 2016-03-30 Ada Chan <adachan@apple.com> 2 3 Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms. 4 https://bugs.webkit.org/show_bug.cgi?id=156031 5 6 Reviewed by Eric Carlson. 7 8 * Shared/API/c/WKContextMenuItemTypes.h: 9 * Shared/API/c/WKSharedAPICast.h: 10 (WebKit::toAPI): 11 (WebKit::toImpl): 12 1 13 2016-03-31 Brent Fulgham <bfulgham@apple.com> 2 14 -
trunk/Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h
r182303 r198900 123 123 kWKContextMenuItemTagToggleVideoFullscreen, 124 124 kWKContextMenuItemTagShareMenu, 125 kWKContextMenuItemTagToggleVideoEnhancedFullscreen, 125 126 kWKContextMenuItemBaseApplicationTag = 10000 126 127 }; -
trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
r194496 r198900 473 473 case WebCore::ContextMenuItemTagEnterVideoFullscreen: 474 474 return kWKContextMenuItemTagEnterVideoFullscreen; 475 case WebCore::ContextMenuItemTagToggleVideoEnhancedFullscreen: 476 return kWKContextMenuItemTagToggleVideoEnhancedFullscreen; 475 477 case WebCore::ContextMenuItemTagMediaPlayPause: 476 478 return kWKContextMenuItemTagMediaPlayPause; … … 665 667 case kWKContextMenuItemTagEnterVideoFullscreen: 666 668 return WebCore::ContextMenuItemTagEnterVideoFullscreen; 669 case kWKContextMenuItemTagToggleVideoEnhancedFullscreen: 670 return WebCore::ContextMenuItemTagToggleVideoEnhancedFullscreen; 667 671 case kWKContextMenuItemTagMediaPlayPause: 668 672 return WebCore::ContextMenuItemTagMediaPlayPause;
Note: See TracChangeset
for help on using the changeset viewer.