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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 182613006: Remove media controls when not in use. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 35f8cd734ac77d7fa55aba347ec080f1add8dda1..07e9274c321cf79b57edf728a567db2d4a58595c 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2303,9 +2303,12 @@ bool HTMLMediaElement::controls() const
if (frame && !frame->script().canExecuteScripts(NotAboutToExecuteScript))
return true;
- // Always show controls when in full screen mode.
+#if !OS(ANDROID)
+ // Always show controls when in full screen mode, except on Android which
qinmin 2014/02/27 18:07:40 This is a wrong assumption
+ // has a native UI overlay player.
if (isFullscreen())
acolwell GONE FROM CHROMIUM 2014/02/27 18:35:23 This and the "script disabled" code above seems mi
return true;
+#endif
return fastHasAttribute(controlsAttr);
}
@@ -3595,8 +3598,12 @@ bool HTMLMediaElement::createMediaControls()
void HTMLMediaElement::configureMediaControls()
{
if (!controls() || !inDocument()) {
- if (hasMediaControls())
- mediaControls()->hide();
+ if (hasMediaControls()) {
+ if (!controls())
+ ensureUserAgentShadowRoot().removeChild(mediaControls());
acolwell GONE FROM CHROMIUM 2014/02/27 18:35:23 Why is this needed? What are you trying to solve w
+ else
+ mediaControls()->hide();
+ }
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698