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

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

Issue 854833002: Rename HTMLMediaElement::createMediaControls to ensureMediaControls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 | « Source/core/html/HTMLMediaElement.h ('k') | 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 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());
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698