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

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

Issue 190463002: Remove document().page() null checks in MediaControls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 6 years, 9 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/media/controls-in-frameless-document-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 f7ebf6b0d182a82285e26a069d288b7a14ec223e..158b5a1662413c23f54f491d6ccbf8d3f7df7e7e 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -58,9 +58,6 @@ MediaControls::MediaControls(Document& document)
PassRefPtr<MediaControls> MediaControls::create(Document& document)
{
- if (!document.page())
- return nullptr;
-
RefPtr<MediaControls> controls;
#if OS(ANDROID)
controls = adoptRef(new MediaControlsAndroid(document));
@@ -167,10 +164,6 @@ void MediaControls::setMediaController(MediaControllerInterface* controller)
void MediaControls::reset()
{
- Page* page = document().page();
- if (!page)
- return;
-
double duration = m_mediaController->duration();
m_durationDisplay->setInnerText(RenderTheme::theme().formatMediaControlsTime(duration), ASSERT_NO_EXCEPTION);
m_durationDisplay->setCurrentValue(duration);
@@ -264,10 +257,6 @@ void MediaControls::updateCurrentTimeDisplay()
double now = m_mediaController->currentTime();
double duration = m_mediaController->duration();
- Page* page = document().page();
- if (!page)
- return;
-
// After seek, hide duration display and show current time.
if (now > 0) {
m_currentTimeDisplay->show();
@@ -383,10 +372,6 @@ void MediaControls::startHideFullscreenControlsTimer()
if (!m_isFullscreen)
return;
- Page* page = document().page();
- if (!page)
- return;
-
m_hideFullscreenControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingFullscreenControls);
}
« no previous file with comments | « LayoutTests/media/controls-in-frameless-document-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698