Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
index a23c6a4f7feeac806f2ce01e6a46fe57afe6bc7a..43969562e7e4b6412a7a8c7f5470ab189843d0d2 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -433,7 +433,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
{ |
ThreadState::current()->registerPreFinalizer(this); |
- WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::HTMLMediaElement(" << this << ")"; |
Srirama
2016/05/17 13:27:37
Should we simplify it by using ":" instead of brac
fs
2016/05/17 13:59:07
Maybe just have "HTMLMediaElement(" << this << ")"
|
if (document.settings() && document.settings()->mediaPlaybackRequiresUserGesture()) |
m_userGestureRequiredForPlay = true; |
@@ -446,7 +446,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
HTMLMediaElement::~HTMLMediaElement() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::~HTMLMediaElement(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::~HTMLMediaElement(" << this << ")"; |
// m_audioSourceNode is explicitly cleared by AudioNode::dispose(). |
// Since AudioNode::dispose() is guaranteed to be always called before |
@@ -471,7 +471,7 @@ void HTMLMediaElement::dispose() |
void HTMLMediaElement::didMoveToNewDocument(Document& oldDocument) |
{ |
- WTF_LOG(Media, "HTMLMediaElement::didMoveToNewDocument(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::didMoveToNewDocument(" << this << ")"; |
if (m_shouldDelayLoadEvent) { |
document().incrementLoadEventDelayCount(); |
@@ -558,7 +558,7 @@ LayoutObject* HTMLMediaElement::createLayoutObject(const ComputedStyle&) |
Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint) |
{ |
- WTF_LOG(Media, "HTMLMediaElement::insertedInto(%p, %p)", this, insertionPoint); |
+ DVLOG(1) << "HTMLMediaElement::insertedInto(" << this << ", " << insertionPoint << ")"; |
HTMLElement::insertedInto(insertionPoint); |
if (insertionPoint->inShadowIncludingDocument()) { |
@@ -579,7 +579,7 @@ void HTMLMediaElement::didNotifySubtreeInsertionsToDocument() |
void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint) |
{ |
- WTF_LOG(Media, "HTMLMediaElement::removedFrom(%p, %p)", this, insertionPoint); |
+ DVLOG(1) << "HTMLMediaElement::removedFrom(" << this << ", " << insertionPoint << ")"; |
HTMLElement::removedFrom(insertionPoint); |
if (insertionPoint->inActiveDocument()) { |
@@ -605,7 +605,7 @@ void HTMLMediaElement::didRecalcStyle(StyleRecalcChange) |
void HTMLMediaElement::scheduleTextTrackResourceLoad() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::scheduleTextTrackResourceLoad(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::scheduleTextTrackResourceLoad(" << this << ")"; |
m_pendingActionFlags |= LoadTextTrackResource; |
@@ -628,7 +628,7 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName) |
void HTMLMediaElement::scheduleEvent(Event* event) |
{ |
#if LOG_MEDIA_EVENTS |
- WTF_LOG(Media, "HTMLMediaElement::scheduleEvent(%p) - scheduling '%s'", this, event->type().ascii().data()); |
+ DVLOG(1) << "HTMLMediaElement::scheduleEvent(" << this << ")" << " - scheduling '" << event->type().ascii().data() << "'"; |
#endif |
m_asyncEventQueue->enqueueEvent(event); |
} |
@@ -687,7 +687,7 @@ String HTMLMediaElement::canPlayType(const String& mimeType) const |
break; |
} |
- WTF_LOG(Media, "HTMLMediaElement::canPlayType(%p, %s) -> %s", this, mimeType.utf8().data(), canPlay.utf8().data()); |
+ DVLOG(1) << "HTMLMediaElement::canPlayType(" << this << ", " << mimeType.utf8().data() << ") -> " << canPlay.utf8().data(); |
return canPlay; |
} |
@@ -708,7 +708,7 @@ void HTMLMediaElement::load() |
// in resource selection algorithm. |
void HTMLMediaElement::invokeLoadAlgorithm() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::invokeLoadAlgorithm(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::invokeLoadAlgorithm(" << this << ")"; |
// Perform the cleanup required for the resource load algorithm to run. |
stopPeriodicTimers(); |
@@ -796,7 +796,7 @@ void HTMLMediaElement::invokeLoadAlgorithm() |
void HTMLMediaElement::invokeResourceSelectionAlgorithm() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::invokeResourceSelectionAlgorithm(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::invokeResourceSelectionAlgorithm(" << this << ")"; |
// The resource selection algorithm |
// 1 - Set the networkState to NETWORK_NO_SOURCE |
setNetworkState(NETWORK_NO_SOURCE); |
@@ -840,7 +840,7 @@ void HTMLMediaElement::loadInternal() |
void HTMLMediaElement::selectMediaResource() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::selectMediaResource(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::selectMediaResource(" << this << ")"; |
enum Mode { Object, Attribute, Children, Nothing }; |
Mode mode = Nothing; |
@@ -1288,7 +1288,7 @@ void HTMLMediaElement::startProgressEventTimer() |
void HTMLMediaElement::waitForSourceChange() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::waitForSourceChange(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::waitForSourceChange(" << this << ")"; |
stopPeriodicTimers(); |
m_loadState = WaitingForSource; |
@@ -1307,7 +1307,7 @@ void HTMLMediaElement::waitForSourceChange() |
void HTMLMediaElement::noneSupported() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::noneSupported(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::noneSupported(" << this << ")"; |
stopPeriodicTimers(); |
m_loadState = WaitingForSource; |
@@ -1372,7 +1372,7 @@ void HTMLMediaElement::mediaEngineError(MediaError* err) |
void HTMLMediaElement::cancelPendingEventsAndCallbacks() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::cancelPendingEventsAndCallbacks(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::cancelPendingEventsAndCallbacks(" << this << ")"; |
m_asyncEventQueue->cancelAllEvents(); |
for (HTMLSourceElement* source = Traversal<HTMLSourceElement>::firstChild(*this); source; source = Traversal<HTMLSourceElement>::nextSibling(*source)) |
@@ -1746,7 +1746,7 @@ void HTMLMediaElement::seek(double time) |
void HTMLMediaElement::finishSeek() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::finishSeek(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::finishSeek(" << this << ")"; |
// 14 - Set the seeking IDL attribute to false. |
m_seeking = false; |
@@ -1792,7 +1792,7 @@ void HTMLMediaElement::refreshCachedTime() const |
void HTMLMediaElement::invalidateCachedTime() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::invalidateCachedTime(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::invalidateCachedTime(" << this << ")"; |
m_cachedTime = std::numeric_limits<double>::quiet_NaN(); |
} |
@@ -2030,7 +2030,7 @@ ScriptPromise HTMLMediaElement::playForBindings(ScriptState* scriptState) |
Nullable<ExceptionCode> HTMLMediaElement::play() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::play(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::play(" << this << ")"; |
m_autoplayHelper->playMethodCalled(); |
@@ -2059,7 +2059,7 @@ Nullable<ExceptionCode> HTMLMediaElement::play() |
void HTMLMediaElement::playInternal() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::playInternal(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::playInternal(" << this << ")"; |
// Always return the buffering strategy to normal when not paused, |
// regardless of the cause. (In contrast with aggressive buffering which is |
@@ -2098,7 +2098,7 @@ void HTMLMediaElement::playInternal() |
void HTMLMediaElement::pause() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::pause(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::pause(" << this << ")"; |
// Only buffer aggressively on a user-initiated pause. Other types of pauses |
// (which go directly to pauseInternal()) should not cause this behavior. |
@@ -2110,7 +2110,7 @@ void HTMLMediaElement::pause() |
void HTMLMediaElement::pauseInternal() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::pauseInternal(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::pauseInternal(" << this << ")"; |
if (m_networkState == NETWORK_EMPTY) |
invokeResourceSelectionAlgorithm(); |
@@ -2368,7 +2368,7 @@ WebMediaPlayer::TrackId HTMLMediaElement::addAudioTrack(const WebString& id, Web |
void HTMLMediaElement::removeAudioTrack(WebMediaPlayer::TrackId trackId) |
{ |
- WTF_LOG(Media, "HTMLMediaElement::removeAudioTrack(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::removeAudioTrack(" << this << ")"; |
if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
return; |
@@ -2416,7 +2416,7 @@ WebMediaPlayer::TrackId HTMLMediaElement::addVideoTrack(const WebString& id, Web |
void HTMLMediaElement::removeVideoTrack(WebMediaPlayer::TrackId trackId) |
{ |
- WTF_LOG(Media, "HTMLMediaElement::removeVideoTrack(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::removeVideoTrack(" << this << ")"; |
if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
return; |
@@ -2642,7 +2642,7 @@ KURL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, InvalidUR |
// Don't log if this was just called to find out if there are any valid <source> elements. |
bool shouldLog = actionIfInvalid != DoNothing; |
if (shouldLog) |
- WTF_LOG(Media, "HTMLMediaElement::selectNextSourceChild(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::selectNextSourceChild(" << this << ")"; |
#endif |
if (!m_nextChildNodeToConsider) { |
@@ -2817,7 +2817,7 @@ void HTMLMediaElement::sourceWasRemoved(HTMLSourceElement* source) |
void HTMLMediaElement::timeChanged() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::timeChanged(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::timeChanged(" << this << ")"; |
cueTimeline().updateActiveCues(currentTime()); |
@@ -2867,7 +2867,7 @@ void HTMLMediaElement::timeChanged() |
void HTMLMediaElement::durationChanged() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::durationChanged(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::durationChanged(" << this << ")"; |
// FIXME: Change WebMediaPlayer to convey the currentTime |
// when the duration change occured. The current WebMediaPlayer |
// implementations always clamp currentTime() to duration() |
@@ -2898,7 +2898,7 @@ void HTMLMediaElement::durationChanged(double duration, bool requestSeek) |
void HTMLMediaElement::playbackStateChanged() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::playbackStateChanged(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::playbackStateChanged(" << this << ")"; |
if (!webMediaPlayer()) |
return; |
@@ -2961,7 +2961,7 @@ void HTMLMediaElement::repaint() |
void HTMLMediaElement::sizeChanged() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::sizeChanged(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::sizeChanged(" << this << ")"; |
ASSERT(hasVideo()); // "resize" makes no sense absent video. |
if (m_readyState > HAVE_NOTHING && isHTMLVideoElement()) |
@@ -3154,7 +3154,7 @@ void HTMLMediaElement::clearMediaPlayer() |
void HTMLMediaElement::stop() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::stop(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::stop(" << this << ")"; |
// Close the async event queue so that no events are enqueued. |
cancelPendingEventsAndCallbacks(); |
@@ -3221,14 +3221,14 @@ bool HTMLMediaElement::isFullscreen() const |
void HTMLMediaElement::enterFullscreen() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::enterFullscreen(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::enterFullscreen(" << this << ")"; |
Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedRequest); |
} |
void HTMLMediaElement::exitFullscreen() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::exitFullscreen(" << this << ")"; |
Fullscreen::from(document()).exitFullscreen(); |
} |
@@ -3324,14 +3324,14 @@ TextTrackContainer& HTMLMediaElement::ensureTextTrackContainer() |
void HTMLMediaElement::updateTextTrackDisplay() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::updateTextTrackDisplay(" << this << ")"; |
ensureTextTrackContainer().updateDisplay(*this, TextTrackContainer::DidNotStartExposingControls); |
} |
void HTMLMediaElement::mediaControlsDidBecomeVisible() |
{ |
- WTF_LOG(Media, "HTMLMediaElement::mediaControlsDidBecomeVisible(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::mediaControlsDidBecomeVisible(" << this << ")"; |
// When the user agent starts exposing a user interface for a video element, |
// the user agent should run the rules for updating the text track rendering |
@@ -3483,7 +3483,7 @@ CueTimeline& HTMLMediaElement::cueTimeline() |
void HTMLMediaElement::configureTextTrackDisplay() |
{ |
ASSERT(m_textTracks); |
- WTF_LOG(Media, "HTMLMediaElement::configureTextTrackDisplay(%p)", this); |
+ DVLOG(1) << "HTMLMediaElement::configureTextTrackDisplay(" << this << ")"; |
if (m_processingPreferenceChange) |
return; |