Commit 4460e441 authored by sandersd@chromium.org's avatar sandersd@chromium.org

Rename MediaHasVideo bit to MediaCanToggleControls.

Only set this bit for non-fullscreen video, since toggling is ignored for fullscreen video.

Chromium side change is https://codereview.chromium.org/201573013.

BUG=179489

Review URL: https://codereview.chromium.org/200723010

git-svn-id: svn://svn.chromium.org/blink/trunk@170701 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5ca46aef
...@@ -242,8 +242,12 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM ...@@ -242,8 +242,12 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
data.mediaFlags |= WebContextMenuData::MediaCanSave; data.mediaFlags |= WebContextMenuData::MediaCanSave;
if (mediaElement->hasAudio()) if (mediaElement->hasAudio())
data.mediaFlags |= WebContextMenuData::MediaHasAudio; data.mediaFlags |= WebContextMenuData::MediaHasAudio;
if (mediaElement->hasVideo()) // Media controls can be toggled only for video player. If we toggle
data.mediaFlags |= WebContextMenuData::MediaHasVideo; // controls for audio then the player disappears, and there is no way to
// return it back. Don't set this bit for fullscreen video, since
// toggling is ignored in that case.
if (mediaElement->hasVideo() && !mediaElement->isFullscreen())
data.mediaFlags |= WebContextMenuData::MediaCanToggleControls;
if (mediaElement->controls()) if (mediaElement->controls())
data.mediaFlags |= WebContextMenuData::MediaControls; data.mediaFlags |= WebContextMenuData::MediaControls;
} else if (isHTMLObjectElement(*r.innerNonSharedNode()) || isHTMLEmbedElement(*r.innerNonSharedNode())) { } else if (isHTMLObjectElement(*r.innerNonSharedNode()) || isHTMLEmbedElement(*r.innerNonSharedNode())) {
......
...@@ -100,7 +100,9 @@ struct WebContextMenuData { ...@@ -100,7 +100,9 @@ struct WebContextMenuData {
MediaLoop = 0x8, MediaLoop = 0x8,
MediaCanSave = 0x10, MediaCanSave = 0x10,
MediaHasAudio = 0x20, MediaHasAudio = 0x20,
// FIXME: Remove once Chromium references MediaCanToggleControls.
MediaHasVideo = 0x40, MediaHasVideo = 0x40,
MediaCanToggleControls = 0x40,
MediaControls = 0x80, MediaControls = 0x80,
MediaCanPrint = 0x100, MediaCanPrint = 0x100,
MediaCanRotate = 0x200, MediaCanRotate = 0x200,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment