Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Unified Diff: Source/core/html/shadow/MediaControls.cpp

Issue 1197773002: Always show "exit fullscreen" button. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: /* expositionary text */ Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/virtual/android/fullscreen/compositor-touch-hit-rects-fullscreen-video-controls-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControls.cpp
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index 43d22a4cf8f2bc617013e90ffb0185038d8b74aa..17d1096113fffeb9acbde1c6aaa10e83a405b48e 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -184,7 +184,13 @@ void MediaControls::reset()
refreshClosedCaptionsButtonVisibility();
- if (mediaElement().hasVideo() && fullscreenIsSupported(document()))
+ // Unconditionally allow the user to exit fullscreen if we are in it
+ // now. Especially on android, when we might not yet know if
+ // fullscreen is supported, we sometimes guess incorrectly and show
+ // the button earlier, and we don't want to remove it here if the
+ // user chose to enter fullscreen. crbug.com/500732 .
+ if ((mediaElement().hasVideo() && fullscreenIsSupported(document()))
+ || mediaElement().isFullscreen())
m_fullScreenButton->show();
else
m_fullScreenButton->hide();
« no previous file with comments | « LayoutTests/virtual/android/fullscreen/compositor-touch-hit-rects-fullscreen-video-controls-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698