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

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

Issue 334593005: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/HTMLMapElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | 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 af3e44e4494d0448e89dc1b8aefb4295c0965312..0e2226daba2fb368f93f026b97cf60bea56b0b0e 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -81,7 +81,6 @@
#include "platform/audio/AudioSourceProviderClient.h"
#endif
-using namespace std;
using blink::WebInbandTextTrack;
using blink::WebMediaPlayer;
using blink::WebMimeRegistry;
@@ -120,7 +119,6 @@ static const char* boolString(bool val)
static const char mediaSourceBlobProtocol[] = "blob";
using namespace HTMLNames;
-using namespace std;
typedef WillBeHeapHashSet<RawPtrWillBeWeakMember<HTMLMediaElement> > WeakMediaElementSet;
typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<Document>, WeakMediaElementSet> DocumentElementSetMap;
@@ -244,10 +242,10 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
, m_readyStateMaximum(HAVE_NOTHING)
, m_volume(1.0f)
, m_lastSeekTime(0)
- , m_previousProgressTime(numeric_limits<double>::max())
- , m_duration(numeric_limits<double>::quiet_NaN())
+ , m_previousProgressTime(std::numeric_limits<double>::max())
+ , m_duration(std::numeric_limits<double>::quiet_NaN())
, m_lastTimeUpdateEventWallTime(0)
- , m_lastTimeUpdateEventMovieTime(numeric_limits<double>::max())
+ , m_lastTimeUpdateEventMovieTime(std::numeric_limits<double>::max())
, m_loadState(WaitingForSource)
, m_webLayer(0)
, m_preload(MediaPlayer::Auto)
@@ -722,7 +720,7 @@ void HTMLMediaElement::prepareForLoad()
// FIXME: Investigate whether these can be moved into m_networkState != NETWORK_EMPTY block above
// so they are closer to the relevant spec steps.
m_lastSeekTime = 0;
- m_duration = numeric_limits<double>::quiet_NaN();
+ m_duration = std::numeric_limits<double>::quiet_NaN();
// The spec doesn't say to block the load event until we actually run the asynchronous section
// algorithm, but do it now because we won't start that until after the timer fires and the
@@ -1036,7 +1034,7 @@ void HTMLMediaElement::updateActiveTextTrackCues(double movieTime)
double cueEndTime = potentiallySkippedCues[i].high();
// Consider cues that may have been missed since the last seek time.
- if (cueStartTime > max(m_lastSeekTime, lastTime) && cueEndTime < movieTime)
+ if (cueStartTime > std::max(m_lastSeekTime, lastTime) && cueEndTime < movieTime)
missedCues.append(potentiallySkippedCues[i]);
}
}
@@ -1327,7 +1325,7 @@ void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtrWillBeRawPtr<
// Negative duration cues need be treated in the interval tree as
// zero-length cues.
- double endTime = max(cue->startTime(), cue->endTime());
+ double endTime = std::max(cue->startTime(), cue->endTime());
CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
if (!m_cueTree.contains(interval))
@@ -1339,7 +1337,7 @@ void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtrWillBeRawPtr<Tex
{
// Negative duration cues need to be treated in the interval tree as
// zero-length cues.
- double endTime = max(cue->startTime(), cue->endTime());
+ double endTime = std::max(cue->startTime(), cue->endTime());
CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
m_cueTree.remove(interval);
@@ -1781,10 +1779,10 @@ void HTMLMediaElement::seek(double time, ExceptionState& exceptionState)
// 5 - If the new playback position is later than the end of the media resource, then let it be the end
// of the media resource instead.
- time = min(time, duration());
+ time = std::min(time, duration());
// 6 - If the new playback position is less than the earliest possible position, let it be that position instead.
- time = max(time, 0.0);
+ time = std::max(time, 0.0);
// Ask the media engine for the time value in the movie's time scale before comparing with current time. This
// is necessary because if the seek time is not equal to currentTime but the delta is less than the movie's
@@ -1933,7 +1931,7 @@ void HTMLMediaElement::setCurrentTime(double time, ExceptionState& exceptionStat
double HTMLMediaElement::duration() const
{
if (!m_player || m_readyState < HAVE_METADATA)
- return numeric_limits<double>::quiet_NaN();
+ return std::numeric_limits<double>::quiet_NaN();
// FIXME: Refactor so m_duration is kept current (in both MSE and
// non-MSE cases) once we have transitioned from HAVE_NOTHING ->
« no previous file with comments | « Source/core/html/HTMLMapElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698