Skip to content
  • philn@webkit.org's avatar
    2010-09-20 Philippe Normand <pnormand@igalia.com> · fd50428d
    philn@webkit.org authored
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            New items in the media Element context menu:
            - play/pause
            - mute/unmute
            - controls display control
            - switch to fullscreen (for video only)
            - loop playback control
            - copy media url to clipboard
            - open in new window
    
            Test: media/context-menu-actions.html
    
            * page/ContextMenuController.cpp:
            (WebCore::ContextMenuController::contextMenuItemSelected):
            * platform/ContextMenu.cpp:
            (WebCore::ContextMenu::populate):
            (WebCore::ContextMenu::checkOrEnableIfNeeded):
            * platform/ContextMenuItem.h:
            * platform/LocalizationStrategy.h:
            * platform/LocalizedStrings.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * platform/LocalizedStrings.h:
            * platform/android/LocalizedStringsAndroid.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * platform/brew/LocalizedStringsBrew.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * platform/efl/LocalizedStringsEfl.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * platform/gtk/ContextMenuItemGtk.cpp:
            (WebCore::gtkStockIDFromContextMenuAction):
            * platform/gtk/LocalizedStringsGtk.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * platform/haiku/LocalizedStringsHaiku.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * platform/wx/LocalizedStringsWx.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
            * rendering/HitTestResult.cpp:
            (WebCore::HitTestResult::absoluteMediaURL):
            (WebCore::HitTestResult::mediaSupportsFullscreen):
            (WebCore::HitTestResult::mediaElement):
            (WebCore::HitTestResult::toggleMediaControlsDisplay):
            (WebCore::HitTestResult::toggleMediaLoopPlayback):
            (WebCore::HitTestResult::enterFullscreenForVideo):
            (WebCore::HitTestResult::mediaControlsEnabled):
            (WebCore::HitTestResult::mediaLoopEnabled):
            (WebCore::HitTestResult::mediaPlaying):
            (WebCore::HitTestResult::toggleMediaPlayState):
            (WebCore::HitTestResult::mediaHasAudio):
            (WebCore::HitTestResult::mediaMuted):
            (WebCore::HitTestResult::toggleMediaMuteState):
            * rendering/HitTestResult.h:
    
    LayoutTests:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            New test checking the actions that can be triggered by activating
            the contex-menu of the media element. Skipped on mac, qt and win
            because of lack of DRT support.
    
            * media/context-menu-actions-expected.txt: Added.
            * media/context-menu-actions.html: Added.
            * platform/mac/Skipped:
            * platform/qt/Skipped:
            * platform/win/Skipped:
    
    WebKit:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            Updated localizable strings.
    
            * English.lproj/Localizable.strings:
    
    WebKit/chromium:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            New localized strings for the media element context-menu.
    
            * src/LocalizedStrings.cpp:
            (WebCore::contextMenuItemTagOpenVideoInNewWindow):
            (WebCore::contextMenuItemTagOpenAudioInNewWindow):
            (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebCore::contextMenuItemTagToggleMediaControls):
            (WebCore::contextMenuItemTagToggleMediaLoop):
            (WebCore::contextMenuItemTagEnterVideoFullscreen):
            (WebCore::contextMenuItemTagMediaPlay):
            (WebCore::contextMenuItemTagMediaPause):
            (WebCore::contextMenuItemTagMediaMute):
    
    WebKit/mac:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            New localized strings for the media element context-menu.
    
            * WebCoreSupport/WebPlatformStrategies.h:
            * WebCoreSupport/WebPlatformStrategies.mm:
            (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
            (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
            (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
            (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
            (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
            (WebPlatformStrategies::contextMenuItemTagMediaPlay):
            (WebPlatformStrategies::contextMenuItemTagMediaPause):
            (WebPlatformStrategies::contextMenuItemTagMediaMute):
    
    Webkit/qt:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            * WebCoreSupport/WebPlatformStrategies.cpp:
            * WebCoreSupport/WebPlatformStrategies.h:
            (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
            (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
            (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebPlatformStrategies::contextMenuItemTagToggleMediaControls)
            (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop)
            (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen)
            (WebPlatformStrategies::contextMenuItemTagMediaPlay)
            (WebPlatformStrategies::contextMenuItemTagMediaPause)
            (WebPlatformStrategies::contextMenuItemTagMediaMute)
    
    WebKit/win:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            New localized strings for the media element context-menu.
    
            * WebCoreSupport/WebPlatformStrategies.cpp:
            (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
            (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
            (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
            (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
            (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
            (WebPlatformStrategies::contextMenuItemTagMediaPlay):
            (WebPlatformStrategies::contextMenuItemTagMediaPause):
            (WebPlatformStrategies::contextMenuItemTagMediaMute):
            * WebCoreSupport/WebPlatformStrategies.h:
    
    WebKit2:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            New localized strings for the media element context-menu.
    
            * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
            (WebKit::WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
            (WebKit::WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
            (WebKit::WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
            (WebKit::WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
            (WebKit::WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
            (WebKit::WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
            (WebKit::WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
            (WebKit::WebPlatformStrategies::contextMenuItemTagMediaPlay):
            (WebKit::WebPlatformStrategies::contextMenuItemTagMediaPause):
            (WebKit::WebPlatformStrategies::contextMenuItemTagMediaMute):
            (WebKit::WebPlatformStrategies::contextMenuItemTagMediaUnMute):
            * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
    
    WebKitTools:
    
            Reviewed by Eric Carlson.
    
            [GTK] enhanced context menu for media elements
            https://bugs.webkit.org/show_bug.cgi?id=45021
    
            EventSender::contextClick() now returns an array of js
            objects. Each object has a title property and a click() method.
    
            * DumpRenderTree/gtk/EventSender.cpp:
            (getMenuItemTitleCallback):
            (setMenuItemTitleCallback):
            (menuItemClickCallback):
            (getMenuItemClass):
            (contextClickCallback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fd50428d