Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index 44e3162a622a66e1270aa2d89cb724f60d1d244e..9279e8462a3b6f6268dcb392d36c821f91e0801f 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -3689,9 +3689,7 @@ void HTMLMediaElement::updateTextTrackDisplay() |
{ |
WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this); |
- if (!createMediaControls()) |
- return; |
- |
+ ensureMediaControls(); |
mediaControls()->updateTextTrackDisplay(); |
} |
@@ -3762,10 +3760,10 @@ bool HTMLMediaElement::hasMediaControls() const |
return false; |
} |
-bool HTMLMediaElement::createMediaControls() |
+void HTMLMediaElement::ensureMediaControls() |
{ |
if (hasMediaControls()) |
- return true; |
+ return; |
RefPtrWillBeRawPtr<MediaControls> mediaControls = MediaControls::create(*this); |
@@ -3777,8 +3775,6 @@ bool HTMLMediaElement::createMediaControls() |
if (!shouldShowControls() || !inDocument()) |
mediaControls->hide(); |
- |
- return true; |
} |
void HTMLMediaElement::configureMediaControls() |
@@ -3789,9 +3785,7 @@ void HTMLMediaElement::configureMediaControls() |
return; |
} |
- if (!createMediaControls()) |
- return; |
- |
+ ensureMediaControls(); |
mediaControls()->reset(); |
if (shouldShowControls()) |
mediaControls()->show(); |
@@ -3825,9 +3819,8 @@ void HTMLMediaElement::configureTextTrackDisplay(VisibilityChangeAssumption assu |
if (!m_haveVisibleTextTrack && !hasMediaControls()) |
return; |
- if (!createMediaControls()) |
- return; |
+ ensureMediaControls(); |
mediaControls()->changedClosedCaptionsVisibility(); |
updateActiveTextTrackCues(currentTime()); |