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

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

Issue 850943002: Remove MediaPlayer::invalidTime() (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.cpp ('k') | Source/core/html/MediaFragmentURIParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaController.cpp
diff --git a/Source/core/html/MediaController.cpp b/Source/core/html/MediaController.cpp
index f7fa1f08920a336aa4b2c7221d97cbdd047d55a0..48d1dd3d1b8dc79a93f7197123398d750c223068 100644
--- a/Source/core/html/MediaController.cpp
+++ b/Source/core/html/MediaController.cpp
@@ -51,7 +51,7 @@ MediaController::MediaController(ExecutionContext* context)
: m_paused(false)
, m_defaultPlaybackRate(1)
, m_volume(1)
- , m_position(MediaPlayer::invalidTime())
+ , m_position(std::numeric_limits<double>::quiet_NaN())
, m_muted(false)
, m_readyState(HTMLMediaElement::HAVE_NOTHING)
, m_playbackState(WAITING)
@@ -148,7 +148,7 @@ double MediaController::currentTime() const
if (m_mediaElements.isEmpty())
return 0;
- if (m_position == MediaPlayer::invalidTime()) {
+ if (std::isnan(m_position)) {
// Some clocks may return times outside the range of [0..duration].
m_position = std::max(0.0, std::min(duration(), m_clock->currentTime()));
m_clearPositionTimer.startOneShot(0, FROM_HERE);
@@ -568,7 +568,7 @@ void MediaController::scheduleEvent(const AtomicString& eventName)
void MediaController::clearPositionTimerFired(Timer<MediaController>*)
{
- m_position = MediaPlayer::invalidTime();
+ m_position = std::numeric_limits<double>::quiet_NaN();
}
const AtomicString& MediaController::interfaceName() const
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/MediaFragmentURIParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698