Skip to content
  • commit-queue@webkit.org's avatar
    Allow for toggling fullscreen on <video> elements · 0f4ee83b
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=117220
    
    Patch by Ruth Fong <ruth_fong@apple.com> on 2013-06-12
    Reviewed by Dean Jackson.
    
    Source/WebCore:
    
    This patch adds the ability for fullscreen
    context menu item on <video> elements to switch between "Enter Fullscreen"
    and "Exit Fullscreen" and behave appropriately.
    
    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: Add "Exit Fullscreen" string.
    * html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::toggleFullscreenState): Added to appropriately enter/exit fullscreen.
    * html/HTMLMediaElement.h:
    * page/ContextMenuController.cpp:
    * platform/ContextMenuItem.h:
    * platform/LocalizedStrings.cpp:
    * platform/LocalizedStrings.h:
    Updated to rename variables more appropriately to reflect the toggle-ability of video fullscreen.
    * rendering/HitTestResult.cpp:
    (WebCore::HitTestResult::mediaIsInFullscreen): Added to check if an element
    was a media element in fullscreen.
    (WebCore::HitTestResult::toggleMediaFullscreenState): Added to hook into
    HTMLMediaElement::toggleFullscreenState.
    * rendering/HitTestResult.h:
    
    Source/WebKit2:
    
    * Shared/API/c/WKContextMenuItemTypes.h:
    * Shared/API/c/WKSharedAPICast.h:
    Added variables to support the toggle-ability of the fullscreen
    video context menu item.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0f4ee83b