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

Unified Diff: Source/core/html/MediaFragmentURIParser.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/MediaFragmentURIParser.h ('k') | Source/platform/graphics/media/MediaPlayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaFragmentURIParser.cpp
diff --git a/Source/core/html/MediaFragmentURIParser.cpp b/Source/core/html/MediaFragmentURIParser.cpp
index 8adc732b285510baea751f07bdcbe006359c1afa..b41cd74d61fd4112692e86307b0c4ce3d6cbcce1 100644
--- a/Source/core/html/MediaFragmentURIParser.cpp
+++ b/Source/core/html/MediaFragmentURIParser.cpp
@@ -26,7 +26,6 @@
#include "config.h"
#include "core/html/MediaFragmentURIParser.h"
-#include "platform/graphics/media/MediaPlayer.h"
#include "wtf/text/CString.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
@@ -63,23 +62,18 @@ static String collectFraction(const LChar* input, unsigned length, unsigned& pos
return digits.toString();
}
-double MediaFragmentURIParser::invalidTimeValue()
-{
- return MediaPlayer::invalidTime();
-}
-
MediaFragmentURIParser::MediaFragmentURIParser(const KURL& url)
: m_url(url)
, m_timeFormat(None)
- , m_startTime(MediaPlayer::invalidTime())
- , m_endTime(MediaPlayer::invalidTime())
+ , m_startTime(std::numeric_limits<double>::quiet_NaN())
+ , m_endTime(std::numeric_limits<double>::quiet_NaN())
{
}
double MediaFragmentURIParser::startTime()
{
if (!m_url.isValid())
- return MediaPlayer::invalidTime();
+ return std::numeric_limits<double>::quiet_NaN();
if (m_timeFormat == None)
parseTimeFragment();
return m_startTime;
@@ -88,7 +82,7 @@ double MediaFragmentURIParser::startTime()
double MediaFragmentURIParser::endTime()
{
if (!m_url.isValid())
- return MediaPlayer::invalidTime();
+ return std::numeric_limits<double>::quiet_NaN();
if (m_timeFormat == None)
parseTimeFragment();
return m_endTime;
@@ -176,8 +170,8 @@ void MediaFragmentURIParser::parseTimeFragment()
// in the same format. The format is specified by name, followed by a colon (:), with npt: being
// the default.
- double start = MediaPlayer::invalidTime();
- double end = MediaPlayer::invalidTime();
+ double start = std::numeric_limits<double>::quiet_NaN();
+ double end = std::numeric_limits<double>::quiet_NaN();
if (parseNPTFragment(fragment.second.characters8(), fragment.second.length(), start, end)) {
m_startTime = start;
m_endTime = end;
« no previous file with comments | « Source/core/html/MediaFragmentURIParser.h ('k') | Source/platform/graphics/media/MediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698