Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index fc8703819fa07c010facb070678d03f1f8120be2..265d923d7e92592bb09e59228e245c14ec366a87 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -481,7 +481,7 @@ bool HTMLMediaElement::supportsFocus() const |
return false; |
// If no controls specified, we should still be able to focus the element if it has tabIndex. |
- return controls() || HTMLElement::supportsFocus(); |
+ return shouldShowControls() || HTMLElement::supportsFocus(); |
} |
bool HTMLMediaElement::isMouseFocusable() const |
@@ -531,7 +531,7 @@ void HTMLMediaElement::finishParsingChildren() |
bool HTMLMediaElement::rendererIsNeeded(const RenderStyle& style) |
{ |
- return controls() ? HTMLElement::rendererIsNeeded(style) : false; |
+ return shouldShowControls() && HTMLElement::rendererIsNeeded(style); |
} |
RenderObject* HTMLMediaElement::createRenderer(RenderStyle*) |
@@ -2252,7 +2252,7 @@ void HTMLMediaElement::setLoop(bool b) |
setBooleanAttribute(loopAttr, b); |
} |
-bool HTMLMediaElement::controls() const |
+bool HTMLMediaElement::shouldShowControls() const |
{ |
LocalFrame* frame = document().frame(); |
@@ -2267,12 +2267,6 @@ bool HTMLMediaElement::controls() const |
return fastHasAttribute(controlsAttr); |
} |
-void HTMLMediaElement::setControls(bool b) |
-{ |
- WTF_LOG(Media, "HTMLMediaElement::setControls(%s)", boolString(b)); |
- setBooleanAttribute(controlsAttr, b); |
-} |
- |
double HTMLMediaElement::volume() const |
{ |
return m_volume; |
@@ -3599,7 +3593,7 @@ bool HTMLMediaElement::createMediaControls() |
ensureUserAgentShadowRoot().appendChild(mediaControls); |
- if (!controls() || !inDocument()) |
+ if (!shouldShowControls() || !inDocument()) |
mediaControls->hide(); |
return true; |
@@ -3607,7 +3601,7 @@ bool HTMLMediaElement::createMediaControls() |
void HTMLMediaElement::configureMediaControls() |
{ |
- if (!controls() || !inDocument()) { |
+ if (!shouldShowControls() || !inDocument()) { |
if (hasMediaControls()) |
mediaControls()->hide(); |
return; |